Re: semi-newbie | php, mysql & RH Enterprise

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Wong made several helpful suggestions to my earlier query - alas, non of them have panned out.

As per his suggestion, I went into php.ini and changed the default mysql socket to

        mysql.default_socket =/var/lib/mysql/mysql.sock

Then, I rebooted the system, since I'm guessing changes to php.ini aren't dynamic (like everything else that parses a config file isn't).

But, this didn't work.  Two possible answers:

1) If I read the PHP docs, I learn that

        "mysqli.default_socket string

The default socket name to use when connecting to a local database server if no other socket name is specified. "

The key here is 'if no other socket name is specified'. And therein lies the problem, I think. With mysql support builtin to PHP, the socket name IS specified as /tmp/mysql.sock (according to info.php). But, mysql on RH Enterprise WS doesn't put mysql.sock in /tmp, it puts it in /var/lib/mysql And, I see know obvious way to change this.

2) but, perhaps its simply because changes to php.ini aren't being read. In fact, this might also be the case: when I run info.php, I get the following for the mySQL bits:

Active Persistent Links    0
Active Links    0
Client API version    3.23.49
MYSQL_MODULE_TYPE    builtin
MYSQL_SOCKET        /tmp/mysql.sock
MYSQL_INCLUDE    no value
MYSQL_LIBS       no value


mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off

So, my change to the default socket isn't being 'read', even after a system reboot. Moreover, when I try changing ANY of these values in the php.ini, none of them are read. I even tried changing some other parameters, such as maximum execution time, and info.php still shows me the same values (i.e., no changes).

So, I have a look at the top bits from the info.php output. It tells me that the Configuration File (php.ini) Path is /usr/local/lib. Not /etc. But, copying php.ini from /etc to /usr/local/lib doesn't seem to have done the trick.

So, something more fundamental. And (tada) I think its because I have two versions of PHP on the machine. The old one (4.3.2-19ent) that comes with RH Enterprise, and the version I compiled from the PHP 4.3.10 tarball. I can confirm that I have 2 binaries.

So, suggestions? I'm total confused by all this. I don't want to use 4.3.2, since its got a number of security issues that were corrected with 4.3.10. Should I simply re-install, but try to make sure PHP is NOT loaded, and then do it manually myself from the tarball? Or is there a way I can get everything to work with the 4.3.10 installation, and ignore the older 4.3.2?

Thanks again...

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux