bensauer Posted June 6, 2005 Share Posted June 6, 2005 hi, I'm getting a "No database selected" error after I moved my test store to a new server. I have searched on this problem, but I think my problem is different to those encountered by others. My config files are correct, they are still working fine on my old test server, connecting to the same database as the new server. The problem lies in this "variable variable": $$link within database.php, which returns NULL. It seems that line 14 of this file, (global $$link;) doesn't actually return the real $db_link. I imagine you might see this problem with PHP5, but I'm running 4.3.11 on Debian. I have checked my php.ini, everything looks fine in relation to globals etc. Has anyone else encountered this with php 4.X ? Should I just rewrite the bits of database.php that need it or will I need to do more to get the store running again? Thanks for any help, B Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2005 Share Posted June 6, 2005 you need to have your configure.php file changed to match the new server file locations. when you create your database on the new server, did you use the same name and password? use phpmyadmin to see the exact database name Link to comment Share on other sites More sharing options...
bensauer Posted June 6, 2005 Author Share Posted June 6, 2005 thanks, but that's not it. the db hasn't changed, it's on a 3rd machine. The file locations are also identical. Link to comment Share on other sites More sharing options...
wizardsandwars Posted June 6, 2005 Share Posted June 6, 2005 And the new server has access to the database on the 3rd machine? ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help. Link to comment Share on other sites More sharing options...
bensauer Posted June 6, 2005 Author Share Posted June 6, 2005 yes, I have other connections to it working fine. I've installed mysql on the localhost now, and all is working. I still don't know why it reported "No database selected" for a connection/permission error, but there you go! I don't have time right now to find out... I may have to come back to this problem later. thanks for all the help anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.