I'm having a beast of a time trying to get my PHP error_log() calls to actually log anything. I'm using OSX El Capitan, all the latest updates installed (I'm on 10.11.4 right now), but the error_log() calls just refuse to write anything.
Here's how I have my httpd-vhosts.conf set up:
NameVirtualHost *:80
<VirtualHost local.mysite:80>
ServerAdmin myfakeemailaddress@noneofyour.biz
DocumentRoot "/Volumes/Coding/mysite/"
ServerName local.mysite:80
<directory "/Volumes/Coding/mysite/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</directory>
php_value error_log "/Volumes/Coding/mysite/error.log"
CustomLog "/Volumes/Coding/mysite/access.log" common
</VirtualHost>
The error.log file's permissions are such that anybody in the freakin' universe can do whatever they freakin' want with it, so it's not a permissions issue.
The php.ini file confirms that the error log file is exactly where it's specified above.
I'm using CodeIgniter 3. In the config.php file, I have these lines:
$config['log_threshold'] = 4;
$config['log_path'] = '/Volumes/Coding/mysite/error.log';
The "mysite" folder also has its permissions set to allow writing.
So what else should I be checking?
Well, this was an experience...
Turns out that logging is off by default, and there was no php.ini to enable it. I added a php.ini that simply had this line:
log_errors = On
I threw a test error_log() into the index.php file and...it worked! However, the other error_log() commands I put in were not firing.
After some struggling, turned out I had COMPLETELY FORGOTTEN that the code where the error_log() wasn't firing was...code that is no longer used! I forgot that I moved that functionality over to AngularJS...
Anyway, problem solved!