0

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?

Zorann
  • 335
  • 2
  • 16

1 Answers1

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