when I send mail to my pipe script, the script works fine, but the server also bounces the mail back to report the PHP version, outputting in the bounced message:
X-Powered-By: PHP/4.4.7
Content-type: text/html
(This is not my script mailing me; it's my original mail bouncing back. Also, this pipe works fine on another server, and the script has no output itself.) I have read that it is possible to turn off this output by setting
expose_php off
in php.ini (this option cannot be set with ini_set() ), but as I am on a shared server I don't have access to php.ini.
I then learned that it is possible to put php.ini in the same directory as the script in order to override the default php.ini. I asked my hosting provider to send me a copy of php.ini so I could make the relevant modification to expose_php and stick the file in the folder with my pipe script. They sent me a php.ini file with only the expose_php setting in it. Specifically, this php.ini file contained only:
php_flag expose_php off
Adding this file to the directory of the pipe script changed nothing, so I asked them to send the whole php.ini file, intending to edit the relevant setting myself. They declined to do for "because it includes special options that affect other clients on the server we can not disclose," and claimed that "it is possible to create a php.ini file under the local directory and just specify the options by setting only the necessary arguments that are needed for the account. This php.ini file will override the original php.ini file in the server. Therefore there is no need to have the entire php.ini file contents."
So it seems either it is not true that I can use a php.ini file in my local directory with only the required arguments specified to solve this problem (ie, just "php_flag expose_php off"), or there is some argument in php.ini in addition to "php_flag expose_php off" that needs to be specified to turn off this output.
What's the best way to fix this? Thanks for your help.