• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP 5.3 mail.log and separate domains php.ini

DragomirE

New Pleskian
Hello,

I've got a problem, I'm trying to log all mails which are sent from php 5.3 with php.ini option

mail.log = /var/log/phpmail.log

Since each domain use it's own php.ini file, I cannot put that line to /etc/php.ini, I tried but it doesn't log. It starts working only if I add that line to domain php.ini file.
How can I add that line to all domains php.ini files, and to keep it there when the php configuration is changed from Plesk panel?

Thanks, D.
 
only with a script or manually if you really relly have small number of domains

you can get all your domains from mysql, `ls`or anything you like and create a script, use for an example "for" loop and for each domain create/or append to php.ini in /var.../<domain>/conf/php.ini
and rebuild settings for that domain:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain <domain_name>
you can do it for every domain in for loop just change domain_name being careful not to overwrite any settings if domain has php.ini from before
 
I dont know if your configuration is different then ours, but I can make customizations to the global php.ini just file. Only settings in the per-user vhost are then overwritten.
We run PP11.5 on Debian 6/7. Maybe that is different to your distribution, especially because we make the modifications in /etc/php5/conf.d/, which is a debian-style of making user modifications to config files.
 
Back
Top