Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running XAMPP on Windows 7. error_log("test") doesn't output to the my error_log specified in my vhost config (although the access log specified in the same config) does work.

Any ideas?

<VirtualHost *:80>
  DocumentRoot "c:\Users\User\Example"
  ServerName example.local

  CustomLog "C:\Users\User\Program\logs\local_access.log" combined
  ErrorLog "C:\Users\User\Program\logs\local_error.log"

  <Directory "C:\Users\User\Program">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
share|improve this question

1 Answer 1

up vote 1 down vote accepted

I don't use XAMPP a lot, but a quick look at the included php.ini file (php/php.ini) shows that error_log (the path to the log file, not the function used log an error) is set (to php/logs/php_error.log).

Having this value set would override the default error logging behaviour, and log to the specified file instead of sending the error to mod_php/Apache.

As per the documentation:

error_log string

Name of the file where script errors should be logged. The file should be writable by the web server's user. If the special value syslog is used, the errors are sent to the system logger instead. On Unix, this means syslog(3) and on Windows NT it means the event log. The system logger is not supported on Windows 95. See also: syslog(). If this directive is not set, errors are sent to the SAPI error logger. For example, it is an error log in Apache or stderr in CLI.

share|improve this answer
    
This is what it was! Thanks, now I have an error_log I go through :) –  Emile May 4 '12 at 20:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.