Mailing List Archive

Apache crashing/generating errors on Win32 when 404 encountered
Howdy...

Hopefully the subject line explained it... but I'll explain a bit more
anyway.

I have been using IIS5 up until recently, and have now switched to Apache
because of the recent bombings on IIS, and also because I find it's
basically unreliable.

Apache is running fine with PHP 4.1.1, but I have one site for which I want
a 404 error to be handled by a PHP script, and Apache keeps giving errors
when it encounters the 404.
It adds an error to the error log, and it also throws a dialog box on the
screen of the server saying
"Apache.exe has generated errors and will be closed by Windows\nYou will
need to restart the program\n\nAn error log is being created."

The problem is that the files of course don't exist, but that's the point of
the 404 being handled by PHP - it acts upon it accordingly.

I don't mind the error being added to the error log, but even if I turn off
error logging, I still get the error message on the server, and processing
of the page stops.

Any ideas?

Thanks,

Matt Parlane
Zevi Interactive
matt@zevi.net



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache crashing/generating errors on Win32 when 404 encountered [ In reply to ]
Matt Parlane wrote:
>
> Howdy...
>
> Hopefully the subject line explained it... but I'll explain a bit more
> anyway.
>
> I have been using IIS5 up until recently, and have now switched to Apache
> because of the recent bombings on IIS, and also because I find it's
> basically unreliable.
>
> Apache is running fine with PHP 4.1.1, but I have one site for which I want
> a 404 error to be handled by a PHP script, and Apache keeps giving errors
> when it encounters the 404.
> It adds an error to the error log, and it also throws a dialog box on the
> screen of the server saying
> "Apache.exe has generated errors and will be closed by Windows\nYou will
> need to restart the program\n\nAn error log is being created."

You say PHP works already - are you sure that's true for PHP files in
the error-dir?
Please post the relevant part of your config (should be like:

ErrorDocument 404 /error-dir/error_404.php

and also the bit where you allow/enable PHPs.

Also, what exactly do you get in the error_log and in the access_log?

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache crashing/generating errors on Win32 when 404 encountered [ In reply to ]
I've seen this on Win32 when a loadable php module crashes. From my
experience, it has usually only been the current thread that crashes,
and the actual server remains running.

I would take a look at the modules you're loading in your php.ini, as
well as the modules you're using through your 404 script.

One other possibility - have you upgraded your php? If you have, it's
possible an older php library could be in your command path somewhere -
one with different hooks than your current php module. This also causes
server threads to crash from my experience.

Good Luck!

--
Pete Nelson, Web Developer
<pete.nelson@ci.stpaul.mn.us>

http://www.ci.stpaul.mn.us/

>>> matt@zevi.net 02/18/02 10:35PM >>>
Howdy...

Hopefully the subject line explained it... but I'll explain a bit more
anyway.

I have been using IIS5 up until recently, and have now switched to
Apache
because of the recent bombings on IIS, and also because I find it's
basically unreliable.

Apache is running fine with PHP 4.1.1, but I have one site for which I
want
a 404 error to be handled by a PHP script, and Apache keeps giving
errors
when it encounters the 404.
It adds an error to the error log, and it also throws a dialog box on
the
screen of the server saying
"Apache.exe has generated errors and will be closed by Windows\nYou
will
need to restart the program\n\nAn error log is being created."

The problem is that the files of course don't exist, but that's the
point of
the 404 being handled by PHP - it acts upon it accordingly.

I don't mind the error being added to the error log, but even if I turn
off
error logging, I still get the error message on the server, and
processing
of the page stops.

Any ideas?

Thanks,

Matt Parlane
Zevi Interactive
matt@zevi.net



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
RE: Apache crashing/generating errors on Win32 when 404 encountered [ In reply to ]
Hiya...

I am replying to myself because I fixed my own problem... :)

Belive it or not, Apache was not crashing because of anything to do with
404s, that was my mistaken diagnosis - it was in fact crashing because of
PHP output bufferring.
I didn't run enough test to determine exactly what part of output buffering
was the cause, but the problem went away when I decreased the amount of
information that was being buffered.

The data was being passed to a user defined function for string
replacement - maybe that was the problem - very strange though that it
caused Apache to die...

Anyway - thanks for the help.

Matt

-----Original Message-----
From: Matt Parlane [mailto:matt@zevi.net]
Sent: Tuesday, 19 February 2002 5:35 p.m.
To: users@httpd.apache.org
Subject: Apache crashing/generating errors on Win32 when 404 encountered


Howdy...

Hopefully the subject line explained it... but I'll explain a bit more
anyway.

I have been using IIS5 up until recently, and have now switched to Apache
because of the recent bombings on IIS, and also because I find it's
basically unreliable.

Apache is running fine with PHP 4.1.1, but I have one site for which I want
a 404 error to be handled by a PHP script, and Apache keeps giving errors
when it encounters the 404.
It adds an error to the error log, and it also throws a dialog box on the
screen of the server saying
"Apache.exe has generated errors and will be closed by Windows\nYou will
need to restart the program\n\nAn error log is being created."

The problem is that the files of course don't exist, but that's the point of
the 404 being handled by PHP - it acts upon it accordingly.

I don't mind the error being added to the error log, but even if I turn off
error logging, I still get the error message on the server, and processing
of the page stops.

Any ideas?

Thanks,

Matt Parlane
Zevi Interactive
matt@zevi.net



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org