I have very limited access to settings on my server, so I need to manually set ini_set('log_errors', 1);
in my scripts. But can I in same way change the path to the error_log file, to have it in my reach?
Asked
Active
Viewed 270 times
0

Zorann
- 335
- 2
- 16
1 Answers
2
The manual says it's PHP_INI_ALL, so you can set it at runtime.
Notably that'll have no effect to any messages generated prior calling
ini_set
.Better option would be to use one of the SAPI-dependant configuration schemes (
.user.ini
or.htaccess
)
Also take in mind that the destined log path needs to be writeable by the Apache or FPM process, of course.

mario
- 144,265
- 20
- 237
- 291
-
1(CW + duplicate links, because I feel they're more detailed anyway.) – mario Feb 02 '19 at 20:10