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.
So here we go.
I got everything unpacked and adjusted config.php
The install process went well and I uploaded some pics.
However, when I point my browser to 127.0.0.1/testlab/zenphoto afterwards to look at the albums, I get the followin php error:
` MySQL Error: Could not connect to the database server. `
`Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:Programmexampphtdocstestlabzenphotozenfunctions-db.php on line 31 `
`Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:Programmexampphtdocstestlabzenphotozenfunctions-db.php on line 31
MySQL Query ( SELECT *, (date + 0) AS date FROM albums WHERE `folder`='12er-party-05' LIMIT 1; ) Failed. Error: Access denied for user 'ODBC'@'localhost' (using password: NO) `
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
Comments
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
However, I did edit the relevant config.php section to look like this:
`$conf['mysql_user'] = "root";
$conf['mysql_pass'] = "XXXXXXXX";
$conf['mysql_host'] = "localhost"; // Probably won't need to change this.
$conf['mysql_database'] = "zenphoto_testlab"; `
(replace XXXXXXXX with real pwd)
The interesting thing also is (maybe I didn't make this clear enough above), that I am able to login into the admin interface, "only" the frontend has this behaviour. If I had to make a guess it would be that some part of the code doesn't (properly) use either config.php or the functions defined in functions-db.php, because a user "ODBC" just wasn't specified anywhere by me, so I conclude it has to be hardcoded somewhere.
Any idea where? Or am I getting something essentially wrong here?
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.
phpMyAdmin did also work, so php to mysql can't be broken either.
I searched for 'ODBC' in all of zenphotos php files, but it was nowhere to be found.
I know it wouldn't make any sense to have something named 'ODBC' in there, because zenphoto is mysql only, but I just don't get how zenphoto's main page came across that user name. I don't know what to check for anymore. Any ideas what I could check for or something I could send you to check for validity? Like my config.php?
Regards, EverNever
Sorry I couldn't be more help.
You might want to check and make sure you have the right version of MySQL. This is a shot in the dark, but who knows?
- Enabled mod rewrite to the httpd.conf config by uncommenting out the module
- Added require_once("zen/config.php"); to the top of my index.php file
- Edited the .htaccess file to point to the proper folder
I imagine that disabling mod-rewrite in the config.php might also help.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.