Change PHP.ini location file?
Asked Answered
B

2

7

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?

Bonanno answered 5/10, 2013 at 17:16 Comment(0)
F
7

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

Fulgurant answered 5/10, 2013 at 17:30 Comment(3)
Ok I did that, it shows me in the phpinfo test I ran that the destination is corrent. But if I run PHP --ini it shows me this: Loaded Configuration File (php.ini) Path: /etc Loaded Configuration File: /private/etc/php.ini That looks like where I need to replace it but I can't find the fileBonanno
add method for cli modeFulgurant
/private/etc/ is the same as /etc/ on the mac. instead of changing the php.ini file, which does not exist by default (you are supposed to copy php.ini.default to php.ini), you could use the filemaker server deployment wizard which just modifies /etc/httpd/httpd.conf similar to the suggested answer. help.filemaker.com/app/answers/detail/a_id/6538/~/…Radicel
C
0

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>
Chequer answered 2/5, 2017 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.