Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Moving to a new hosting server... need help with configure file


nikko50

Recommended Posts

Hi there. I am moving to a new hosting service, and when I go to the admin page, I am getting a 500 internal server error. Need help with the configure.php file.

 

<?php

define('HTTP_SERVER', 'http://www.mystore.com');

define('HTTP_CATALOG_SERVER', '/');

define('HTTPS_CATALOG_SERVER', 'http://www.mystore.com');

define('ENABLE_SSL_CATALOG', 'false');

define('DIR_FS_DOCUMENT_ROOT', '/public_html/');

define('DIR_WS_ADMIN', '/public_html/admin/');

define('DIR_FS_ADMIN', '/public_html/admin/');

define('DIR_WS_CATALOG', '/');

define('DIR_FS_CATALOG', '/public_html/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'username');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'dbase');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

 

define('DIR_WS_FLAGS', DIR_WS_IMAGES . 'geo_flags/');

?>

 

Thank you !

Link to comment
Share on other sites

If the admin is secured by a .htaccess file you will find this useful.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Here is the exact error I am getting. Thank you all for your help !

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@@website.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

~Sharon

Link to comment
Share on other sites

This:

 

 define('DIR_WS_ADMIN', '/public_html/admin/');

 

Needs to be this instead:

 

 define('DIR_WS_ADMIN', '/admin/');

 

Judging from the other details posted.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Are you POSITIVE the admin folder has no .htaccess file?

 

If you are looking for it via cPanel you may have to toggle a "show hidden files" switch to be able to see it as it is a hidden file by default.

 

Check the error log to see what errors are being thrown. If you have no error log have your host help you set one up.

 

Without some error mesage it's probably going to be extremely hard to find/fix.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

All of these entries are probably wrong:

define('DIR_FS_DOCUMENT_ROOT', '/public_html/');
define('DIR_WS_ADMIN', '/public_html/admin/');
define('DIR_FS_ADMIN', '/public_html/admin/');
define('DIR_FS_CATALOG', '/public_html/');

 

Unless you have a very strangely set up host, "public_html" is not normally at root level. Usually it will be something like "/home/ACCOUNTNAME/public_html/". DIR_FS_* wants a complete filesystem path, starting at /home, while DIR_WS_* starts with / after public_html. Try something like

define('DIR_FS_DOCUMENT_ROOT', '/home/ACCOUNTNAME/public_html/');
define('DIR_WS_ADMIN', '/admin/');
define('DIR_FS_ADMIN', '/home/ACCOUNTNAME/public_html/admin/');
define('DIR_FS_CATALOG', '/home/ACCOUNTNAME/public_html/');

 

Consult with your hosting tech support if you don't know what to fill in there.

 

You might also look at a fresh copy of osC, which defines the DOCUMENT_ROOT and then uses that in the other "FS" entries. Is there some reason you decided to rewrite everything?

Link to comment
Share on other sites

If you don't know the path on the server to your site run this:

 

<?php
echo $_SERVER['DOCUMENT_ROOT'];
?>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If the installer was run, then more than likely, the path is correct. if the files were uploaded correctly to the hosting account, then the /admin/ directory HAS an .htaccess file. It comes with osCommerce.

 

Check the .htaccess file, check your php.ini file and check your path. We can't help you unless you give us something to work with.

 

 

 

Chris

 

tip: in most cases, your hosting provider will help you configure your site on their server at no cost.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...