| 7:35 pm on Aug 18, 2005 (gmt 0)|
I'm going out on a limb here, because I don't this absolutely. But... I think you'll need this line in your httpd.conf file:
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
| 7:54 pm on Aug 18, 2005 (gmt 0)|
that file (libphp4.so) does not seem to be in any folder in my PC? do I need to download it and change the path to wherever I save it to?
| 8:23 pm on Aug 18, 2005 (gmt 0)|
You can tell Apache to parse certain extensions as PHP. From the manual pages [php.net] ...
AddType application/x-httpd-php .php .php4
| 8:28 pm on Aug 18, 2005 (gmt 0)|
where can I tell that to Apache? is there a config file?
| 8:33 pm on Aug 18, 2005 (gmt 0)|
Yes, there is an Apache configuration file, httpd.conf. But, more importantly, if your hosting provider allows per-directory override files (.htaccess) you can drop it into your root of your shared hosting site and you won't have to rename all your extensions to .php4!
Most providers allow this, so check into it.
| 8:40 pm on Aug 18, 2005 (gmt 0)|
Indeed my site has .htaccess files in some of the folder and I added the line to the folder that has a phpver.php file but it still won't show anything, what am I doing wrong?
| 9:21 pm on Aug 18, 2005 (gmt 0)|
I added the line:
AddType application/x-httpd-php .php4 .php
to my httpd.conf file and now it works, just had to flip the .php4 in front of the .php in that line.
I would still like to know how to edit the .htacces file so I can use regular .php files on my site though. Could someone point me in the right direction?
| 9:40 pm on Aug 18, 2005 (gmt 0)|
The order doesn't matter. May have been a browser caching issue or something.
Anyway, that is exactly what the AddType [httpd.apache.org] directive does. You should be able to have files with .php or a .php4 extension and PHP should parse them. It all depends on the server configuration. In most cases, the directive shown works just fine. In other installations you may have to use AddHandler (or choose to do so).