kenwvs Posted July 2, 2006 Share Posted July 2, 2006 I just moved my website from one server to another and have moved both the files and the database. I had to create new names for the database and user and did this and changed it in a file called myconnect.php. When you go to the site you get errors on the page as follows:[quote]Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/forsa7/public_html/index.php:6) in /home/forsa7/public_html/session.php on line 2Warning: mysql_connect(): Access denied for user 'forsa7_dbmforsal'@'localhost' (using password: YES) in /home/forsa7/public_html/myconnect.php on line 14I cannot connect to the database because: Access denied for user 'forsa7_dbmforsal'@'localhost' (using password: YES)[/quote]I am not understanding what is causing this error as I have made sure the database name, server, user and passwords are all correct. I even deleted the user, created a new one and gave him permission for this database, in case I had a wrong password.Any ideas what might be causing this.thanks,Ken Quote Link to comment Share on other sites More sharing options...
fenway Posted July 3, 2006 Share Posted July 3, 2006 Well, the first problem has nothing to do with mysql, and the second is, apparently, an invalid password problem. Quote Link to comment Share on other sites More sharing options...
kenwvs Posted July 3, 2006 Author Share Posted July 3, 2006 I have determined that the problem was caused by there not being a [i][b]session_start()[/b][/i] at the top of the index.php page. Once I added that line to my page, the error disappeared and everything is working well.I am not sure why I didn't have this problem on the old server, but I am not going to worry about it since the problem is solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.