Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Installation problem


papajohn

Recommended Posts

I'm having a problem installing tep_snapshot-20030703.

 

I'm running it on a Red Hat Linux 8 system that is providing webserver service over a LAN. The Apache webserver and MySQL are working fine. I can display pages on a browser operating on a client computer.

 

I've installed osCommerce on the server and can remotely view the documentation in the tep-docs/documentation directory (so php is working also). I have also modified configure.php as required.

 

The problem occurs when I use either of the following URLs on the remote browser (192.168.1.4 is the server IP):

 

http://192.168.1.4/catalog/ or http://192.168.1.4/admin/

 

I get the following error on the browser:

 

---------------------------------------

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

----------------------------------------

 

Any help would be appreciated.

Link to comment
Share on other sites

Verify the database entries (at the bottom of the page) in your catalog/includes/configure.php and admin/includes/configure.php are complete and correct.

 

Also, did you run the install script yet (i.e. http://[ip address]/catalog/install)? If not, that is probably what you are missing.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I get the same problem, Im checking my config page under admin folder, and cant find the part where you have to input the db name.

 

http://www.oraklerecords.com/catalog/catalog works fine

 

but when I go to the admin

http://www.oraklerecords.com/store/admin

 

I get

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

maaaaaam can i have some cheesy poofs

Link to comment
Share on other sites

I get the same problem, Im checking my config page under admin folder, and cant find the part where you have to input the db name.

The database entries are at the bottom of the admin/includes/configure.php. There should be entries for the server, username, password, and db.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I was having the same problem since I changed my site host yesterday. I couldn't figure it out because I hadn't changed the configure.php file (in admin or catalog). But, I just figured out what my problem was. I had set up my new databases with the same names (so as not to have to change my configure.php file) and uploaded my old database data and structure, but I had forgotten to add myself as a user to the database.

 

So, I had the database, and I had myself set up as a user, but I had to assign myself as a user to the database...

 

Hope this helps someone.

 

Jason

Link to comment
Share on other sites

So, I had the database, and I had myself set up as a user, but I had to assign myself as a user to the database...

I have done that twice myself. After a few hours of beating myself nearly senseless only to finally find the answer, I doubt that I will ever repeat that mistake!

 

Talk about a hard lesson to learn! :?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

  • 2 weeks later...

I'm getting that same error - I've checked my configure.php files (admin & catalog), and the database info is there. everything matches with what the server says, too. I hadn't even done anything to teh store - it just stopped working! All the posts say - "oh, now it works". But please excuse my newbieness - what EXACTLY do I need to do? What causes this? I didn't do anything to my server or to my stores.

Link to comment
Share on other sites

I'm getting that same error - I've checked my configure.php files (admin & catalog), and the database info is there. everything matches with what the server says, too. I hadn't even done anything to teh store - it just stopped working! All the posts say - "oh, now it works". But please excuse my newbieness - what EXACTLY do I need to do? What causes this? I didn't do anything to my server or to my stores.

Was this working and now suddenly stopped working or are you trying to get it working for the first time?

 

Does your server have a GUI control panel (e.g. cPanel, Plesk, Ensim)? If so, go into the MySQL database section and it should show the databases and the users that are assigned to the database. Verify that your osC database has a user assigned and that your configure.php files have that user, the proper password for the user, and the database defined.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I have Ensim, checked it out there, and all teh information appears to be right - it all matches. I do remember now, though that I was on teh server last night - I put in a new security certificate - it was a renewal - could that action have changed anything? The system was working and then just stopped.

Link to comment
Share on other sites

A new SSL certificate should not prevent the database from working.

 

Are you receiving any error messages or anything out of the ordinary?

 

When are you receiving the errors?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Just the error when I try to access the catalog or admin. It's been up & running - but I have two OSC (unrelated) sites on the same server, and BOTH went down today. Hmmm.

Link to comment
Share on other sites

BTW - here's the bottom of my configure.php (names have been changed)

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', username);

define('DB_SERVER_PASSWORD', password);

define('DB_DATABASE', 'database_com');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

If your account allows shell access (SSH), try to connect to the database from the command line.

 

The proper syntax would be:

mysql -u username -ppassword database_name

Note that there is a space between the -u and the username but there is no space between the -p and the password - they are smushed together.

 

Also, if this was all working and suddenly stopped, find out what (Apache, PHP, MySQL, etc.) was upgraded on your server the day it stopped working.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

For security reasons, I would write

mysql -u username -p database_name

Then, it prompts for the password and does not display it to the screen when you enter it.

 

Good luck,

Matt

Link to comment
Share on other sites

I have exactly the same issue. Site was working until this morning. When I try to load default.php in the catalog directory I get a permission error. I have checked the permissions using the file manager and the catalog directory is set to 755 with the files set to 644.

 

I have a test put a php test file in the catalog directory and get the same error. When I run the same file in the root directory it works. See:

 

http://www.goodygoody2shoes.com/test.php &

http://www.goodygoody2shoes.com/catalog/test.php

 

Any ideas?[/code]

Link to comment
Share on other sites

Have you asked your host if they changed anything? Perhaps they aren't displaying pages in subdirectories for some reason?

 

Good luck,

Matt

Link to comment
Share on other sites

They may have changed their configuration to run PHP with safe_mode enabled or something else.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I have placed a plain HTML file in the catalog directory and this is displayed.

 

The PHP test shows a variable Virtual Directory Support which is set to disabled any ideas what this does?

Link to comment
Share on other sites

For your catalog test I get:

 

Forbidden

You don't have permission to access /catalog/test.php on this server.

 

Considering that your root directory test works just fine it doesn't seem to be a php issue, but a directory permissions problem.

 

The virtual directory setting is not the problem.

Link to comment
Share on other sites

I have checked the catalog directory is set at 755 with all files at 644. Which I have not changed since the site went live 8 mths ago.

 

Is there anyway that the permissions shown in FileManager in the control panel are actually different than it is showing?

Link to comment
Share on other sites

Since your hosts just recently installed a new SSL certificate, perhaps they screwed something up with the configuration.

 

I would contact your host's support department and let them know that your web application is not able to access directories below the document root.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

I have placed a plain HTML file in the catalog directory and can access this.

 

I have asked them to look at it but may have to point them in a general direction.

Link to comment
Share on other sites

These are the safe mode settings from phpinfo();

 

safe_mode Off Off

safe_mode_exec_dir no value no value

safe_mode_gid Off Off

safe_mode_include_dir no value no value

 

The system is not in safe mode but does anyone know what safe_mode_exec_dir & safe_mode_include_dir do and what they default to if no value is set.

 

I have looked on the php site and cannot find any documentation.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...