A
A
Anton2016-12-08 15:32:01
PHP
Anton, 2016-12-08 15:32:01

php_value not working in .htaccess?

Hello, I need to enter .htaccess on the hosting, php_value error_reporting 0but when I do this, the site stops working, although everything is fine on the local

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg, 2016-12-08
@ollisso

Most likely hosting is not allowed to change PHP settings via .htaccess
3 options:
1. write to support
2. Search in hosting control panel
3. add error_reporting(0) file to PHP config; the first line
At once I will tell that it is not correct, to do error_reporting (0);
It is more correct to remove error output and redirect them to the log file
ini_set('display_errors','Off');
ini_set('log_errors', 'On');
ini_set('error_log', '/log/folder/php_error.'.date('-mY').'.log');

R
Ruslan Fedoseev, 2016-12-08
@martin74ua

Ask hosting support.

J
Jeros_Lite, 2016-12-19
@Jeros_Lite

It seems that php_value in htaccess is not supported on servers,
but as they said earlier:
1. write to support
3. add error_reporting(0) file to php config; first line

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question