473,396 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.neu.edu
http://www.cyber0ne.com

Mar 28 '06 #1
2 1408
47*********@gmail.com 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...@ccs.neu.edu
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.
js*******@attglobal.net
==================
Mar 28 '06 #2
> Check 'mysql.default_socket' in your php.ini file, and 'socket' in
your my.cnf file. They need to match.
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.
Also, what are the mod flags for the socket? They should be
'srwxrwxrwx'.
Check.
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.


/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
dd******@ccs.neu.edu
http://www.cyber0ne.com

Mar 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frank de Bot | last post by:
Hi, occasionaly I find in my apache logs that fastcgi had a broken pipe error with php running as fastcgi. the logs are like this: -- > (32)Broken pipe: > FastCGI: comm with server...
2
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a...
44
by: Tolga | last post by:
As far as I know, Perl is known as "there are many ways to do something" and Python is known as "there is only one way". Could you please explain this? How is this possible and is it *really* a...
3
by: 47computers | last post by:
Maybe this is something simple, maybe I just don't see it... I recently did a test upgrade from MySQL 4 to 5.0.19, and most everything seems to be working great. I also upgraded my PHP to 5.1.2...
24
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several...
25
by: Norman Diamond | last post by:
I think the current version of _vsnwprintf_s is broken, in ordinary Windows. I'm not completely sure yet but it looks like this breakage is worse than previously known Windows CE breakage of...
8
by: Andy B | last post by:
I have the following code in a default.aspx web form page_load event. There seems to be a problem with line 5 (NewsArticle.Date = line). //create a news article NewsArticle NewsArticle = new...
9
by: Lloyd Sheen | last post by:
Title says it all. I have reinstalled this "terrible" version of VS now 4 times and I am having trouble with why MS released this. I do a simple one line addition and it tells me thing are not...
2
by: norseman | last post by:
Tim; Finally got a chance to test your snippet. Thank you for it! I took the liberty of flushing it out a bit. ================ #!/--- # import os import win32com.client
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.