phplinuxwordpressdebianopenlitespeed

Can't get php.ini to output error_log (Wordpress, Debian, OpenLiteSpeed)


After realizing I get an "Error 500" when updating/publishing a page (post.php), I checked if I had logs.

display_logs was Off in my php.ini file (Found with php --ini)

I checked on the OLS docs here: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:enable-php-error_log

I had to add: error_log = /var/log/php_error_log

I also made sure to have error_reporting = E_ALL

Finally, I had to change display_errors to On

I then saved, verified it saved correctly and then forced another error 500 from post.php

No file "php_error_log" was created.

Do I need to create it myself?

What am I missing?

EDIT: I created a PHP page on my webserver's root to check if maybe I'm not using the right PHP.INI file.

I created a simple 1.php file with this inside:

<?php 
phpinfo();
?>

I then loaded the page and it's all blank.

EDIT (2): Caught my error:

[STDERR] PHP Fatal error:  Uncaught Error: Call to undefined method Normalizer::isNormalized() in /var/www/html/wp-content/plugins/cloudflare/vendor/symfony/polyfill-intl-idn/Idn.php:338
Stack trace:
#0 /var/www/html/wp-content/plugins/cloudflare/vendor/symfony/polyfill-intl-idn/Idn.php(163): Symfony\Polyfill\Intl\Idn\Idn::process()
#1 /var/www/html/wp-content/plugins/cloudflare/vendor/symfony/polyfill-intl-idn/bootstrap.php(140): Symfony\Polyfill\Intl\Idn\Idn::idn_to_ascii()
#2 /var/www/html/wp-content/plugins/cloudflare/src/WordPress/WordPressClientAPI.php(18): idn_to_ascii()
#3 /var/www/html/wp-content/plugins/cloudflare/src/WordPress/Hooks.php(148): CF\WordPress\WordPressClientAPI->getZoneTag()
#4 /var/www/html/wp-content/plugins/cloudflare/src/WordPress/Hooks.php(442): CF\WordPress\Hooks->purgeCacheByRelevantURLs()
#5 /var/www/html/wp-includes/class-wp-hook.php(307): CF\WordPress\Hooks->purgeCacheOnPostStatusChange()
#6 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#7 /var/www/html/wp-includes/plugin.p in /var/www/html/wp-content/plugins/cloudflare/vendor/symfony/polyfill-intl-idn/Idn.php on line 338

Any idea on how to proceed?


Solution

  • Issue was caused by Cloudflare plugin and identifiable via the OpenLiteSpeed error log.