Member
Member
mcclure411   2006-04-08, 04:27
#1

A couple weeks ago I changed hosts. Before I changed hosts I upgraded to the new version of ZenPhoto...and everything worked perfect.

After changing hosts, I now get the following error: "MySQL Error: Could not connect to the database server." at the top of my page...however I'm completely able to connect to the database and all my albums, photos are viewable and working fine. The problem is that I can't get this Error message off of the page. My new host is running PHP 5.0.5...my last host was running 4.

Any suggestions to patch this up? Here is the page that is causing the error: http://www.mcclure411.com/photogallery_zp/ The error is a little hard to see, but it's at the very top of the page. Thanks for helping.

Developer
Developer
trisweb   2006-04-08, 17:36
#2

How weird! It sure is working alright.

A quick hack is to find where that error message is given (in functions-db.php) and make it into a blank string, or comment out the line.

Member
Member
mcclure411   2006-04-09, 03:17
#3

Cool. Commenting out that line works fine. However I would love to know what is causing that to happen...when ever you get a free second

Thanks.

Member
Member
mcclure411   2006-04-11, 02:13
#4

Okay, now I'm getting this error when I log in to the admin area (so i can edit or add albums):
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/accountname/public_html/photogallery_zp/zen/functions-db.php on line 31

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/accountname/public_html/photogallery_zp/zen/functions-db.php on line 31
MySQL Query ( SELECT * FROM zp_albums ) Failed. Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

How can i solve this issue?

Developer
Developer
trisweb   2006-04-11, 08:06
#5

Does it continue to work after that?

Either way, definitely contact your host. Seems to be a problem with the MySQL configuration.

Member
Member
mcclure411   2006-04-12, 00:17
#6

No...it doesn't work after that. First I login...and immediately get this error, with nothing else visible. How is this a host problem if the rest of ZenPhoto is operating?

Developer
Developer
trisweb   2006-04-12, 03:47
#7

Well, the first clue is that the problem is unique to this host and server configuration. It's a very weird problem, I'll give you that.

Seriously, have you contacted your host and asked them? They're standard queries from PHP. This is not likely a problem with zenphoto.

Member
Member
mcclure411   2006-04-12, 13:19
#8

I have sent opened a support ticket with them and I'll see what they say. I'm wondering if this has anything to do with me moving all my file over to a new host...rather than a complete reinstall of zenphoto on the new server?

I exported my DB from my old host, imported in the new DB and moved my files over...sounds good, but not sure if that is causing any issues? Thanks for the help, I'll post some answers when i hear back from my host.

Developer
Developer
trisweb   2006-04-12, 20:49
#9

Exporting the databases shouldn't be that big a problem... unless there was something you missed about the configuration. I don't know. See what they say.

Member
Member
mcclure411   2006-04-14, 01:23
#10

they say to use "remotemysqlhost" as the DB connection...which I am. so that really wasn't any help. is it possible that i didn't fully export the DB, maybe I missed a field, or header or something?

ANything else I should be looking at? My alternative (to fix this problem...hopefully) is to wipe ZenPhoto out of the DB, delete all files, reinstall and start fresh...but of course that would suck and I'd rather not go that route.

Member
Member
mcclure411   2006-04-15, 20:26
#11

my server admin has asked to see my config file...so they will check that out pretty soon. I've also given them a link to the part thats working on the website (where the albums display and stuff). hopefully they come up with something.

Member
Member
mcclure411   2006-04-16, 04:31
#12

The server admin told me to delete the user name and password for my database connection. They found it was causing problems connecting to the DB. ANyway, I deleted it, recreated it (wikth the exact same name/pass) and it's all good.

Thanks for taking the time to help me out. ZenPhoto is amazing!

Developer
Developer
trisweb   2006-04-16, 05:55
#13

Great, glad you got that solved.

Member
Member
hansn   2007-01-07, 19:01
#14

Dear trisweb/zenphoto,
Like the script, very cool design!!The best I,ve seen so far.
However, I'm having the same problem as member mcclure 411,
moved to hosting with Php 5 and got the same errors
(no connection with database).
The Mysql is working fine(I checked).
Can't get it to work since the switch.
Any ideas?
Thanks
Hans

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.