You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matt Parlane <ma...@zevi.net> on 2002/02/19 05:35:06 UTC

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 failed to start

Posted by rc <e_...@yahoo.com>.
Many thanks for your help. It is working again. :)

Ray



-----Original Message-----
From: obo@bourse.ch [mailto:obo@bourse.ch]
Sent: Wednesday, February 20, 2002 2:15 AM
To: users@httpd.apache.org
Subject: Re: Apache failed to start

rc wrote:
>
> $ grep -i "user" httpd.conf
> LoadModule userdir_module     modules/mod_userdir.so
> LoadModule usertrack_module   modules/mod_usertrack.so
> AddModule mod_userdir.c
> AddModule mod_usertrack.c
>
> And nothing for "group".
>
> Where do I add the group in httpd.conf?

OK - so you have neither a "User" nor "Group" directive. So please add
the following to your httpd.conf at the server config level (i.e. not
inside a virtual host or directory container - near the top, probably
after your ServerRoot directive):

User  apache
Group apache

Then it should work.

As I said in my first response - there is a bug in 1.3.22 that if you
don't define these directives, the defaults don't work...

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 


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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 failed to start

Posted by Owen Boyle <ob...@bourse.ch>.
rc wrote:
> 
> $ grep -i "user" httpd.conf
> LoadModule userdir_module     modules/mod_userdir.so
> LoadModule usertrack_module   modules/mod_usertrack.so
> AddModule mod_userdir.c
> AddModule mod_usertrack.c
> 
> And nothing for "group".
> 
> Where do I add the group in httpd.conf?

OK - so you have neither a "User" nor "Group" directive. So please add
the following to your httpd.conf at the server config level (i.e. not
inside a virtual host or directory container - near the top, probably
after your ServerRoot directive):

User  apache
Group apache

Then it should work.

As I said in my first response - there is a bug in 1.3.22 that if you
don't define these directives, the defaults don't work...

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 failed to start

Posted by rc <e_...@yahoo.com>.
$ grep -i "user" httpd.conf
LoadModule userdir_module     modules/mod_userdir.so
LoadModule usertrack_module   modules/mod_usertrack.so
AddModule mod_userdir.c
AddModule mod_usertrack.c

And nothing for "group".

Where do I add the group in httpd.conf?

Ray

-----Original Message-----
From: obo@bourse.ch [mailto:obo@bourse.ch]
Sent: Tuesday, February 19, 2002 11:14 AM
To: users@httpd.apache.org
Subject: Re: Apache failed to start

rc wrote:
>
> Yes, they do exist.
>
> This is the result:
>
>  uid=48(apache) gid=48(apache) groups=48(apache),50(ftp),100(users)

Splendid. Now what do you have in httpd.conf? Do:

$ grep -i "user" httpd.conf

and

$ grep -i "group" httpd.conf

and see if they are both set to "apache".

---------------------------------------------------------------------
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 


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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 failed to start

Posted by Owen Boyle <ob...@bourse.ch>.
rc wrote:
> 
> Yes, they do exist.
> 
> This is the result:
> 
>  uid=48(apache) gid=48(apache) groups=48(apache),50(ftp),100(users)

Splendid. Now what do you have in httpd.conf? Do:

$ grep -i "user" httpd.conf

and

$ grep -i "group" httpd.conf

and see if they are both set to "apache".

---------------------------------------------------------------------
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 failed to start

Posted by rc <e_...@yahoo.com>.
Yes, they do exist. 

This is the result:

 uid=48(apache) gid=48(apache) groups=48(apache),50(ftp),100(users)

-----Original Message-----
From: obo@bourse.ch [mailto:obo@bourse.ch]
Sent: Tuesday, February 19, 2002 10:52 AM
To: users@httpd.apache.org
Subject: Re: Apache failed to start

rc wrote:
>
> Thanks for the suggestion. But the user, apache, already exist in the
> /etc/passwd. As for the User directive I looked at
>
> <IfModule mod_userdir.c>
>     UserDir public_html
> </IfModule>
>
> I left it as default.  Where else can I check for userdir?

I said "User", not "UserDir" - they are different directives which do
different things.

What do you have for the directives "User" and "Group"?

Do those entities exist on your system? To test, if the USer directive
is set to "apache", do:

$ id apache

and report the results.

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 


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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 failed to start

Posted by Owen Boyle <ob...@bourse.ch>.
rc wrote:
> 
> Thanks for the suggestion. But the user, apache, already exist in the
> /etc/passwd. As for the User directive I looked at
> 
> <IfModule mod_userdir.c>
>     UserDir public_html
> </IfModule>
> 
> I left it as default.  Where else can I check for userdir?

