| ||||||||||||||
program file extension .php4 Posted by charles.wroth (charles.wroth), 12 August 2003 Hello Graham. Thank you for sending the course examples, which I've now extracted to files.During our course, each of the program files we created had a filename extension of .php4 - but my Windows (XP) system only works when I change them to .php instead. It took me a while to work out why the .php4 s weren't working... Is there a config option or something? It seems fairly basic info, so I did a search but couldn't find anything helpful. Thank you... Charles. Posted by John_Moylan (jfp), 12 August 2003 Hello Charles.What Webserver are you running? This is a setting in the webserver configuration file Let me know which it is, I'll be happy to look for you. jfp Posted by charles.wroth (charles.wroth), 12 August 2003 Thank you, jfp! Pardon my ignorance - I'm running Apache. Is that what you need to know? Charles.Posted by John_Moylan (jfp), 12 August 2003 >> I'm running Apache.Great, For a moment I thought you were going to say IIS (yuk!) Anyway, you need to edit your apache configuration file. This goes under the name of httpd.conf, I'm afraid I couldn't tell you the location of this file under windows, but a quick search will find it. First....BACKUP YOUR EXISTING httpd.conf FILE. Sorry to shout, but I've buggered up my own conf file in the past, and a nice quick roll back is always nice. Open the httpd.conf file for editing. You say it will parse a .php extension, so look for the line that reads: Code:
Then add .php4 to the end of the line so it should now read: Code:
My httpd.conf file as an example has 4 entrys that start with the string "AddType application/x-httpd-php" and my file reads like this Code:
This tells apache to parse .php & .php4 files through the PHP preprocessor. --------------------------------------- Now you need to tell apache that .php or .php4 extension can be index pages. Look for the line that starts with: Code:
There may already be an entry near the end of this line that reads index.php, you need to add index.php4 my http.conf file as an example reads like this on that particular line Code:
Now a restart of Apache to reload the configuration and that should work. post back if there's any problems. Regards jfp Note: I'm sure you can also do this by ammending your .htaccess file (anyone?) to allow other filename extensions to be parsed through PHP. Posted by charles.wroth (charles.wroth), 12 August 2003 That's terrific - thanks a lot. Charles.Posted by Chris_Isaac (Chris Isaac), 13 August 2003 Quote:
Yes, this will work as well. If you add it to your top directory it will filter it down, or if you add it to a directory below, it will effect only directories below it. Chris This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| |||||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |