![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
Regular Coder ![]() Join Date: Mar 2008
Posts: 230
Thanks: 6
Thanked 20 Times in 19 Posts
![]() |
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 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! :) |
|
|
|
|
|
PM User | #2 | |
|
Senior Coder ![]() Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,682
Thanks: 2
Thanked 245 Times in 237 Posts
![]() ![]() ![]() ![]() |
Quote:
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.. |
|
|
|
|
|
|
PM User | #3 |
|
Regular Coder ![]() Join Date: Mar 2008
Posts: 230
Thanks: 6
Thanked 20 Times in 19 Posts
![]() |
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! :) |
|
|
|
|
|
PM User | #4 |
|
Senior Coder ![]() Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,682
Thanks: 2
Thanked 245 Times in 237 Posts
![]() ![]() ![]() ![]() |
You got an answer to your stated symptom -
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|