php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27583 Not enough info on Apache 2 issues
Submitted: 2004-03-12 19:43 UTC Modified: 2004-07-23 17:45 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:3 (60.0%)
From: stewart dot james at vu dot edu dot au Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
 [2004-03-12 19:43 UTC] stewart dot james at vu dot edu dot au
Description:
------------
www.php.net/install.apache2 says not to use php4 + apache2 in a production environment, however, the reason for it is not stated.

A search of the bug database for apache2 did not enlighten the statement either.

Statements such as this would benefit from qualification immediately below it allowing easy access to the reasons why apache2 should not be used with php4 in production.



Expected result:
----------------
Enlightenment as to why apache2 and php4 is bad

Actual result:
--------------
Frustration as enlightenment was not achieved ;)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-12 20:10 UTC] kennyt@php.net
Is that really our position on the issue, anyway? The PHP core is perfectly stable on Apache 2 -- It's just a few extensions that cause trouble... We should probably be saying that instead of just rejecting Apache 2 entirely.
 [2004-03-13 06:07 UTC] derick@php.net
But if we do that then we can expect much more useless bugreports, so the current statement is safe, we just need to clarify it.
 [2004-03-13 17:10 UTC] nlopess@php.net
This was already discussed in #27323.

But Derick, what do you think that needs to be changed in the documentation?
I may add whatever you decide that's worth change.
 [2004-03-13 17:39 UTC] stewart dot james at vu dot edu dot au
I read 27323.

As a admin I plead ignorant to apache2 at the moment. I resolved to worry about it one the apache group were pushing it as the best.

Last week I hit the apache website - curious as to where they were up to and found that their site indicates that apache2 is the best option. Their download pages say "apache2 is the best available version" and "also available apache1.3"

I bring this up as 27323 and the apache group obviously have a difference of opinion on apache2, perhaps the difference is only when apache2 is running threaded? In which case perhaps php and apache2 would be OK in production on non threaded apache2 servers? Which of course should be reflected in the documentation :)

:) Stewart
 [2004-03-13 18:26 UTC] rasmus@php.net
We are not talking about just Apache2 here.  We are talking about Apache2+an MPM+PHP+3rd Party Libs.  The folks at apache.org are only concerned with Apache2 itself, and for serving up static files it is better than Apache1 in many respects.  However we have to worry about a lot more stuff here.  In fact, we couldn't care less about serving up static files.  The main issues as I see them are:

1. Thread safety issues.
   - It is very difficult to track down threading problems and we don't have decent tools to help us.
   - The thread safety of many 3rd party libraries are unknown quantities and can depend on the OS, libc and even compile flags.
   - Many distributions seem to ship with the Worker MPM as the default and that is the MPM that gets the most attention.  This is a hybrid multi-process, multi-threaded MPM.

2. You can eliminate the threading problem by running the prefork MPM which effectively makes Apache2 behave just like Apache1 in the way it forks processes and serves one request  at a time per process.  Issues here:
   - Apache2 itself is rather fringe still.  It has approximately a 5% marketshare vs. 65% for Apache1 at the time of this and out of that I would guess the majority are running the Worker MPM.  So we are talking about a fringe MPM in a fringe server.  This means it has not had anywhere near the attention from people running large production web server farms that it needs for me to comfortably say that this is a solid piece of code with all the kinks worked out.
   - The benefits of moving to Apache2+prefork are questionable.  The new filter API would be one of the benefits, but it still has some issues and by default we run PHP as a handler, not a filter currently.  You can optionally run it as a filter but people have had problems with that.

Until such a time when enough clueful PHP people think there are enough realworld useful features in Apache2-prefork or even Apache2-threaded to actually sit down and bang away at PHP and the majority of the PHP extensions under Apache2.  Or if enough regular users report back that they tried it and had absolutely no problems then we will change our reccomendation, but for the time being I don't think that we in good faith can tell users that Apache2+PHP is something they should be putting into production.  
 [2004-03-14 02:19 UTC] stewart dot james at vu dot edu dot au
Ahhh enlightenment :)

That gives me alot of info as to the issues with apache2 and php and why php is considered bad.

