mesh2005
-
Posts
50 -
Joined
-
Last visited
Never
Posts posted by mesh2005
-
-
I setup a virtual host as follows:
<VirtualHost 192.168.1.1> ServerAdmin webmaster@localhost ServerName frame DocumentRoot /home/username/Personal/framework <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/username/Personal/framework> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost>
I put a header.php in the /home/username/Personal/framework; I created a subdirectory called test and I put a script index.php inside test that has the following code:
include "/header.php";
It fails and I get no such file or directory although the header.php is in the root of the virtual host. It seems that the / is not mapped to /home/username/Personal/framework, how can I fix this?
Thank you
AM
-
I checked the PHP configuration and I can see the session timeout is set to never expire, however; sometimes my application fails to read the Session variables. I keep a logged-in flag in the Session but it is empty after a while. I have to logout and re-login, please advice.
Thank you
AM
-
Thank you very much for your replies and special thanks to ToonMariner. I need to force the links for some reason, actually the site owner wanna me to do so
The Javascript code was not working correctly, I modified it. Here is the code:
function checkExternalLinks() { var divs =document.getElementsByTagName('div'); var links = Array(); var i = 0; for(var x=0; x<divs.length; x++) { if (divs[x].className == 'external-links') { links = divs[x].getElementsByTagName('a'); for(i=0;i<links.length;i++) { links[i].target = '_blank'; } } } }
Thanks again
-
Thanks guys. I found a very useful regex to strip out all non-ASCII chars and this saved the day. Here is it in case anyone needs it:
$string = preg_replace('/[^(\x20-\x7F)]*/','', $string);
-
Without using target=_blank, is this possible?
Thank you
-
Thanks guys for your replies. I wanna allow other symbols too like +/- and all possible symbols that won't cause a problem. I usually get errors when the filename is encoded in way that is not understood by Linux, for example the character (’), this character appears as unknown code in the filename, any help?
-
I have a PHP script that takes an input from the user and writes a file with the same name as the input
for example, if the user enters: this is a test a file name is created with the name this is a test.php
The problem happens when the user enters a value that contains characters not allowed in filenames on Linux distributions, how do I convert the value to make sure that it contains only allowed chars?
Thank you
-
I dragged a combbox component from ctrl+F7 to my stage. It has rounded border and I wanna change this to rectangle borders. Also, I wanna reduce the height of each item. Could you please help? I'm using Flash CS3
-
Is it possible to convert a PDF file to HTML using PHP? or to TEXT? If so how?
Thank you
-
within a certain time interval?
-
then what should I do after I record the IP?
-
I'm building an Ad system and I would like to ask how can I detect click-fraud? After the search result is displayed, each click on an ad reduces the user's balance and click-fraud is a real problem that I wanna avoid. Any help?
-
I found a rewrite rule that some people claim to be working but unfortunately it is not on my machine:
RewriteEngine On
RewriteRule art/(.*) art.php?name=$1
This goes to art.php but the GET variable is always empty Any idea?
-
Thank you, I found a rewrite rule that some people claim to be working but unfortunately it is not on my machine:
RewriteEngine On
RewriteRule art/(.+) art.php?name=$1
This goes to art.php but the GET variable is always empty Any idea?
-
I'm building a website, currently I have a web page www.domain.com/view.php?id=id, I'm asked to replace this with a page on the form www.domain.com/name , is this something I can do with PHP? or does it need some mod_rewrite rules? or both?
-
It redirects again to the login form and I get no errors
-
I've a login form that posts the username & password to a secure link https://mydomain/login_work.php, I wanna redirect back to non-secure version if the login is successful, i.e. redirect to http://mydomain/home.php
I added header ("Location: http://mydomain/home.php"); to do the redirection and it works correctly in IE but not in Firefox, please help.
Thank you
-
I built a login form that posts data back to the server using AJAX. The form has a button not a submit button. Browsers don't display the save password dialog box when I click the login button. Is there anyway to instruct the browser to save the password? It works correctly if I change the login from AJAX to the usual POST.
-
Thank you guys for all your help
-
I'm writing a PHP script to query a database table and return the result as XML. If the result contain the letter '&', the XML is corrupted. How can I fix this problem?
<xml>
<record id='2' text='jjjj&kkkk'>any</record>
</xml>
-
mmm, I'm a bit confused. Now I'm building an ecommerce website for a company based in Australia. They have a merchant bank number and they want to save the payer details (e.g. credit card number) in their database. Which payment gateway should I use? Authorize.net is available in USA only. Please help.
-
I'm using sessions to track logged in users (I set a variable $_SESSION['v'] to a value after login). I wanna add a "Remember Me" check box on the login page, how can I preserve sessions for logged in users?
-
I have been having a trouble adding the following rule:
RewriteRule ^/dir/.*$ http://mydomain.com/index.html
full path to directory dir is: /var/www/dir
full path to index: /var/www/index.html
I want to redirect all requests of any pages under "dir" to index.html but it seems not to be working. Please help.
-
I need help to integrate BPay payment into my website. Is there any guide or something?
xmlHttp.responseXML.documentElement is null
in Javascript Help
Posted
I have a piece of javascript code that loads an XML, parses it and displays the result in a DIV element. This works perfectly in FF but in IE I'm getting the above error. The backend PHP has the following header:
A sample of the XML:
I added a Javascript alert statement to print the responseText and I can see the whole XML file is displayed correctly.
Please advice.
Thank you
Amir