You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Laurent FAILLIE <l_...@yahoo.com> on 2007/09/12 23:30:59 UTC

[users@httpd] RE : [users@httpd] Re: PHP 5.2.4 with Apache 2.2.6 > 302 rather than 200?

Hi Whit,

> The PHP 5.2.4 module built against Apache 2.2.4
> works fine with both Apache
> 2.2.4 and Apache 2.2.6. So it's only when PHP 5.2.4
> is built against Apache
> 2.2.6 that I end up with Apache serving "302"
> instead of "200" to every page
> request. 

I think it's something related to your configuration,
because I built the same configuration on my
development system (Sun Ultra60 w/ Solaris 10) and on
my production one (Sun SparcStation 20 under NetBSD
3.1) and I don't have this problem at all.

The only difference compared to your build is I use
PostgreSQL instead of MySQL.

Bye

Laurent


The misspelling master is on the Web.
   _________	100 % Dictionnary Free !
  /        /(
 /  Dico  / /	Pleins d'autres fautes sur
/________/ /	
(#######( /	http://destroyedlolo.homeunix.org
Quoi, des fautes d'orthographe! Pas possible ;-D.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: PHP 5.2.4 with Apache 2.2.6 => 302 rather than 200?

Posted by Whit Blauvelt <wh...@transpect.com>.
On Thu, Sep 13, 2007 at 10:26:12AM +0200, Laurent FAILLIE wrote:

> When I spoke about configuration, I means system
> configuration in general, not only Apache's one.

Hi Laurent,

You may well be right about "system configuration in general." Still, the
question is "What?" I've now confirmed that PHP 5.2.3 built against Apache
2.2.6 also produces an Apache/PHP that serves 302s rather than pages. So:

PHP         Built Against    Run With    Result

5.2.3       Apache 2.4.4     2.4.4       works
5.2.3       Apache 2.4.4     2.4.6       works
5.2.3       Apache 2.4.6     2.4.6       302
5.2.4       Apache 2.4.4     2.4.4       works
5.2.4       Apache 2.4.4     2.4.6       works
5.2.4       Apache 2.4.6     2.4.6       302

So there appears to be something about what PHP 5.2.(3|4) includes from
Apache 2.4.6, but not Apache 2.4.4, that results in a PHP module which
causes Apache to serve 302s rather than pages to every request. And your
experience narrows this down at least to a Linux issue, perhaps only a
Gentoo Linux issue, or perhaps only the specific configuration of Gentoo I'm
running - although in most respects it's a fairly standard Gentoo, with
current ebuilds for everything except Apache & PHP (since Gentoo's current
approach to Apache is, IMHO, a mess).

I've got a bug filed with php.net, since they're probably the most motivated
to help with this - although the bug is more specific to Apache version than
PHP version. If we can track it back to something about Gentoo, I'll file a
bug there. Since I'm not using Gentoo's Apache or PHP ebuilds, there's
nothing really to file it against at this point.

Whit

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] RE : [users@httpd] Re: PHP 5.2.4 with Apache 2.2.6 => 302 rather than 200?

Posted by Laurent FAILLIE <l_...@yahoo.com>.
Hi Whit,

> Thanks for the report. If it's something related to
> configuration, the
> question is of course what. The basic configuration
> has stayed the same from
> Apache 2.0 through 2.2.6,
[...]

When I spoke about configuration, I means system
configuration in general, not only Apache's one.

Another difference with you : when I switched to 2.2,
I rebuild httpd.conf from scratch because I also
changed the way my site are managed on the server.

[...]

> Logic suggests a difference in something PHP
> includes from Apache, that has
> changed between Apache 2.2.4 and 2.2.6. Apache 2.2.6
> is newer than PHP
> 5.2.4, so it wouldn't be the PHP team's fault if
> Apache 2.2.6 breaks
> something - or the Apache team's either. But
> imagining what could produce
> this very peculiar sort of breakage is difficult, at
> least for me. Did you
> build your PHP against Apache 2.2.6 or an earlier
> Apache?

This is the way I compiled on my SS20 :
Apache 2.2.6 :

./configure --enable-info=shared --enable-cgi=shared
--enable-so \
--enable-unique-id=shared --enable-authn-dbd=shared
--enable-dbd=shared \
--with-included-apr --with-pgsql=/usr/local/pgsql
--with-expat=builtin --disable-threads

make
make install

PHP 5:

ulimit -d 131072 (because the default NetBSD value is
too small)
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-zlib --enable-exif --with-gd
--with-jpeg-dir=/usr/pkg --with-png-dir=/usr/pkg
--with-pgsql --without-pear --with-xsl --with-libxml
--with-pdo-pgsql --enable-sysvsem --enable-sysvshm

make
make install

And it's worked.

Bye

Laurent


The misspelling master is on the Web.
   _________	100 % Dictionnary Free !
  /        /(
 /  Dico  / /	Pleins d'autres fautes sur
/________/ /	
(#######( /	http://destroyedlolo.homeunix.org
Quoi, des fautes d'orthographe! Pas possible ;-D.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: PHP 5.2.4 with Apache 2.2.6 => 302 rather than 200?

Posted by Whit Blauvelt <wh...@transpect.com>.
On Wed, Sep 12, 2007 at 11:30:59PM +0200, Laurent FAILLIE wrote:

> I think it's something related to your configuration,
> because I built the same configuration on my
> development system (Sun Ultra60 w/ Solaris 10) and on
> my production one (Sun SparcStation 20 under NetBSD
> 3.1) and I don't have this problem at all.
> 
> The only difference compared to your build is I use
> PostgreSQL instead of MySQL.

Hi Laurent,

Thanks for the report. If it's something related to configuration, the
question is of course what. The basic configuration has stayed the same from
Apache 2.0 through 2.2.6, but only building PHP 5.2.4 against Apache 2.2.6
presents this strange 302 problem. Building PHP 5.2.3 against Apache 2.2.6,
no problem. Building PHP 5.2.4 against Apache 2.2.4, no problem. And PHP
5.2.4 built against Apache 2.2.4 produces a module that will run against
Apache 2.2.6 with no problem. But the the PHP 5.2.4 module built against
Apache 2.2.6 makes Apache 2.2.6 send a 302 response to every single page
request for every domain and page on the server - despite configuration
files remaining identical.

What species of wrong configuration could produce that very peculiar error
only in this particular circumstance? Nothing's throwing any errors to the
logs. Apache runs, but just serves 302s. This is on a current Gentoo Linux
system - although one that's been around for a few years, so some weirdness
may well have crept in. It's currently running PHP 5.2.4 against Apache
2.2.6 just fine - but the PHP 5.2.4 module compiled against Apache 2.2.4,
not 2.2.6.

Logic suggests a difference in something PHP includes from Apache, that has
changed between Apache 2.2.4 and 2.2.6. Apache 2.2.6 is newer than PHP
5.2.4, so it wouldn't be the PHP team's fault if Apache 2.2.6 breaks
something - or the Apache team's either. But imagining what could produce
this very peculiar sort of breakage is difficult, at least for me. Did you
build your PHP against Apache 2.2.6 or an earlier Apache?

Whit

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org