Page 1 of 1

How to enable PHP error logging with xampp?

PostPosted: 03. June 2010 23:04
by funkybabeluba
I understand that PHP error logging is off by default in xampp, right?
So I tried to turn it on by the following entries in C:\xampp\php\php.ini:

log_errors = On
error_log = "C:\xampp\apache\logs\php_error.log"

Restarted Apache, but nothing appears in the php_error.log file.

Any suggestions?

Regards,
Arne

Re: How to enable PHP error logging with xampp?

PostPosted: 04. June 2010 12:04
by JonB
Hi

I hate to ask the obvious, but did you induce errors in some of your scripts? no errors - no log.

8)

Re: How to enable PHP error logging with xampp?

PostPosted: 04. June 2010 12:50
by funkybabeluba
Yes I did. Errors appear on screen, but not in the log file.
I also tried to set display_errors = Off, and the errors where not displayed on the screen, as expected (so I'm using the correct php.ini file).
BTW, the error file has write permissions for all users, so that's not the problem either.
I also tried double backslashes for the file path, but it didn't help.

I'm using Windows Vista and the lastest xampp version.

JonB wrote:Hi

I hate to ask the obvious, but did you induce errors in some of your scripts? no errors - no log.

8)

Re: How to enable PHP error logging with xampp?

PostPosted: 04. June 2010 13:24
by JonB
Hmmmm

I tested my settings and it all worked to plan. LOL, I didn't have to induce errors, I had a new script to try to get working! :lol:

Originally I thought whether vhosts were involved might bear on it, but it doesn't seem to.

I'm stumped at the moment.

:shock:

Re: How to enable PHP error logging with xampp? - SOLVED

PostPosted: 04. June 2010 14:10
by funkybabeluba
I reinstalled xampp as administrator, and then the log file appeared as expected. :) :)

Thanks for your efforts anyway! :)

Arne

Re: How to enable PHP error logging with xampp?

PostPosted: 04. June 2010 21:36
by Altrea
I just wanted to quote MC10, who said the following in thread http://community.apachefriends.org/f/viewtopic.php?t=40718
MC10 wrote:Actually, you don't need to run the install script as Administrator. It works fine even if you don't.


Maybe he can explain you, what went wrong the first time.

P.S.: Never mind, I was being a little sarcastic :mrgreen: