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 Link to comment https://forums.phpfreaks.com/topic/13497-moved-to-a-new-server-and-am-getting-an-error-when-you-go-to-the-page/ 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. Link to comment https://forums.phpfreaks.com/topic/13497-moved-to-a-new-server-and-am-getting-an-error-when-you-go-to-the-page/#findComment-52333 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. Link to comment https://forums.phpfreaks.com/topic/13497-moved-to-a-new-server-and-am-getting-an-error-when-you-go-to-the-page/#findComment-52336 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.