Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
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 :) – Kyle May 4 '12 at 20:13

Your Answer


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.