Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1046 - No database selected


altea

Recommended Posts

Posted

Hi

I have read the various posting on this subject and I understand that this problem is related to either no database being available or the wrong database name existing in the configure.php files. I have reviewed both the

 

public_html/includes/configure.php and public_html/admin/includes/configure.php

 

and the DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE are correctly assigned. This all worked fine until I moved hosting companies and following ftping the files to the new host's server I get this message. Any help would be greatly appreciated as the hosting company cannot advise me.

 

Thanks, Altea

Posted

If you moved hosts the the db_server address may have changed, and the database user name and password will certainly have changed.

 

Vger

Posted
If you moved hosts the the db_server address may have changed, and the database user name and password will certainly have changed.

 

Vger

 

Hi Vger

 

I created the DB myself, so it has the same:

DB_SERVER_USERNAME

DB_SERVER_PASSWORD

DB_DATABASE (name) of the original site.

 

The DB_SERVER was/is set to "localhost"

 

PHPMyAdmin reports that the Server: Localhost via UNIX socket and the user is User: mydomain@localhost, but (not being a SQL expert) this may have been just been copied across when the DB was imported, so could be erroneous. Is this the likely problem? If so, is there a way of discovering what the address is without asking the hosting company, who either don't seem to want to/ or simply don't know this information?

 

Thanks, Altea

Posted

Try to verify your access passwords. If you have a copy of phpmyadmin on your server, logging in with those details should take you to the appropriate database. If not, it is an authentication issue, although that usually results in a different error.

 

Ensure your database name and database server are correct.

 

Rob

Rob Bell - Inspired Graphix

Customising osCommerce in Australia, and the world!

View my profile for web and email links.

 

I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture.

However viewing my profile may provide links to my website or something like that which you may find useful.

Posted

UPDATE

=====

 

I now have access to the database - my fault, I did not click Add User to Database in cPanel However, now the website header is displaying (see http://www.avsonix.myzen.co.uk ) but I now get the following messages:

 

Warning: main() [function.main]: open_basedir restriction in effect. File(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) is not within the allowed path(s): (/data01/avsonix:/usr/lib/php:/usr/local/lib/php:/tmp) in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Warning: main(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) [function.main]: failed to open stream: Operation not permitted in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Warning: main() [function.main]: open_basedir restriction in effect. File(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) is not within the allowed path(s): (/data01/avsonix:/usr/lib/php:/usr/local/lib/php:/tmp) in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Warning: main(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) [function.main]: failed to open stream: Operation not permitted in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Fatal error: main() [function.require]: Failed opening required '/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Clicking any of the links seems to redirect it back to the live site, which hosted with the old ISP. Can anyone advise where to start to look to resolve these messages or why I am receiving them?

 

Regards

 

/J

Posted
UPDATE

=====

 

I now have access to the database - my fault, I did not click Add User to Database in cPanel However, now the website header is displaying (see http://www.avsonix.myzen.co.uk ) but I now get the following messages:

 

Warning: main() [function.main]: open_basedir restriction in effect. File(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) is not within the allowed path(s): (/data01/avsonix:/usr/lib/php:/usr/local/lib/php:/tmp) in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Warning: main(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) [function.main]: failed to open stream: Operation not permitted in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Warning: main() [function.main]: open_basedir restriction in effect. File(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) is not within the allowed path(s): (/data01/avsonix:/usr/lib/php:/usr/local/lib/php:/tmp) in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Warning: main(/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php) [function.main]: failed to open stream: Operation not permitted in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Fatal error: main() [function.require]: Failed opening required '/home/avsonix/public_html/templates/avsonix/mainpage_modules/homepage_search.tpl.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /data01/avsonix/public_html/templates/avsonix/main_page.tpl.php on line 61

 

Clicking any of the links seems to redirect it back to the live site, which hosted with the old ISP. Can anyone advise where to start to look to resolve these messages or why I am receiving them?

 

Regards

 

/J

 

 

This topic is now closed, but continues with:

 

http://www.oscommerce.com/forums/index.php?showtopic=282848

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...