How can I get FastCGI to work properly and still monitor PHP errors?

105 Views Asked by At

I encounter a FastCGI problem when setting the PHP parameter 'track_errors' to 'On' in my Windows 11 Pro development environment. It is not just a Deprecation Warning in the PHP-generated log-file, but it leads to a FastCGI crash of certain webpages! History: I started with setting up PHP v.8.2.7 in order to run CMS Joomla v.4.3.3 (in my Development environment). This combination led to the HTTP Error 500.0 - Internal Server Error: 'The FastCGI process terminated unexpectedly'. Because PHP version 8.2.7 is too new for Joomla4, I reverted to PHP v.8.0.29 . But, even without installing Joomla4, I still get the same FastCGI crash with this 'older' version of PHP.

The crash is caused by my setting within IIS10: PHP Manager | Configure error reporting : Select Development Machine (verbose error reporting). When I choose Development Machine, IIS10 will put 2 new lines in php.ini:

    track_errors = On
    html_errors = On

Setting 'track_errors' to 'On' causes the webpage (http://localhost/phpinfo.php) to crash! Changing the line 'error_reporting = E_ALL & ~E_DEPRECATED' to 'error_reporting = E_ALL' (or commenting-out this line) does not resolve the FastCGI crash.

How can I monitor errors in development environment, while keeping the benefits of FastCGI and WinCache?

Kind regards, Sthop Environment: Windows 11 pro, IIS 10, PHP 8.0.29, MySQL 5

0

There are 0 best solutions below