Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am runing virtualmin with mysql and php on ubuntu 10

recently I have update mysql and php to newest version since than My pdo_mysql.default_socket has changed from /tmp/mysql.sock to /var/run/mysqld/mysqld.sock. I have done the php.ini file update. and it is working fine in Apache mod_php mode.

but it is not working in cgi and fcgid mode. What/where I can do the change so that other modes will also start picking up new socket.

1. Apache mod_php (run as Apache's user)
2. CGI wrapper (run as virtual server owner)
4. FCGId (run as virtual server owner)
share|improve this question
up vote 0 down vote accepted

You have most probably different php.ini files for the different modes. I suggest you create new PHP script which invokes phpinfo(); and call that script in your browser. The resulting HTML page will show you among other things where PHP expects the php.ini file.

share|improve this answer
I already did that, and findout all the php.ini files and changed them. but still not working. – user57221 Jul 23 '12 at 14:38

Wayaround, which I find is create a link using command in your directory /tmp/mysql.sock ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

I still could not find out why FCGId in virtualmin not picking up changes in php.ini file. I have provided the above way arround for anyone who reach on this thread having same issue.

share|improve this answer
This solution worked for me. – Blake Frederick Jun 22 '15 at 21:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.