I am working on the contact form for the website. This contact form is realised through PHP. I was able to configure my local environment for this to work, but after deploying to production the functionality is gone.
From my point of view, the main reason why it is not working in production is that php.ini
does not have the same configuration as on my local machine. Here appears couple issues:
- I do not have any control on the production side, meaning I cannot access
php.ini
on the server. - Server has multiple domains connected to it, so changing the global configuration of
php.ini
would probably break something, which would be very bad.
The information I was able to find:
- Server is Windows Server 2012 R2 v6.2 with IIS 8.5.
- Plesk shows
PHP 5.4.45 running as FastCGI application
Also one of my findings was (no surprise) to start using third-party solution like Mailgun or Mandrill. Mandrill is now plugin for Mailchimp what could be very useful as I already use Mailchimp for this project. But I do not want to go third-party as the project has a server and only missing a proper config.
UPDATE:
Thanks to the answer from @oleg_neumyvakin I have found that indirect per-domain modification can be done via .user.ini
configuration or if I had access to Plesk via Additional Configuration Directives
field. Although the sendmail_path
directive is not available for .user.ini as it can be only modified in PHP_INI_SYSTEM
- global php.ini
.
My question still remains open:
- Is it possible and how exactly to do similar to my localhost
php.ini
configuration explicitly per domain (via.user.ini
) on the IIS 8.5?