Error from PHP log: Invalid command 'php_flag'
Error from PHP log: Invalid command 'php_flag'
I get this error:
Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
It brings 500 server error when I visit URL
It is caused by my htaccess which Was working until I installed myvesta. What should I edit in PHP.ini to make this work ( I don't want to mess things up)
Htaccess code:
Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
It brings 500 server error when I visit URL
It is caused by my htaccess which Was working until I installed myvesta. What should I edit in PHP.ini to make this work ( I don't want to mess things up)
Htaccess code:
Code: Select all
ErrorDocument 404 /404/index.php
<Files "settings.json">
Order Allow,Deny
Deny from all
</Files>
php_flag display_errors 1
php_flag display_startup_errors 1
php_value error_reporting 2047
Re: Error from PHP log: Invalid command 'php_flag'
You can't use php_ flags in .htaccess since PHP is not in Apache but in PHP-FPM.
You can just remove those lines from .htaccess and set those values to PHP-FPM pool.d conf files - viewtopic.php?f=18&t=54
So, in /etc/php/7.x/fpm/pool.d/your-domain.com.conf you can add:
After you make the changes, you should restart php-fpm (do it in SSH, as root):
(where 7.x is 7.3 for example)
You can just remove those lines from .htaccess and set those values to PHP-FPM pool.d conf files - viewtopic.php?f=18&t=54
So, in /etc/php/7.x/fpm/pool.d/your-domain.com.conf you can add:
Code: Select all
php_admin_flag[display_errors] = 1
php_admin_flag[display_errors] = 1
php_admin_value[error_reporting] = 2047
Code: Select all
sudo systemctl restart php7.x-fpm