|
|||
|
Apache 2.2 with PHP4
Can someone explain why PHP4 is not recommended with Apache2.2? We cannot move to PHP5 with too many scripts being incompatible... During install there is just a note from cpanel saying 'php4 not recommended' ... no idea just why not. Is it really not a good idea.. or is it alrlght?
Thanks |
|
||||
|
Quote:
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
|||
|
Why don't you compile PHP4 and PHP5 both - set one to be the default and then test with the others. I realize you are worried that you will compile, then have problems with PHP4 because of it not working well with Apache 2.2 and then have problems with PHP5 because scripts may be incompatible. Is there some absolute need for you to move up to Apache 2.2?
Mike |
|
|||
|
I have done that with one server already. I have compiled with php4 and 5 and set php4 as the default.. but I have no need/use for php5 now and it seems like just a waste of system resources.
The move to Apache 2.2 is because the performance increase over 1.3 is huge.. very huge.. but too many scripts break in php5. Has anybody done the config I mentioned above? I still am not clear as to what kind of issues I will face with apache2.2 and php4 other than what was said above that is just not specific enough for me to get a grasp as to how extensive an issue we are talking about. |
|
|||
|
we could get php4 work as cgi or fcgi. So we compiled php4 as module and php5 as fcgi.
You would be surprised how many scripts will work with php5. From al of our customers only one with a very old "post-nuke" script didn't work. SO we sayd to the client that we only support php4 till Q1 of 2008, because of the end of life of php5. He totaly understaind and is now changing his website.... |
|
||||
|
Quote:
If you are using PHP via CGI, then you won't have issues (this includes via Fast CGI) particular to threading. See the following for more details: http://www.php.net/manual/en/faq.ins...lation.apache2 |
|
|||
|
Thanks that helps...
I have tried enabling FastCGI with PHP4 as the handler vs. dso .. however everytime I do it breaks scripts. I don't know exactly what difference it makes, but it appears scripts really do not like FastCGI handling PHP4. When running DSO they load normal. I am noticing on some of my servers that with this config.. I am getting a LOT of Write sessions that seem to stay going for a long time before they are gracefully shutdown. Could this be a symptom of running PHP4 as the default and PHP5 as the second version with Apache2.2. For PHP5 I have FastCGI as the handler. Thanks |
|
|||
|
Actually.. the scripts that don't work tend to rely heavily on .htaccess. Since this is the situation does this mean that it would be preferable to disable prefork config in apache2.2 in order for php4 to run OK with it?
Does this mean that .htaccess will only run properly under apache2.2 with php5 enabled as the default with FastCGI? |
|
||||
|
Let me rephrase:
To use settings in .htaccess files in your PHP scripts, you need to use mod_php. If you want/need to use PHP 4 as mod_php with Apache 2.2 (in order for the settings in .htaccess to work), then you need to use the prefork MPM, as it is not a threaded MPM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|