I am using a local php.ini file at the root of my website host.
If I put the path "logs/php_error.log" for error_log in php.ini, does it look for a folder called logs in the same folder as php.ini?
The php.ini is located in the root folder (public_host) on my web server. I want to store the errors in a folder located where the php.ini is . How can I write such path in my local php.ini?
/public_html/php.ini
/public_html/logs/php_error.log
It highly depends on how you are running PHP, since you have not specified this.
Since you are using a local php.ini I assume that you are using suPHP? If yes, then the CWD of a new spawned process by suPHP resides inside the folder where the script is being called. So if you put a relative path in php.ini, it will be relative to the location of the script launched by Apache (eg. if you put it simply like "error_log", it will create an error_log file in the same directory with the script that was executed by Apache). Using suPHP, I guess it is highly recommended to just use an absolute path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With