Apache error.log

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Apache error.log

Post by guitarlvr »

I had installed php, mysql, and apache separately and then decided to get rid of them all and try a XAMPP install on windows. Before, when my php files ran into an error, the error.log file in apache would show the error. However with my XAMPP install, no errors get sent to error.log. Any ideas?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Firstly, please verify your in your ErrorLog in your httpd.conf is pointing to the same file as you expect. Also, what is your LogLevel set to?
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

the errorlog location just had "log\error.log" so i changed it to "C:\xampp\apache\logs\error.log". My loglevel is set to warn.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Where is the error log path set?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Oh yeah, and I moved this thread to Installation and Configuration.
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

Sorry about posting in the wrong forum.

The log file is located at c:\xampp\apache\logs\error.log.

I currently cannot start apache. i changed the logging values in httpd.conf and php.ini and when i couldnt start i set everything back. i still can't start it. i get a message in my event viewer that says it couldnt start apache because it cannot open error.log. i gave everyone permission to the logs and still no go. :-/
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

What does the error log path entry in httpd.conf say?
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

C:\xampp\apache\logs\error.log
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Change that to either:

Code: Select all

"C:\\xampp\\apache\\logs\\error.log"
or

Code: Select all

"C:/xampp/apache/logs/error.log"
and see if that helps. It might not, but then again, it might.
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

Everah wrote:Change that to either:

Code: Select all

"C:\\xampp\\apache\\logs\\error.log"
or

Code: Select all

"C:/xampp/apache/logs/error.log"
and see if that helps. It might not, but then again, it might.
the first one there was what was causing apache not to start. the second is what i needed to change the path to. why they want "/" and not "" will never make sense to me as a backslash is usually used for a path but thats beyond me. I also was able to get php to log its errors with a couple changes to the php.ini file. Thanks a bunch Everah.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Backslash '\' is an escape character in many respects. In Apache, it it used in various regular expression pattern handlings, so it needs to be escaped itself. On Windows, Apache sees the forward slash '/' as a completely acceptable path separator and will use that the same way that '\\' is used, typically.

But the cool thing is you got it fixed. Good job.
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

Everah wrote:Backslash '\' is an escape character in many respects. In Apache, it it used in various regular expression pattern handlings, so it needs to be escaped itself. On Windows, Apache sees the forward slash '/' as a completely acceptable path separator and will use that the same way that '\\' is used, typically.
I did not know that. Learn something new everyday :)
Post Reply