New server - database installed but error
6 posts
• Page 1 of 1
New server - database installed but error
Hello,
I have taken over a project from a colleague who has left the company. He had started to move http://www.premier-products.co.uk from his own server to our 1and1 hosting account.
He backed up the database to a .sql file, which I have installed in a new 1and1 database. I can see all the information is there so the database is installed. 1and1 assisted with this. However, when you visit the URL there is the following error:
Notice: Undefined variable: db in /homepages/23/d409796783/htdocs/premier/index.php on line 41
Fatal error: Call to a member function query() on a non-object in /homepages/23/d409796783/htdocs/premier/index.php on line 41
I'm not well-versed in php to fix it. Can you help?
Tech Specs
OpenCart 1.5.1
New server PHP version: 5
New server MySQL version: 5.0
Matthew
I have taken over a project from a colleague who has left the company. He had started to move http://www.premier-products.co.uk from his own server to our 1and1 hosting account.
He backed up the database to a .sql file, which I have installed in a new 1and1 database. I can see all the information is there so the database is installed. 1and1 assisted with this. However, when you visit the URL there is the following error:
Notice: Undefined variable: db in /homepages/23/d409796783/htdocs/premier/index.php on line 41
Fatal error: Call to a member function query() on a non-object in /homepages/23/d409796783/htdocs/premier/index.php on line 41
I'm not well-versed in php to fix it. Can you help?
Tech Specs
OpenCart 1.5.1
New server PHP version: 5
New server MySQL version: 5.0
Matthew
- matthew-marc
- Posts: 4
- Joined: Wed Jul 25, 2012 9:23 am
Re: New server - database installed but error
Has your database been installed with a prefix?
Genuine, Honest Opencart Support @ http://webvetservices.com
-

webvet - Posts: 219
- Joined: Wed May 13, 2009 6:04 pm
- Location: Shropshire, UK
Re: New server - database installed but error
There is no prefix - it was empty/blank. See attached screenshot of the database.
Thanks for your reply.
Thanks for your reply.
- Attachments
-
- MySQL database on 1and1 screenshot
- database.JPG (52.61 KiB) Viewed 212 times
- matthew-marc
- Posts: 4
- Joined: Wed Jul 25, 2012 9:23 am
Re: New server - database installed but error
Essentially - the database information (prefix, name, password etc) is outlined in the root config.php (and admin/config.php) files.
Your next sensible step is to check the root config.php file - at the bottom (about line 23-25 ish) are half a dozen lines of code that need to match how the database was set up by 1and1.
Does that make sense?
Your next sensible step is to check the root config.php file - at the bottom (about line 23-25 ish) are half a dozen lines of code that need to match how the database was set up by 1and1.
Does that make sense?
Genuine, Honest Opencart Support @ http://webvetservices.com
-

webvet - Posts: 219
- Joined: Wed May 13, 2009 6:04 pm
- Location: Shropshire, UK
Re: New server - database installed but error
Yes, the config files have been updated to the new server details. See screenshot:
- Attachments
-
- Config root file
- config screenshot.JPG (111.14 KiB) Viewed 208 times
- matthew-marc
- Posts: 4
- Joined: Wed Jul 25, 2012 9:23 am
Re: New server - database installed but error
Anyone have an idea what the fault is?
Notice: Undefined variable: db in /homepages/23/d409796783/htdocs/premier/index.php on line 41
Fatal error: Call to a member function query() on a non-object in /homepages/23/d409796783/htdocs/premier/index.php on line 41
Notice: Undefined variable: db in /homepages/23/d409796783/htdocs/premier/index.php on line 41
Fatal error: Call to a member function query() on a non-object in /homepages/23/d409796783/htdocs/premier/index.php on line 41
- matthew-marc
- Posts: 4
- Joined: Wed Jul 25, 2012 9:23 am
6 posts
• Page 1 of 1
Return to Installation, Upgrade, & Config Support













