![]() |
|
No DB connect on windows - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: No DB connect on windows (/thread-400.html) |
No DB connect on windows - evernever - 2006-03-28 Hi, because I'd like to do some local testing on a windows box (running xampp e.g. apache2), and don't want to dual boot all the time, I'd like to know the answer to the following question. If it' allready been answered elsewhere and I just wasn't clever enough to find the post, I apologize.
`Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in Crogrammexampphtdocstestlabzenphotozenfunctions-db.php on line 31 MySQL Query ( SELECT *, (date + 0) AS date FROM albums WHERE I really don't have time right now to work myself into the zenphoto code, so it would be really cool if someone could help me with this. Regards, EverNever No DB connect on windows - rickindy - 2006-03-28 The permissions for the user aren't correct. You need to check the config.php for the database username and password. After you have done this, make sure the user exists in MySQL and that you have specified the correct password. MySQL is saying that the user name either doesn't exist or the permissions aren't correct. It has nothng to do with the php code. Check the MySQL docs for more information No DB connect on windows - evernever - 2006-03-28 Sorry, but your explanation would make sense if I there was "ODBC" specified as a user, and no password specified. $conf['mysql_pass'] = "XXXXXXXX"; $conf['mysql_host'] = "localhost"; // Probably won't need to change this. $conf['mysql_database'] = "zenphoto_testlab"; ` No DB connect on windows - rickindy - 2006-03-28 Start up MySQL from the command line and see if you can log in using the username and password you are using in your config.php file. If that works, you can try searching for 'ODBC' somewhere in the code, but I'm pretty sure it's not there. If it is, then try to find out where in the code is appears and post another note. No DB connect on windows - evernever - 2006-03-28 I logged in through the commandline and it worked. the following command was used: No DB connect on windows - rickindy - 2006-03-28 I'm afraid I am at a loss. Is your zenphoto running on a Windows server or a Unix server? If it's Windows, you may want to search the forum and see if anyone else has had this problem. No DB connect on windows - rickindy - 2006-03-28 Did some more looking around and I still haven't found anything. I've got it running on a Windows box at home and it works fine. No DB connect on windows - evernever - 2006-03-28 It's running locally on a windows machine, and would have been swapped to a linux server on the net, once I'd been sure that it really suits my needs. Thanks anyway for trying to help. I'll post a small note if I come up with something useful. No DB connect on windows - pipedarkfire - 2006-04-17 I had exactly the same problem running with xampp for windows. I had two problems (both the ODBC problem and the mod rewrite being left enabled (oops)) so here's what I did: [list=1] [*]Added require_once("zen/config.php"); to the top of my index.php file [*]Edited the .htaccess file to point to the proper folder [/list] I'm not sure exactly what causes this problem but it seems like the config.php file was not loaded correctly and it would be nice to have an error and a possible solution for this. |