Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help needed, lots of error messages


Karyn

Recommended Posts

Can someone please tell me what I have done and how to fix it? I can't login through my administrator section now.  Help.

Thank you.

 

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home4/cathedr7/public_html/cathedraladmin/includes/functions/database.php on line 19

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home4/cathedr7/public_html/cathedraladmin/includes/functions/database.php:19) in /home4/cathedr7/public_html/cathedraladmin/includes/functions/sessions.php on line 200

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home4/cathedr7/public_html/cathedraladmin/includes/functions/database.php:19) in /home4/cathedr7/public_html/cathedraladmin/includes/functions/sessions.php on line 200

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Deprecated: Function eregi() is deprecated in /home4/cathedr7/public_html/cathedraladmin/includes/classes/language.php on line 87

Link to comment
Share on other sites

It Is most likely because your host upgraded the version of php on the server. The fact that you are seeing those means you are using an old version of oscommerce. These are the options you have:

 

- Change or add a command to hide the warnings. This is not the best way to go but will work for a quick fix.

 

- Ask your host to go back to the previous version. Again, not good.

 

- Fix the code. This is the next to the best fix but there could be many files to edit.

 

- Upgrade your shop to the latest Bootstrap version. This is the best option as far as the problem is concerned but requires most starting over, except for your database, so it is not a simple solution.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I agree that if this suddenly appeared out of the blue, that your host brought the PHP version out of the Stone Age. The first two choices Jack gave you are band-aids to hide the issue. Use the time thus bought to quickly make permanent fixes (choice 3 or 4). If your store is heavily modified, option 3 may be better, but in the long run you'll still be a lot better off going with option 4 and getting to the current code base. If your store isn't heavily customized, or it's all stuff that's simple to do, it's a no-brainer to preserve your data and scrap the old code by migrating your data to an osC 2.3.4BS install. After that, make an effort not to fall so far behind as new versions of osC are released. Do you want to spend your precious time constantly repairing an old store, or do you want to run your business?

Link to comment
Share on other sites

  • 1 month later...

Thank you.  I contacted my host and they reset it but then I had much trouble logging in as the administrator and have only just resolved this error.  So now I can login to my administrator page, but I cant access any of my product info if I view my live page (which my customers see).  I keep getting a 404 error.  I am really unsure where to go from here.  Pretty much I know how to load products onto the website and that's it.  I don't know how to do option 3 or 4.  Any pointers in the right direction though, are much appreciated and I thank you for your time. 

Link to comment
Share on other sites

Possibly you or your host mangled your .htaccess file at some point in trying to fix/roll back this, and it's no longer doing URL rewriting for SEO. That would be the most likely cause of a 404 error. Do you have some sort of SEO installed? Do you have a backup of your .htaccess file(s) (at least, the root one) that you can compare to your current one?

 

You absolutely have to do either option 3 or 4, and if you can't do it yourself, you'll have to hire someone. There's a commercial support requests area of this forum where you can post for hiring experienced osCommerce people.

Link to comment
Share on other sites

  • Save your old index.php under a new name, such as renaming it /catalog/old_index.php. This permits you to roll back to it if you need to.
  • Make a new entry point /catalog/index.php, as shown below. This is better than doing a dummy index.html, as it will catch the deep links into your site.
  • Install and tune your new osC 2.3.4BS in its own private directory. Make a copy of your database and migrate it to the current schema. When happy with it, move it over to your normal /catalog to replace the old store. Don't forget to update the two configure.php files.

An "under construction" index.php:

 

<?php
echo "<html>\n<head>Your Store Name Here</head>\n</head>\n";
echo "<body>\n<h1>Under Construction</h1>\n";
echo "<p>Don't worry, we'll be back soon, better than ever!</p>\n";
echo "</body>\n</html>\n";
?>
Link to comment
Share on other sites

If you current shop is working and not displaying errors, then just leave it live while the new one is worked on. In either case, the new shop should be developed in a sub-directory and then made live when it is ready.

 

If you want to disable the live shop, just create an index.html file and say the site is down for maintenance. Maybe include contact information so customers can reach you. Then rename the index.php and includes directory to something else.

 

For the new shop, see here for the steps needed to get yours converted.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 months later...

If you want to disable the live shop, just create an index.html file and say the site is down for maintenance. Maybe include contact information so customers can reach you. Then rename the index.php and includes directory to something else.

 

Renaming (or otherwise disabling) all index.php files is important and often overlooked. While the index.html will normally catch someone entering via just the domain name, many visitors will be entering via deep links from bookmarks and search engines, directly to index.php (or other modules). Therefore, you will want to disable those entry point(s). If there are other .php files that are being used for entry (e.g., a login.php), you might want to think about finding a way to disable all PHP files in the store. Perhaps an addtype and/or addhandler in /catalog/.htaccess to an invalid "PHP" module would do. Of course, you were smart and put your store in its own directory (e.g., /catalog) and not in the root, right? If not, you would have to re-enable PHP for other directories, rather than just disabling it for the store.

Link to comment
Share on other sites

That's why I said to rename the includes directory. That will break any links other than for the index.html but doing this isn't meant for a long-term solution. If it is to a long-term, then installing one of the down for maintenance addons should be used, IMO.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Since no one discussed the original error list that happened after PHP was upgraded, for completeness I'll mention what happened:

  • Deprecated: mysql_connect():  This started off the cascade of problems. PHP does something very stupid by sending such warning messages to the browser, and its developers should be flogged mercilessly. Anyway, at some point in the near future (possibly as early as PHP 7), you won't even be able to use the MySQL library. Your code will have to be changed to use MySQLi or PDO (which recent releases of osCommerce have already done, although some add-ons and templates may still use MySQL and need to be updated).
  • Warning: session_start(): Cannot send session cookie - headers already sent
  • Warning: session_start(): Cannot send session cache limiter - headers already sent  These two are a direct result of the mysql_connect() warning message. When anything is first sent to the browser, including warning messages, any accumulated "HTTP headers" are flushed out to the browser, and the program is barred (by default, anyway) from sending any more headers. These include things like the encoding, cookies, cache information, etc. If osC wants to send, say, a session cookie, it can't, and you get messages like these. The only fix is to get rid of the original warning message(s) or other content sent in error (blank lines at beginning or end of a PHP file, Byte Order Mark, stray typos, etc.).
  • Deprecated: Function eregi() is deprecated  This one says that you are using an older version of osCommerce, or even an older add-on. The eregi() and related calls were long ago deprecated, and will soon be unusable at all. The code needs to be updated to use more modern preg_* calls.

The upshot is that you're running very old osC code, and need to update pronto.

Link to comment
Share on other sites

That's why I said to rename the includes directory. That will break any links other than for the index.html but doing this isn't meant for a long-term solution. If it is to a long-term, then installing one of the down for maintenance addons should be used, IMO.

 

There are multiple ways to disable a shop, some easier and/or more thorough than others. Use whatever you're comfortable with, but the bottom line is that you need to catch all the ways that someone might (accidentally or maliciously) try to run the disabled shop's code.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...