LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-23-2005, 02:00 PM   #1
legolin
Member
 
Registered: Dec 2003
Location: munich
Distribution: Fedora Core 4
Posts: 141

Rep: Reputation: 15
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
 
Old 09-24-2005, 02:35 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You may need to disable php5. I am not sure if you can have php5 and php4 modules loaded at the same time.
 
Old 09-24-2005, 02:50 AM   #3
legolin
Member
 
Registered: Dec 2003
Location: munich
Distribution: Fedora Core 4
Posts: 141

Original Poster
Rep: Reputation: 15
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
 
Old 09-24-2005, 03:01 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Fedora Core 4 only ships with PHP5.
 
Old 09-26-2005, 08:43 PM   #5
Jamo
LQ Newbie
 
Registered: Feb 2005
Location: Tampere, Finland
Distribution: Fedora Core 6
Posts: 26

Rep: Reputation: 15
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. ;-)

Last edited by Jamo; 09-26-2005 at 08:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP5 to PHP4 on FC4? kz26 Fedora 5 10-24-2005 05:09 AM
Apache not parsing PHP4 paco36 Linux - Software 12 07-17-2005 11:40 AM
Apache with php4 question Kevnathan Linux - Software 2 03-08-2005 07:13 AM
PHP4, Apache, and OpenLDAP? Doomhammer13 Linux - Software 2 09-04-2004 07:19 PM
Apache and php4 question Gilion Linux - Software 1 10-09-2003 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration