phperror-logging

Php error log Filled up with PHP Deprecated: Directive 'track_errors' is deprecated


I've recently installed php and mysql in a new windows server IIS and transferred my script there, there's a problem that after enabling error log in php manager, I just get one line error repeatedly for everything as this: PHP Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0

at the old server, error log was working great and php version is 7.4.33 in both of them.

all error loggers in php.ini is set to true but the problem still is remained in place. if I set track_errors=Off then no error will be logged in php_errors.log

Any idea of why this is happening and how to fix it?


Solution

  • Finally, I've solved the problem by changing the permission of Temp Folder.

    Before changing the Temp directory permission, I've tried using a different php.ini, the php.ini-development one, and then error log started logging, comparing my original php.ini and the new one, I've found these 3 lines maybe causing the problem as I removed them and system started logging again

    upload_tmp_dir = "C:\Windows\Temp\"
    cgi.force_redirect = 0
    cgi.fix_pathinfo = 1
    fastcgi.impersonate = 1
    

    But as there were more different configs in file, I've started checking permissions!

    Temp folder had a full access permission for IIS_USER, but for Users, it was just a limited permission. after I've changed the permission for Users to Full Access, the problem solved and errors started to show up in error log file again.