I've been helping a friend of mine to install ZP 1.1.2 but have run into a problem I can't seem to solve. For some reason ZP cannot successfully make a connection to the DB server. For reference, the host is GoDaddy. I checked all of the DB information multiple times. Made sure the db name, db username, db password, and changed the db host accordingly to the address GoDaddy says the db is located on. I can't seem to figure out why ZP cannot connect. I have version 1.1.2 installed just fine on my own server, but it's not hosted by GoDaddy. I was however successful in installed version 1.0.8.2 on GoDaddy. Does anyone have a clue as to what I can do to get version 1.1.2 working with GoDaddy?
Comments
MySQL Error: Zenphoto could not connect to the database server. Check your zp-config.php file for the correct host user name, and password. Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy. Also make sure the server is running, if you control it.
I am certain I had the correct information in zp-config.php.
2) Can you look at a different application that uses the database to double-check?
3) Does the user you're using have permission to access the database you've selected?
4) Does GoDaddy prefix the database names with the username? THis is pretty common (eg: db "zenphotodb" is actually "username_zenphotodb"
5) Do they prefix the usernames with the account user name? Eg: user "mysqluser" is actually "username_mysqluser". Both 4 and 5 are common at large hosts.
6) Are you absolutely positively sure you have the correct info? There's very little going on in zenphoto to connect to the database -- if it's not working it's extremely likely that it's a configuration problem.
It's interesting that 1.0.8.2 worked though... it should be exactly the same.
2. WordPress is installed with no problem. One thing that GoDaddy does is randomly assign a MySQL server to newly created databases. So the database server is not the same for ZP as it is for WordPress. Also you must create a new user for each new database, so the user is also different.
3. I would imagine so. When I installed version 1.0.8.2, I used the same database information as I had for 1.1.2.
4. and 5. This is one of the first things I had checked. The WordPress installation does not use a prefix for the database name or database username. I tried with and without a prefix. Neither made a difference.
6. Considering I used the same database information from attempting to install 1.1.2 with 1.0.8.2, I am positive my information is correct. Unless GoDaddy is giving me the wrong host the database is on...
I appreciate your help. I'll be suggesting that my friend gives GoDaddy a call and see what they say. It's like you said, it's interesting that the older version works, but not the newer version. In any case, 1.0.8.2 is working fine.
Zenphoto Error
MySQL Error: Zenphoto could not connect to the database server. Check your zp-config.php file for the correct host, user name, and password. Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy. Also make sure the server is running, if you control it.
I'm using hostgator hosting.
Please help, I really like this program.
I am presuming you did check that you checked the zp-config file and have the correct information in the following lines:
`$conf['mysql_user'] = "user";
$conf['mysql_pass'] = "pass";
$conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "database_name";`
`mysql -h mysql_host -u mysql_user -p`
Input "mysql_pass" when prompted.
Are you connected? Type
`show databases;`
Do you see your database?
Do you have any other web software running on your site? Wordpress or another program that uses the database? Check their configuration files for examples.
If you don't have any other PHP programs using the database then it could be a server configuration problem, and you should ask your web host for support.
I noticed some odd behavior though...i have no problem connecting to the DB in the admin area...it works perfectly fine. i can see all the data ...comments, galleries,image names. as soon as i click on a link that points to the gallery itself...it comes up w/the previously mentioned error message. it's accessing the same zp-config file...it doesn't make any sense.
what's up? any ideas?
A couple questions...
1) Is your old /zen/ folder still around or has it been deleted?
2) Are you skilled enough in PHP to add some debug code if I give it to you?
1 - I still have my old zen folder on my local drive...but it's deleted from the server.
2 - Lets do it!