Timo002
Timo002

Reputation: 3208

Apache: Changes to php.ini not picked up

I know that this question is asked a thousand times, but none has given me the correct answer.

I'm trying to get mailhog working and therefor I need to change the sendmail_path. I haven't installed sendmail by the way. So I changed my php.ini file, but the changes aren't picked up.

When I run phpinfo() it tells me that the loaded configuration file is:

/etc/php/7.1/fpm/php.ini

I edited this php.ini file, restarted apache, but no success. I also restarted php7.1-fpm, no succes either. Restarting the whole server also does not change a thing.

When running from CLI, it uses a different php.ini file > /etc/php/7.1/cli/php.ini. I updated this .ini file, restarted apache and from CLI it works fine.

So the issue is that I can't get this working for php-fpm. What else can I do?

Upvotes: 1

Views: 1159

Answers (1)

Timo002
Timo002

Reputation: 3208

I got it fixed on in a different way.

I added a my.ini file in the /etc/php/7.1/fpm/conf.d/ directory. Added my own modifications to the file and restarted apache and fpm.

Now it picks up te changes and all is working. So the file is added to the Scan this dir for additional .ini files.

Upvotes: 1

Related Questions