Re: Something Broken When I Went To 5.1.2...



47computers@xxxxxxxxx wrote:
Maybe this is something simple, maybe I just don't see it...

I recently did a test upgrade from PHP 4 to 5.1.2 on my Slackware 10.0
Linux box, and most
everything seems to be working great. I also upgraded my MySQL 4 to
5.0.19 (and it's possible that the problem is in the MySQL upgrade, not
the PHP upgrade... but I need a place to start). Most everything seems
to be working fine in my testing, except a PHP-based MySQL-backed forum
software I use (http://www.phpbb.com) on a couple of my hosted sites.

When the code tries to connect to the new database service, it produces
the following error:

-------------------------
Warning: mysql_connect() [function.mysql-connect]: Can't connect to
local MySQL server through socket '/tmp/mysql.sock' (13) in
/mnt/webusers/myerscreek/forum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link
resource in /mnt/webusers/myerscreek/forum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link
resource in /mnt/webusers/myerscreek/forum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database
-------------------------

I'm guessing the second two warnings are products of whatever went
wrong in the first warning. The file /tmp/mysql.sock is there and is a
symlink to /var/run/mysql/mysql.sock (which is the same .sock that is
symlinked from the MySQL data directory). Maybe I've misconfigured
something in my php.ini file (I used the recommended one that came with
the software)? Maybe I need to change something in the pre-compile
configure?

The forum for that software claims that such an upgrade should be
smooth, and when asked about this error they claim not to support it.
Can anyone here possibly shed some light on this for me? Maybe at
least point me in the right direction? I'd really appreciate it,
thanks.

Regards,
David P. Donahue
ddona...@xxxxxxxxxxx
http://www.cyber0ne.com


David,

Check 'mysql.default_socket' in your php.ini file, and 'socket' in your my.cnf file. They need to match.

Also, what are the mod flags for the socket? They should be 'srwxrwxrwx'.

Finally - stop MySQL and delete the socket (if it isn't deleted when you stop MySQL). Restart MySQL and see if it's recreated. This will prove the socket is not left over from a previous run, i.e. if MySQL crashed.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: [PHP] Re: Matching Proper Versions Of PHP and MySQL
    ... My server just upgraded to PHP version 5.1.2 from php 4.3.11 ... What is the oldest - best/safest version of mySQL to use with PHP version ... Stability wise they should be fine. ... Also both are old versions - if you find bugs/have issues, you'll either have to work around them or upgrade - the respective developers will not try to fix bugs in them because they are old. ...
    (php.general)
  • Re: upgrading mysql client and server
    ... They were installed via ports not packages using custom make options ... I'd rather feed the mysql command a complete file and have it ... This isn't an amazingly difficult upgrade. ... *) Upgrade the MySQL client port and its dependencies first. ...
    (freebsd-questions)
  • Re: An update is needed Fedora!
    ... > Uninstall My current php, mysql and apache packages. ... The upgrading tools will do just that, upgrade from the older versions ... For yum, you can enable the repo temporarily as explained in earlier ...
    (Fedora)
  • Re: Mysql rpm upgrade
    ... I have been asked to upgrade the Mysql rpm's on one our Redhat version 3 ... # clients (those using the mysqlclient10 compatibility package). ...
    (RedHat)
  • Re: Matching Proper Versions Of PHP and MySQL
    ... My server just upgraded to PHP version 5.1.2 from php 4.3.11 ... The reason I mentioned the oldest - is because, for legacy clients, ... I would like to do the minimum upgrade to ensure best compatibility with ... legacy code (mySQL and NON php etc.). ...
    (php.general)