Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-04-2009, 10:37 AM   PM User | #1
udjamaflip
Regular Coder

 
Join Date: Mar 2008
Posts: 230
Thanks: 6
Thanked 20 Times in 19 Posts
udjamaflip is an unknown quantity at this point
Running php4 on a php5 server

Hi guys,

We are about to finally move to a new php5 production server, and we know we have several php4 websites that won't run, I have heard through the Google grapevine that there are ways to get php4 served on a php5 server through using the following .htaccess:

Code:
AddType x-mapp-php4 .php
AddHandler x-mapp-php4 .php
However this only makes .php extensions be parsed as HTML rather than php4, any ideas? suggestions? myths? legends?

I'm struggling to find anything definitive on Google, or anyone attempting the same without running dual installations.

Hope somone can help!
__________________
Andrew Sharman
Web designer, developer and programmer.

If you found my post helpful, why not give thanks! :)
udjamaflip is offline   Reply With Quote
Old 11-04-2009, 01:09 PM   PM User | #2
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,682
Thanks: 2
Thanked 245 Times in 237 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
Quote:
However this only makes .php extensions be parsed as HTML rather than php4
Because php4 is not installed on the server, you cannot select it.

Under equivalent php.ini configurations, most code that runs under php4 will run as is under php5. There are very few incompatible differences going from php4 to php5 that are due to the php version. However, a lot of existing code is NOT using the current recommend php.ini settings (in some cases still relying on things that were depreciated and turned off by default over 7 years ago) and needs to be updated in order to run under the current recommend php.ini settings, regardless of the php version.

You would be better off spending your time finding out why your code won't work under the php5 php.ini settings and fix the code.

Given that the end of life and end of support for php4 was the end of 2007, you should have already budgeted time to update the code and any new code developed after that point should already work under the current recommended php.ini settings.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

Last edited by CFMaBiSmAd; 11-04-2009 at 01:15 PM..
CFMaBiSmAd is online now   Reply With Quote
Old 11-04-2009, 03:31 PM   PM User | #3
udjamaflip
Regular Coder

 
Join Date: Mar 2008
Posts: 230
Thanks: 6
Thanked 20 Times in 19 Posts
udjamaflip is an unknown quantity at this point
Despite me asking about howto get that specific method, you decided to not answer my question but infact tell me I'm wrong. Congrats on graduating as a fully feldged troll.

The fact is that you can run them in conjuction by running php4 as a CGI module rather than apache. Then by using similiar code to above you then reference what directories use php4 and what use php5.

Thanks for your help!
__________________
Andrew Sharman
Web designer, developer and programmer.

If you found my post helpful, why not give thanks! :)
udjamaflip is offline   Reply With Quote
Old 11-04-2009, 03:46 PM   PM User | #4
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,682
Thanks: 2
Thanked 245 Times in 237 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
You got an answer to your stated symptom -
Quote:
Originally Posted by CFMaBiSmAd View Post
Quote:
However this only makes .php extensions be parsed as HTML rather than php4
Because php4 is not installed on the server, you cannot select it.
Without any relevant information from you about your server (it is common knowledge that you can selectively pick php4 and php5, but only if php4 is available), you got an answer with the best method on how to proceed to solve your problem.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
CFMaBiSmAd is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:44 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.