php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11079 Problem with old code to use mysql
Submitted: 2001-05-24 06:15 UTC Modified: 2001-05-24 15:43 UTC
From: ncosta at seist dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.5 OS: Linux Mandrake 8.0
Private report: No CVE-ID: None
 [2001-05-24 06:15 UTC] ncosta at seist dot com
Hello...
I'm use the Linux Mandrake 8.0 with mysql 3.23.32 and Apache 1.3.19. Recently I install the 4.0.5 version of php and I can't use my old code to acess mysql server. The mysql_connect function give me the error "Can't connect /tmp/mysql.sock (2)".

This old code was working fine with 4.0.4pl1 version of php.

Can you tell what is the problem?

Best Regards.
Nuno Costa.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-24 06:43 UTC] swm@php.net
Are you sure the MySQL server is binding to domain sockets?
ls -l /tmp/mysql.sock

If mysqld is not running or is running with tcp connections only, then your default mysql_connect() will not work.
 [2001-05-24 13:32 UTC] derick@php.net
PHP 4.0.5 has a problem detected the correct socket. Please try a snapshot from snaps.php.net, or wait for PHP 4.0.6

Derick
 [2001-05-24 15:43 UTC] sniper@php.net
You can also use the php.ini directive to point to
the correct socket:

mysql.default_socket=/var/tmp/mysql.sock

(with correct path, of course)


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 13:01:31 2024 UTC