3

I try to run a script from the command line, a script made by zend framework. I used also the Zend Server who has her own php.ini. When I try to start my script on the command line I am not able to connect with my mysql database. It's because from the command line it takes (it has to be) another php.ini file located somewhere on my Mac OS X Lion system because the path to the mysql.sock isnt the path who is configurated in the zend server php.ini.

I would like to let the command line use my php.ini of zend Server.

I hope someone knows how to do this.

Kind regards, Nicky

1 Answers1

3

You can launch php from the command line with an option to specific the path where the php.ini file you want it to use is located:

php -c /path/to/zend/phpini/folder myfile.php

To find out the the folder where the command line php.ini is located, you can use:

php -i | grep php.ini
Paul
  • 61,193