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?

Amal Murali
  • 75,622
  • 18
  • 128
  • 150
Andy Sanchez
  • 197
  • 1
  • 2
  • 10

2 Answers2

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

Community
  • 1
  • 1
iodragon
  • 334
  • 1
  • 4
  • 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 file – Andy Sanchez Oct 05 '13 at 19:46
  • add method for cli mode – iodragon Oct 08 '13 at 15:53
  • /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. http://help.filemaker.com/app/answers/detail/a_id/6538/~/installing-php-via-filemaker-server-deployment-wizard – ecsos Oct 14 '13 at 23:01
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>
shasi kanth
  • 6,987
  • 24
  • 106
  • 158