I'm not exactly sure what is going on here, but I've set up a test gallery on my site using the latest 1.0.1 beta, and i'm still getting the same issues i was haveing with 1.0 beta. I know nothing about mysql (except the basics to get a database setup).
My test gallery is found at www.cjsimmons.net/testzp/ and there is an error message at the top that reads:
MySQL Error: Could not select the database
I have set up everything correctly as per instruction, but keep seeing this error, and currently i have another error on the screen saying:
MySQL Query ( SELECT *, (date + 0) AS date FROM albums WHERE folder='Sky-Clouds' LIMIT 1; ) Failed. Error: No database selected
Does anyone know what is going on here? Any help would be greatly appreciated. My main gallery is still running 0.9 beta, and I'm keen to upgrade to that latest.
thanks in advance.
Without seeing what you have in your config.php.. I have looked through the code and see where the error is outputed.. the code is
Could not select the database $db
which should translate as Could not select the database DATABASENAME
If I go into my config.php and remove my DB name... the same thing happens on my test install.
ensure that you have this line of code in your config.php
$conf['mysql_database'] = "{DATABASENAME}";
and obviously disregard this if you have already checked this but I have hacked my config.php in many different ways to see if I could recreate that error and this was the only way.
So lemme get this striaght.. .9 works fine right.. but 1.0 is giving you this problem..?
What happens if you do an upgrade from .9 to 1.0.. does it see the db then?
Does this error happen during setup or does setup complete fine?
What webhost is it... (server type, php version, mysql version).?
Paste your config.php in the forum.. (removing the password obviously.
Thats correct. 0.9 works fine, 1.0 is a pain in the rear!!
Upgrading has the exact same result as a fresh install.
Setup completes, and everything looks fine. I can use admin with no problems at all. It sees the database and I can edit photos and the like.
Webhost is my own. Win2K3 server, running XAMPP. PHP 5.0.5, MySQL 5.0.15.
Below is a copy of my config.php as requested. I removed the username and password and replaced them with "xxxx".
Very interesting.. If I were to guess.. this is a legitimate bug.. probably somewhere in the vicinity of mysql 5.
Everything looks right to me.
Looks like you will need to get a confirmation from luckyspin or trisweb, and see what they have to say.
EDIT: I downloaded and installed xampp and it did not work for me either.. i get the same errors you get. Admin panel works.. everything seems normal until I try to go to the album.. setup completes fine.. I even did an upgrade and same thing.
xampp, php5, mysql 5
After that didnt work.. i connected it to my msql4 server and it worked fine.. so it looks like it is a mysql5 problem.. apparently functions-db.php contains new code that is not compatible with mysql5.
Can you file this as a bug at the berlios page please? We will def. look into it. I use mysql4 for my testing, so that's probably why I haven't hit it.
Here's the link:
bug has been reported.
https://developer.berlios.de/bugs/?func=detailbug&bug_id=6108&group_id=4265
you know I started looking into where the error may be and I noticed that functions-db.php has not changed from .9 to 1.0... the error must be from another location in the code somewhere on anohter page.. just a quick thought.. I can read through php pretty well but i do not know sql language. I wish I could be more help.. I have been digging through the code(i am trying to learn php and since this program is easy to read through I am using it at my help) and if I happen to see something I will be sure to post.
I had a large codebase that broke when updating to mysql 5 as well. The defines that the mysql.so file (this is on redhat) had slightly different column type information (to incorporate the new column typing in mysql5 i assume) that was breaking some activeRecords objects that I was working with.
I tested with the newest xampp and it breaks no matter what I do. I eventually had to grab the newest version that still used mysql4.
This has now been fixed. See the following thread.