New to the board but read a lot! So I have done a search on this and the only thing that came close was this thread which never got answered: here
I have a small garden pictures site where I can add pictures with descriptions, edit them, delete them, etc in the admin side and select and view them on the public side.
Everything was fine until yesterday when I tried it on another computer.
On the admin side, I can select a picture from the database and then click on it to go to the edit page.
Then I get the:
Warning: mysql_query(): Access denied for user: 'apache@localhost' (Using password: NO)
in /var/www/localhost/htdocs/mygardenpictures/4dm1n5/edit_picture.php on line 50
Now very important point here: it is not something wrong with my mysql_connect script or I wouldn't be able to select a picture to edit in the first place (make sense?)
In other words, it connects fine, selects fine, until I go to a second page with the same mysql_script (I require_once to get it). Then it refuses access to the db.
I'm not sure what else to put at the moment. I have done the usual check the sql, etc, it all works perfectly, and as I say it worked until I put it into the new computer.
The config files (php, apache, my.cnf, etc) are exactly the same on both machines. Usernames and permissions are exactly the same on both machines.
Any suggestions? Obviously I can post anything else you need or attach the script, although, as I say, it works perfectly on another machine...