Bug 60542

Summary: failure on php to connect to mysql after updating php.
Product: [Retired] Red Hat Linux Reporter: Drew Bertola <drew>
Component: phpAssignee: Phil Copeland <copeland>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.2CC: jbearer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-04 06:25:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
one line patch to change default mysql.sock location in configure script none

Description Drew Bertola 2002-03-01 15:45:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020205

Description of problem:
Error shown in web page is something like "php cannot connect to mysql through
/tmp/mysql.sock



Version-Release number of selected component (if applicable):


How reproducible:
Didn't try

Steps to Reproduce:
1. make sure /etc/php.ini has no value for mysql.default_socket
2. latest php, mysql, apache (php-4.0.6-12.i386.rpm)
3. run a mysql_connect
	

Actual Results:  error message like: "php cannot connect to mysql through
/tmp/mysql.sock"

Expected Results:  Connection success.  The applied rpms for the php security
fix caused this.

Additional info:

This doesn't cause a crash, but it does take down the web server fuctionality of
php+mysql enabled sites when apache gets a HUP (after logrotate).  I suppose I
would have found the problem earlier if I restarted apache manually after the
upgrade, but I didn't want to do that.  My production site was down for 6 hours.

Comment 1 Need Real Name 2002-03-01 17:59:03 UTC
Untill they get this fixed you can create a symlink from
/var/lib/mysql/mysql.sock to /tmp/mysql.sock. that got me back up and running.

Is there a config file to fix this or is it compiled into a binary?

Comment 2 Alastair Tse 2002-03-04 06:24:16 UTC
Created attachment 47282 [details]
one line patch to change default mysql.sock location in configure script

Comment 3 Alastair Tse 2002-03-04 06:25:24 UTC
of course - that means you have to apply that patch before rebuilding that RPM
:) But the softlink from /tmp/mysql.sock works just as well.

Comment 4 Phil Copeland 2002-03-04 19:17:42 UTC

*** This bug has been marked as a duplicate of 60515 ***