Jump to content


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


Admin Area Having Errors

Recommended Posts


Its been about 3 years since I last used osCommerce. In the past, I've set up numerous websites using it but I've come unstuck this time.

The shop area displays fine except for some missing images but those images don't exist anymore so that's not the issue.

The issue is the admin side of it (I've renamed the admin folder but for this, I'll revert to its original name). After I log in at http://mystore.com/admin/, I get the error :


Unable to determine the page link!

Function used:

tep_href_link('', '', 'NONSSL')

This is at http://mystore.com/admin/login.php?action=process

If I delete the last few characters to leave http://mystore.com/admin/ it will display the admin area but with missing items.

I've followed advice on here to comment out a line in admin/includes/application_top.php which is   $PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']); by putting // before it but doing that gives me a this page cannot be displayed error at http://mystore.com/admin/ before I even try to log in.

If I log in without using // and delete the characters when it throws up the tep_href_link error, the admin area appears but I can't do anything with it.

Images are missing but exist. A few images display that are in the same directory as the ones that aren't showing. There are no no correct headers displayed - its all like TABLE_HEADING_CUSTOMERS TABLE_HEADING_ORDER_TOTAL TABLE_HEADING_DATE_PURCHASED TABLE_HEADING_STATUS TABLE_HEADING_ACTION 

Products won't show up in the usual place in admin so I can't edit them. The layout of the admin side means I can see the most viewed products on the main admin page. If I click one of these, it will display as as a preview just as it does when you add a new item. But products won't show in add products/edit existing products menu.

None of the modules will appear either for me to edit.

I'm assuming the admin side isn't grabbing files necessary to display everything correctly. I should think its connecting to the MySQL database correctly as its allowing me to log in using my credentials and its displaying the products on the main admin page.

I originally used osCommerce and customized it back in 2008 when I set up the website for the shop I managed. I used it again and customized it in my next job when I did their online store. In 2013, I used the 2nd version I customized for a pub I helped out at as I could add Live Acts as "products" and edit the code to delete all references to the buy buttons and shopping cart. So I have quite a bit of experience of using the same customized version of oscommerce and editing both configure,php files when I move servers or start another website from the same code. I'm not setting up a new business. I used to collect film memorabilia and have decided to sell up and wanted an alternative to eBay.



Share this post

Link to post
Share on other sites

Exactly which osC version are you using? The current up to date version is 2.3.4[.1]BS Edge, available on GitHub (see my sig). If you added old code (add-ons or custom) to it, that code may be looking for old "defines" such as table names, that have been removed from the current version. Other missing defines (now hard coded) may be causing you the other problems. Anyway, your starting point is to find exactly what version you're on, and whether you're making changes that expect all the old table and file name defines which are now missing. I think there is a "compatibility" add-on somewhere that puts these defines back in.

Share this post

Link to post
Share on other sites

With a store that old, the first thing is to find out from your host whether they just upgraded PHP or something. I don't think it will run on anything more recent that maybe 5.2 or 5.3, and most hosts are up to at least 5.6 by now. Then look around for any PHP error logs (e.g., "error_log" files in various directories) and see if they give any clue about missing include files, such as those defining table names. Look in your hosting control panel at the "last modified" dates on all files -- has someone been fooling with your files since the last time you did anything? That could be a hacker, or a well-intentioned host trying to automatically fix code problems. If a hacker erased some files, you can compare against a recent backup to see if anything's missing, but if you don't have a backup somewhere, that could be a problem (I think you can get a fresh copy from the osC archives). Finally, the page link problem has been discussed many times before -- have you done a search on it (on this forum) and read what caused it and how to fix it? Different people may experience different causes, but they could still give you a clue what to look for.

Share this post

Link to post
Share on other sites

I've just been looking at the configure.php file from the admin side and may have stumbled upon the problem. When I FTP into the webspace, I put everything in the htdocs folder like I should. However, when I reference the admin area in the configure.pho file, I've not referenced that folder so that may be causing the issue.

The problem is, I've deleted everything so I'm uploading everything again to test my theory. It sort of makes sense as to why its not fetching certain things.

I've just downloaded the latest Edge release in your signature so I will start from scratch if my theory above isn't right. The only issue with that is the customization again. I need to install STS, Header Tags, Excel Populate, Paypal and a Discount addon.

The files from my old site are fine as they were downloaded as a complete backup in September 2015 when the site was up and running and fully functional.

Share this post

Link to post
Share on other sites