Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
The Internet

An Odd PHP3/Apache Annoyance... 10

John Q. Public asks: "I have done many checks with people I know personally, and on DejaNews and still haven't found a resolution to my problem. It appears, from reading posts on DejaNews, that I'm not the only one experiencing the pheonomenon. What happens is, while viewing certain PHP3 scripts under Netscape I get a "Connection Reset By Peer" message. Oddly enough, it doesn't happen under other browsers. We are using PHP 3.0.12, Apache 1.3.6 and are integrating it all with MySQL 3.22.23b on top of RedHat 6.0. I normally wouldn't think to turn to slashdot for all of my problems but it appears that I'm not the only one fighting this problem, perhaps someone out there knows whats going on." Any clues?
This discussion has been archived. No new comments can be posted.

An Odd PHP3/Apache Annoyance...

Comments Filter:
  • Check if httpd processes die in some odd way.

    Check the list of apache httpd processes and look if any of them disappeared when connection dropped. If they did, use strace -p on processes that are about to die to confirm that they died on some signal (repeat tests until process that you are strace'ing will get the request). Then if it indeed a crash use gdb (with "attach" command) to catch the moment of crash in the same way.

    Or install fhttpd with php module enabled on some testing box, change php module configuration from local (that is set by default in root-fhttpd.conf but commented out) to remote (comment out the "tail" of php application definition fhttpd.conf, starting from /usr/local/sbin/php), restart fhttpd and run fhttpd php module manually, connecting it with fhttpd, entering password, etc. under gdb. If php will crash, gdb will catch it. If it won't, you still have gdb to figure out what happened.

  • See my previous comment. fhttpd, FTP/HTTP server that I wrote, runs its modules, including php, as separate processes (possibly under different uids and even on different boxes/terminals/... if user configures so), so among other benefits, reliability of the server does not significantly decrease if one module is broken, and debugging/tracing/... of modules is actually doable with existing tools.
  • We had this problem at linuxpower 10 months or so ago... the problem ended up being a few spurious mysql_connect rather than mysql_pconnect being used. Moral of the story: use mysql_pconnect() rather than mysql_connect().
  • I was having the same thing occur. The circumstances were quite strange since I had two nearly identical boxes configured and the (dev machine) one on the local LAN didn't exhibit the behaviour. AND I did get it to occur with other browsers. I used tcpdump to sniff the HTTP headers and everything... the server was simply doing TCP RST on certain connections.

    But I digress. The problem mysteriously fixed itself after I upgraded to a newer kernel. I am currently running 2.2.10 without the problem surfacing. I had previously tried upgrading and downgrading every other piece of software (Apache, PHP, mod_ssl, etc) involved with no changes in behavior. I'm still not sure why the kernel was only doing it to these particular connections, but it got fixed *shrug*.

    The site that is currently running with no problems (among a couple others) is Vantage Games [vantagegames.com]. Which is currently running:
    MySQL 3.22.23b
    Apache/1.3.6 (Unix) PHP/3.0.11 mod_ssl/2.3.5 OpenSSL/0.9.3a
    And the kernel is self compiled 2.2.10 SMP
    ---
    Don Rude - AKA - RudeDude

  • Try my install-webserver script at http://members.xoom.com/xeer/
    It installs apache, php and mysql from source and makes it quite easy too..

    Just follow the software link when you get to the above page.
  • I apologize for this not answering the question asked,

    but I have been pulling my hair out over the past week trying to coax php to compile on my rh 6.0 box. I installed the latest MySQL rpms from the MySQL website, the freetype rpm, the apache, and apache-dev rpm, ran ./configure -options and then tried to compile the php, and got to make where it promptly spat out a [language.tab.o] error. I am going back to use the source files for all the apps to start all over again, but I would be very appreciative to hear your install details.

    Thanks lots.

  • You are correct, you win the prize.

    I believe it's in a recent ChangeLog - probably the one for 3.0.12.
  • "Connection reset by peer" is a rather strange message. Check your error log. If it says something about receiving signal 11 (sigsegv) you should follow these instructions [php.net] and post a PHP bug report.

    Also make sure to always use the latest available release. 3.0.12 is already very stable, future releases of the php3 tree will only feature bug fixes.
    --
    OS lover

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...