I said "User", not "UserDir" - they are different directives which do
different things.

What do you have for the directives "User" and "Group"?

Do those entities exist on your system? To test, if the USer directive
is set to "apache", do:

$ id apache

and report the results.

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 failed to start

Posted by rc <e_...@yahoo.com>.
Thanks for the suggestion. But the user, apache, already exist in the
/etc/passwd. As for the User directive I looked at

<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

I left it as default.  Where else can I check for userdir?

Ray

-----Original Message-----
From: obo@bourse.ch [mailto:obo@bourse.ch]
Sent: Tuesday, February 19, 2002 7:24 AM
To: users@httpd.apache.org
Subject: Re: Apache failed to start

rc wrote:
>
> There is already a username and group for the apache server. It came
default
> with a user and a group name "apache".

Yes - but does this user exist on your system? Is apache in /etc/passwd?
- read the message again "...you probably need to modify the User
directive..."

If you can't be bothered fixing it, upgrade to 1.3.23 which has the bug
removed.

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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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 failed to start

Posted by Owen Boyle <ob...@bourse.ch>.
rc wrote:
> 
> There is already a username and group for the apache server. It came default
> with a user and a group name "apache".

Yes - but does this user exist on your system? Is apache in /etc/passwd?
- read the message again "...you probably need to modify the User
directive..." 

If you can't be bothered fixing it, upgrade to 1.3.23 which has the bug
removed.

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 failed to start

Posted by rc <e_...@yahoo.com>.
There is already a username and group for the apache server. It came default
with a user and a group name "apache".

-----Original Message-----
From: obo@bourse.ch [mailto:obo@bourse.ch]
Sent: Tuesday, February 19, 2002 5:49 AM
To: users@httpd.apache.org
Subject: Re: Apache failed to start

rc wrote:
>
>  Can someone please tell me how to find out what these errors messages
mean?
>
> [Mon Feb 18 18:50:54 2002] [alert] (2)No such file or directory: getpwuid:
> couldn't determine user name from uid 4294967295, you probably need to
> modify the User directive
...

This is a minor bug in 1.3.22 if you don't set User or Group. Do you
have a username for the apache server? If so, set User and Group to this
user. If not, create a user (e.g. "apache") belonging to e.g. group
"users" then do:

User  apache
Group users

and restart.

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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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 failed to start

Posted by Owen Boyle <ob...@bourse.ch>.
rc wrote:
> 
>  Can someone please tell me how to find out what these errors messages mean?
> 
> [Mon Feb 18 18:50:54 2002] [alert] (2)No such file or directory: getpwuid:
> couldn't determine user name from uid 4294967295, you probably need to
> modify the User directive
...

This is a minor bug in 1.3.22 if you don't set User or Group. Do you
have a username for the apache server? If so, set User and Group to this
user. If not, create a user (e.g. "apache") belonging to e.g. group
"users" then do:

User  apache
Group users

and restart.

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


Apache failed to start

Posted by rc <e_...@yahoo.com>.

 Can someone please tell me how to find out what these errors messages mean?

[Mon Feb 18 18:50:54 2002] [alert] (2)No such file or directory: getpwuid:
couldn't determine user name from uid 4294967295, you probably need to
modify the User directive
[Mon Feb 18 18:50:54 2002] [alert] (2)No such file or directory: getpwuid:
couldn't determine user name from uid 4294967295, you probably need to
modify the User directive
[Mon Feb 18 18:50:54 2002] [alert] (2)No such file or directory: getpwuid:
couldn't determine user name from uid 4294967295, you probably need to
modify the User directive
[Mon Feb 18 18:50:55 2002] [notice] Apache-AdvancedExtranetServer/1.3.19
(Linux-Mandrake/3mdk) mod_ssl/2.8.4 OpenSSL/0.9.6 PHP/4.0.6 configured --
resuming normal operations
[Mon Feb 18 18:50:55 2002] [notice] suEXEC mechanism enabled (wrapper:
/usr/sbin/suexec)
[Mon Feb 18 18:50:55 2002] [alert] (2)No such file or directory: getpwuid:
couldn't determine user name from uid 4294967295, you probably need to
modify the User directive
[Mon Feb 18 18:50:56 2002] [alert] Child 11956 returned a Fatal error...
Apache is exiting!


Thanks.



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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

Posted by Owen Boyle <ob...@bourse.ch>.
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

Posted by Matt Parlane <ma...@zevi.net>.
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