Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cannot access admin page after migrating from localhost Edge 2.3.4


mmotala10

Recommended Posts

Hi All

I was really hoping someone could help with the problem I'm experiencing. I've tried to migrate my site from localhost to a live production server but can't seem to get the admin page to work. I've changed my configure.php files and the configure.php file for the main site seems to be working perfectly fine as I can access and run the site normally. However when I try to access the admin index.php I get the following error: 

Quote


Fatal error: Call to undefined function tep_href_link() in /home/user/public_html/live/catalog/admin/includes/application_top.php on line 174

 

Where 'live/catalog/' is the folder in which I have my site saved. I suspect that it might be something wrong with my configure.php file for the admin side but can't seem to grasp what exactly is incorrect. this is what I have currently: 

Quote

<?php
  define('HTTP_SERVER', 'http://websitename.com/live/catalog');
  define('HTTPS_SERVER', 'http://websitename.com/live/catalog');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/admin');
  define('HTTPS_COOKIE_PATH', '/admin');
  define('HTTP_CATALOG_SERVER', 'http://websitename.com/home/user/public_html/live/catalog/');
  define('HTTPS_CATALOG_SERVER', 'http://websitename.com/home/user/public_html/live/catalog/');
  define('ENABLE_SSL_CATALOG', 'false');
  define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/live/catalog/');
  define('DIR_WS_ADMIN', '/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/admin/');
  define('DIR_FS_ADMIN', '/home/user/public_html/live/catalog/');
  define('DIR_WS_CATALOG', '/live/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/live/catalog/');
  define('DIR_FS_CATALOG', '/home/user/public_html/live/catalog/');
  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
  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('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'websitename.com');
  define('DB_SERVER_USERNAME', 'user');
  define('DB_SERVER_PASSWORD', 'passwordHere');
  define('DB_DATABASE', 'dbName');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'timezoneHere');
?>
 

 

Thanks in advance to anyone who can help :) 

Link to comment
Share on other sites

Should be:

  define('HTTP_SERVER', 'http://websitename.com');
  define('HTTPS_SERVER', 'http://websitename.com');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/live/catalog/admin');
  define('HTTPS_COOKIE_PATH', '/live/catalog/admin');
  define('HTTP_CATALOG_SERVER', 'http://websitename.com/live/catalog');
  define('HTTPS_CATALOG_SERVER', 'http://websitename.com/live/catalog');
  define('ENABLE_SSL_CATALOG', false);
  define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/live/catalog/');
  define('DIR_WS_ADMIN', '/live/catalog/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/live/catalog/admin/');
  define('DIR_FS_ADMIN', '/home/user/public_html/live/catalog/admin/');
  define('DIR_WS_CATALOG', '/live/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/live/catalog/');
  define('DIR_FS_CATALOG', '/home/user/public_html/live/catalog/admin/');
  define('DIR_WS_IMAGES', 'images/');
  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_IMAGES', DIR_FS_CATALOG . 'images/products/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

 

Hi @frankl

Thanks for the speedy response. I've followed the format you've given me but no success. Below is the correct configure settings: 

Quote

define('HTTP_SERVER', 'http://websitename.com');
  define('HTTPS_SERVER', 'http://websitename.com');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/live/catalog/admin');
  define('HTTPS_COOKIE_PATH', '/live/catalog/admin');
  define('HTTP_CATALOG_SERVER', 'http://websitename.com/live/catalog');
  define('HTTPS_CATALOG_SERVER', 'http://websitename.com/live/catalog');
  define('ENABLE_SSL_CATALOG', 'false');
  define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/live/catalog/');
  define('DIR_WS_ADMIN', '/live/catalog/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/home/user/public_html/live/catalog/admin/');
  define('DIR_FS_CATALOG', '/home/user/public_html/live/catalog/admin/');
  define('DIR_FS_ADMIN', '/home/user/public_html/live/catalog/admin/');
  define('DIR_WS_CATALOG', '/live/catalog/');
  define('DIR_WS_IMAGES', 'images/');
  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/products/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_HTTPS_CATALOG', '/live/catalog/');
 

 

and yet when I try to access :http://www.websitename.com/live/catalog/admin/index.php I still get the error 

Quote


Fatal error: Call to undefined function tep_href_link() in /home/kchpaedf/public_html/live/catalog/admin/includes/application_top.php on line 174

 

Could it be that I'm simply trying to access it incorrectly ? I've also checked that I have no old htaccess file hanging around so that shouldnt be preventing it from being viewed ? 

Link to comment
Share on other sites

Spot on with that @frankl ! Seems my html_output.php file was corrupted, not sure how that happened actually, but to be safe I've re-uploaded a fresh copy of my admin folder . Brilliant help as always, that helped me get rid of the current error, though I think my configure.php file may still be incorrect since I'm receiving an internal server 500 error, and I've checked and removed all .htaccess files so those shouldn't be preventing my site from loading. Could file permissions be one of the underlying reasons for this ? I'm currently looping through to see if I can find one that has odd permissions set on it. 

Link to comment
Share on other sites

Make sure you haven't cached the page first, use another browser in incognito mode to be sure.

To be absolutely sure there are no .htaccess directives affecting access to admin, upload a .php file to the folder with a bit of simple html in it and see if you can navigate to that. If you can see that file then the problem is somewhere in your admin folder.

If your html_output.php file was corrupted there's a good chance other files were too. Rename your existing admin folder to admin-backup then upload admin anew and see if that works.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

Hey @frankl

Thanks for the guide. I've managed to solve the problem!

It was as you said a corrupted html_output.php file, which I managed to fix by uploading a fresh copy. I was still getting the internal server 500 error though even after uploading a  fresh copy, the culprit seemed to have been the admin configure.php  file. I had it was you had specified but it wasn't working for some reason so I decided to to a fresh install on the server and see what type of configure file it produced and voila that managed to solve the problem at hand. 

This is the current working configure.php format: 

Quote

<?php
  define('HTTP_SERVER', 'http://websitename.com');
  define('HTTPS_SERVER', 'http://websitename.com');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/dir1/catalog/admin');
  define('HTTPS_COOKIE_PATH', '/dir1/catalog/admin');
  define('HTTP_CATALOG_SERVER', 'http://websitename.com');
  define('HTTPS_CATALOG_SERVER', 'http://websitename.com');
  define('ENABLE_SSL_CATALOG', false);
  define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/dir1/catalog/');
  define('DIR_WS_ADMIN', '/dir1/catalog/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/dir1/catalog/admin/');
  define('DIR_FS_ADMIN', '/home/user/public_html/dir1/catalog/admin/');
  define('DIR_WS_CATALOG', '/dir1/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/dir1/catalog/');
  define('DIR_FS_CATALOG', '/home/user/public_html/dir1/catalog/');
  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
  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('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  
  
  //define('DIR_WS_IMAGES', '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('DB_SERVER', 'www.websitename.com');
  define('DB_SERVER_USERNAME', 'user');
  define('DB_SERVER_PASSWORD', 'dbPassword');
  define('DB_DATABASE', 'dbName');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'region');
?>
 

 

where dir1/catalog is the directory the store is located in. 

Seems some of the variable definitions weren't required for the 2.3.4 Edge version.

Once again thanks frankl ! Could not have done it without your expertise .

 

Link to comment
Share on other sites

If you've been editing .php files, and start getting a 500 error, it's quite possible that you left a blank or empty line at the very beginning of the file (before <?php) or after the very last line (after ?>). Check that. If you're using a poor quality editor (like Notepad), it may be difficult to see such corruption. Try using a good editor such as ViM or Notepad++.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...