简体   繁体   中英

Not logging PHP errors on windows IIS server

We're running an IIS website on a dedicated windows server which has Plesk 12 on it. We're having trouble getting PHP scripts to log any errors they encounter. In the php.ini we have tried setting both error_log="C:/Inetpub/vhosts/site_name/logs/php_errors.txt" and error_log="C:\\Inetpub\\vhosts\\site_name\\logs\\php_errors.txt" . We have also set error_reporting=E_ALL and log_errors=1 . When checking phpinfo() these changes are shown. Finally we have made sure the correct users have read/write permissions on the text file.

Any ideas why it isn't logging?

Actually the reason in permissions.

Provide permission for Application pool group (IWPG_) for your log file

You can do it in "File Manager": plesk-file-manager-add-permissions-1.png

plesk-file-manager-add-permissions-2.png

plesk-file-manager-add-permissions-3.png

JFYI there is also "Additional read/write permission" on domains hosting settings, it's affects whole "httpdocs" folder

Better is to call the file "php_errors.log" and put it into the log directory used by the server for the access log (ie "W3SVC6"). In this way you can see the log in plesk with all standard log features.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM