php - Mysqli connection fails in shell and goes well in apache (macports) -


i hope fine today. have weird problem. changed web apps use mysqli connect mysql instead of mysql_connect. when server apache, goes fine , queries sent properly.

however, when executing php scripts in terminal, following error:

error 2002: no such file or directory 

i checked socket files in php56/php.ini, , socket declared.

mysqli.default_socket=/opt/local/var/run/mysql55/mysqld.sock 

however, in shell, php socket wrong. somehow socket path changes apache terminal php environment , lost. php.ini configuration file usin

me@macbook-pro /users/me/www$ php -i | grep mysqli mysqli mysqli.allow_local_infile => on => on mysqli.allow_persistent => on => on mysqli.default_host => no value => no value mysqli.default_port => 3306 => 3306 mysqli.default_pw => no value => no value mysqli.default_socket => /var/mysql/mysql.sock => /var/mysql/mysql.sock mysqli.default_user => no value => no value mysqli.max_links => unlimited => unlimited mysqli.max_persistent => unlimited => unlimited mysqli.reconnect => off => off api extensions => mysqli,pdo_mysql,mysql 

inside shell, configuration file not addressed. why?

me@macbook-pro /users/me/www$ php -i | grep ini configuration file (php.ini) path => /etc 

however, when served apache ini file , socket fine.

please :-p using macports on macosx. thanks!

ok guys got around problem creating symlink real php.ini /etc/php.ini. not fix, works.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -