LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   FC4+apache: *.php4 doesn't work (https://www.linuxquestions.org/questions/fedora-35/fc4-apache-%2A-php4-doesnt-work-366339/)

legolin 09-23-2005 02:00 PM

FC4+apache: *.php4 doesn't work
 
hi,

i don't know if this is the right place to post this question, but i cannot get *.php4 files to work on my server (FC4 with standard apache)

Where is the problem? *.php are working as well.


my /etc/httpd/conf.d/php.conf looks like this:

#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so
#LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddHandler php4-script .php
AddType text/html .php
#AddType text/html .php4

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps


as soon as i enable the line
LoadModule php4_module modules/libphp4.so
i cannot restart apache.

i cannot find anything with yum
yum search php4 finds only squirrelmail.....

what do i have to do in oder to get it working?


thankx a lot,

leg

reddazz 09-24-2005 02:35 AM

You may need to disable php5. I am not sure if you can have php5 and php4 modules loaded at the same time.

legolin 09-24-2005 02:50 AM

hi reddazz,

i disable php5 modules and it didn't work at all. it seems that i havn't installed php4, but how con i install it using yum?

what if i rename the script on my website from *.php4 to *.php5??? is there a diference?


Thankx a lot

leg

reddazz 09-24-2005 03:01 PM

Fedora Core 4 only ships with PHP5.

Jamo 09-26-2005 08:43 PM

Well, this might be obvious...

... but if you only want to use .php4/3 files and NOT to use old version of PHP interpreter, just add handlers for them to /etc/httpd/conf.d/php.conf:

Code:

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddHandler php5-script .php4
AddHandler php5-script .php3
AddType text/html .php
AddType text/html .php4
AddType text/html .php3

Cheap trick, but this might save you from some headaches... especially with old phpMyAdmin and php3-files when you absolutely have to use them. ;-)


All times are GMT -5. The time now is 10:31 AM.