1

We are having this issues in shared hosting environment. FYI: Under shared hosting environment each user can have a php.ini in their folder to override the global settings.

There will be many users in /home/many-users/public_html/php.ini (here, he can override the values) Example: safe_mode = Off

I want certain headers in PHP.INI should not be changed or controlled by clients (who are /home/many-users/)

These following headers should not be overridden by any user in this /home/*

mail.add_x_header = On
mail.log = /var/log/phpmail.log
;smtp_port = 25
sendmail_path = /usr/local/bin/logging_sendmail

Please tell me how can I achieve this ?

1
  • We are using cagefs with phpselector and cloudlinux os
    – Mani
    Dec 11 '14 at 15:08
0

Edit the file with the following content.

vim  /etc/cl.selector/global_php.ini

;smtp_port = 25
sendmail_path = /usr/local/bin/logging_sendmail

mail.add_x_header = On
mail.log = /var/log/phpmail.log

and then run this following command. /usr/sbin/cagefsctl --setup-cl-selector

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.