How to enter multiple php values ​​in .htaccess?

I am editing a .htaccess file to do some overwriting in the php.ini file (I do not have access to it). So far I have added:

php_value max_execution_time 600
php_value error_reporting E_WARNING
php_value log_errors Off

The application that I am editing for (vTiger CRM) recommends setting the "error_reporting" parameter to "E_WARNING" and "E_NOTICE". When I insert this value, I get an error of 500. How to add the correct error_reporting values? Thank.

+3
source share
3 answers

Using constants, such as E_WARNING, does not matter outside of PHP - and when you write a file .htaccess, you are outside of PHP. (e.g. documentationerror_reporting )

, , :


, , - PHP script .

:

<?php
var_dump(E_ALL & ~E_NOTICE);

:

int 30711

( , , ^^)

+6

php .htaccess. . , .

0

- , , ini_set() php script, php-.

ini_set('max_execution_time', '600');
ini_set('error_reporting', E_WARNING);
ini_set('log_errors', '0');

phpite ini.list.php , , ini php.ini. ( , ). 3 , , .

0
source

Source: https://habr.com/ru/post/1733779/


All Articles