Link to home
Start Free TrialLog in
Avatar of eb110k
eb110k

asked on

php.ini modification does not take effect

Hello,

I'm having a problem with accessing to MySQL via PHP.
The problem is that PHP ties to find MySQL socket in /tmp/mysql.sock.

PHP returns "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ".

But actual socket is in /var/lib/mysql/mysql.sock.
This is configured on my.cnf (socket          = /var/lib/mysql/mysql.sock -> mysqld & client) and php.ini as well (mysql.default_socket = /var/lib/mysql/mysql.sock).


But phpinfo() returns:

Configuration File (php.ini) Path       /usr/local/lib
MYSQL_SOCKET       /tmp/mysql.sock

My php.ini located in  /etc/php.ini

How do I solve this problem?
Please someone advise.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of emphamy
emphamy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial