0

I was wondering where could I specify new path for php.ini file on Apache2 server running on Ubuntu.

Thanks in advance for all answers.

Peter Bielak
  • 643
  • 2
  • 12
  • 24
  • Perhaps this link can help you to change the path http://stackoverflow.com/questions/9269083/set-path-to-php-ini These answers bellow was copied from this link. – bcesars Dec 29 '14 at 13:46

2 Answers2

1

You have to modify the virtual hosts file to point to the new path. You will add a PHPINIDir directive to the file and then restart Apache -

<VirtualHost 2.4.6.8:80>
    PHPINIDir /path/to/php.ini
</VirtualHost>

Make sure to use your virtual host's IP address in the directive.

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
1

Use PHPINIDir path options in your vhost configuration, for example.

See more info here - http://www.howtoforge.com/how-to-specify-a-custom-php.ini-for-a-website-apache2-with-mod_php