Change PHP.ini location file?

2019-04-09 01:40发布

I'm using apache2 on OSX, by default the php.ini location is:

/private/etc/php.ini

I need to change it to this...

/Library/FileMaker Server/Web Publishing/publishing-engine/php/lion/lib/php.ini

Any help?

2条回答
太酷不给撩
2楼-- · 2019-04-09 01:59

If you are on Windows and using XAMPP, you can probably edit the file: xampp\apache\conf\extra\httpd-xampp.conf, and change the php.ini location as below:

<IfModule php5_module>
     PHPINIDir "/xampp/php-5.6.5"
</IfModule>
查看更多
兄弟一词,经得起流年.
3楼-- · 2019-04-09 02:05

Use PHPIniDir directive in apache config file after LoadModule :

example:

LoadModule php5_module /path/to/php5_module

PHPIniDir path/to/php.ini

Or set the PHPRC environment variable:

example:

export PHPRC=path/to/php.ini

查看更多
登录 后发表回答