Something Broken When I Went To 5.1.2...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 47computers@gmail.com

    Something Broken When I Went To 5.1.2...

    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...@ccs.ne u.edu


  • Jerry Stuckle

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

    47computers@gma il.com wrote:[color=blue]
    > 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...@ccs.ne u.edu
    > http://www.cyber0ne.com
    >[/color]

    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@attgl obal.net
    =============== ===

    Comment

    • 47computers@gmail.com

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

      > Check 'mysql.default_ socket' in your php.ini file, and 'socket' in[color=blue]
      > your my.cnf file. They need to match.[/color]

      Ah, there's a slight discrepency. One of them points to the socket,
      the other points to a symlink that points to the socket. Not sure if
      it really makes a difference, but it's better that they both point
      directly to the socket. Fixed.
      [color=blue]
      > Also, what are the mod flags for the socket? They should be
      > 'srwxrwxrwx'.[/color]

      Check.
      [color=blue]
      > 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.[/color]

      /etc/rc.d/rc.mysql stop
      find / -name 'mysql.sock'

      Man, turned up more files than I would have thought. Did some house
      cleaning on that. This definitely helped, thanks. Between you and a
      reply on another forum, everything's working fine now. Thanks a bunch!


      Regards,
      David P. Donahue
      ddonahue@ccs.ne u.edu


      Comment

      Working...