Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-14-2005, 07:25 PM   #1
Registered: Feb 2002
Posts: 322

Rep: Reputation: 30
Can php4 and php5 run simultaneously on apache2?

Allright, I have an unusual question.

I have a production server running apache2 and mod_php4. I have 2 production domains on this server. I also have one "beta" domain on this box where I am in the process of rebuilding one of the production domains.

However, I would like to build the new site on php5. Unfortunately, the old sites are tied to php4 and will not run on php5. That is part of the reason I'm redoing them (via the beta domain).

The question is, can I run php4 and php5 concurrently? My thought was to associate .php4 files to php4, and associate .php and .php5 files to php5. In other words, can I run mod_php4 and mod_php5 at the same time, and if so, can I instruct apache to associate interpreters based on file extension?

... if the server reads a .php4 file, it will use mod_php4 to interpret it, and if it reads a .php5 file it will use mod_php5?

I've googled, but I'm struggling finding an answer to this question.
Old 09-15-2005, 12:53 AM   #2
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 623
Blog Entries: 1

Rep: Reputation: 49
Not knowing the specifics about how Apache would react to what you propose but given the general behavior that I've seen with systems built around interdependent program modules, I would say that you shouldn't count on that working. Even if you were to make it work, I wouldn't trust its reliability, especially given that you have production sites.

A much better solution would be to put your php5 sites on a different server.


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 06:09 AM
apache2 php4 and php5 as modules Nathanael Linux - Software 1 08-09-2005 12:10 PM
replacing PHP4 with PHP5 in SuSE 9.2? paganprogrammer Linux - Software 3 07-03-2005 02:25 AM
Php5 >> Php4 Eric45008 Slackware 22 04-25-2005 08:37 PM
upgradeing from php4 to php5 mgarcia001 Debian 0 09-30-2004 08:31 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:19 AM.

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