Added to that the PHP group seem to be facing a chicken and the egg scenario. Alot of sites probably will not shift to PHP (I know my servers won't be) until php is considered safe for apache2. So I guess in large respects apache2 could stay fringe for php deployments.

My...recent eagerness...to see apache2 and php in production started with subversion being released..among other things. 

Seems to be a real chicken and egg scenario the php group is faced with. apache2 is fringe. Once apache2 has a higher market share, then more people will probably code and get php to work well with apache2. But considering the popularit of apache2+php, apache2 probably won;t increase market share significantly until either php and apache2 are considered safe for a production environment or apache1.3 is dropped by the apache group.

Anyway back to this bug report. Much of what was said in the previous post gave me sufficient information to give me enlightenment. I am sure it would for others as well. Perhaps that could be included in the docs?

Cheers - and thanks for the enlightening,

Stewart
 [2004-03-14 12:33 UTC] rasmus@php.net
I suppose it is a bit of a chicken and egg situation with the one exception that we have a nicely working chicken already.

Also note that you do not need Apache2 for SubVersion.  You can use the standalone svnserve instead.  See http://lxnt.info:8888/book/book.html#svn-ch-5-sect-4.2
 [2004-03-14 18:27 UTC] stewart dot james at vu dot edu dot au
Reading the first comment your probably right the chicken itself is fine just some of the feathers need fixing (e.g. some extentions abnd their libs being the issue not core PHP) - at least thats just info from reading the first reponse to this bug report.

Thanks for the tip on subversion. Will look into that this week.
 [2004-03-19 01:37 UTC] rick at alpinenetworking dot com
I for one would much prefer to use php on apache 2.  One of the main reasons for this is that just about every linux distro known to man won't install apache 1.3 for me anymore.  I have to manually install it and manually do all of the updates or look to a 3rd party to get package files for whatever distro I happen to be installing on.

It would be much nicer if I could just use the version of apache that came with the distro and use the standard update tools to do security/version updates.  It seems like there is no really good reason not to except "well it's no better and nobody really wants it."  I'll bet that a lot more people would start running php on apache2 once it became stable.

Is there anyway to make it so that php will only run on the prefork MPM so that you can at least say that php is stable under those conditions?  It seems like that would satisfy the people who want to use php on apache 2 but not force you to deal with the thread safety issues for now.
 [2004-03-19 07:11 UTC] anon at example dot com
It's true that we have a fully evolved 'Chicken' under Unix. However, under Windows, it's still in its pre-chicken state. A2 deals with that. It's what the APR is all about, dealing with poor POSIX conformance under windows.  

In my experience it does work better than A1 with PHP4, but persuading people of that is hard because of the notice the PHP developers have put up.  

<rant> Remember some people *have* to run MS Windows-- the decision out of their hands. And that is quite apart from the fact that there are (shriek! heresey!) situations where it is more appropriate than Unix.</rant>
 [2004-04-27 15:09 UTC] jlx at surfeu dot de
unable to get apache2.0.49 work with php4.3.6 and use php as a static library, only the dso version works :-(
 [2004-05-05 18:19 UTC] okapi at yahoo dot com
Can we have adjusted the information on the PHP apache 2 manual page http://www.php.net/manual/en/install.apache2.php) from:

> *Warning*
>
> Do not use Apache 2.0 and PHP in a production environment 
> neither on Unix nor on Windows.

To something more clear. This line has been the death to many to try Apache 2. The statement should be more along the lines of "Some PHP modules are not fully tested for running in the default multithreaded environment of Apache 2. Core functions should be safe for this environment. To be extra careful, it is recommended to run Apache 2 in prefork mode which should avoid problems as it runs similar to Apache
1.3.x in this mode." Something along the lines of this and then for there to be a list of modules tested / check and not tested which could have problems. A comment was made:

"The PHP core is perfectly stable on Apache 2 -- It's just a few extensions that cause trouble... We should probably be saying that instead of just rejecting Apache 2 entirely."

This single ambigous line of "Do not use..." is not productive.
 [2004-06-16 14:59 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2004-07-16 00:19 UTC] glm at cyborgspiders dot com
Some extensions are not stable, anyone care to comment on which extensions are stable.

Greg Magnusson
Cyborg Spiders Web Development
 [2004-07-16 00:33 UTC] philip@php.net
This needs to be in the faq and linked to from the apache2 installation docs.
 [2004-07-16 12:08 UTC] nlopess@php.net
It is already linked from the new installation chapter.
 [2004-07-19 19:17 UTC] philip@php.net
The link has been in language-snippets.ent (within the warn.apache2.compat entity) for over five weeks, the manual was built a week ago, yet the change doesn't show up.  This is not good.

For those wanting to see the faq:
http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2

 [2004-07-23 17:45 UTC] philip@php.net
The language-snippets.ent problem now exists in bug #29353
 [2004-07-26 14:55 UTC] okapi at yahoo dot com
Can we add a link to the new Installation Chapter - Apache 2 info to the Apache 2 install info in http://www.php.net/manual/en/install.apache2.php ? Also, the answer to the question in the install chapter still seems to be disappointingly not recommending Apache 2 in a prefork mode. Why is this the case? The only negative issue I've heard of Apache 2 / PHP is in threading mode. If that mode is not used, why can it not be the recommended or atleast a recommended platform. Is there any other reasoning behind trying to stick with Apache 1.3?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC