Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

error on website, also can login anymore


koenelinos

Recommended Posts

Posted

hi

 

my website always worked fine but from today on i get an error:

 

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/database.php on line 19 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/database.php:19) in /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/sessions.php on line 102 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/database.php:19) in /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/sessions.php on line 102 Warning: Cannot modify header information - headers already sent by (output started at /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/database.php:19) in /customers/0/e/1/bullbarcenter.be/httpd.www/admin/includes/functions/general.php on line 34

 

i asked my host and they say i have to updat my CMS

 

but how do i do this and will i have to setup my whole website again?

 

thank you for reading!

Posted

Sounds like your host might have updated some of their software...what did they say when they advised you of the need to update your CMS?   Also what version of osC are you using? 

 

Dan

 

Hi Dan, i don't know what version i am using, it is a version from 2012 i think, they only said i have to update my CMS, i don't know much about website building, i only know my website is down now and that's not good, they just started finding it on the web

Posted

When you say "CMS", are you talking about osCommerce? That's what we support in this forum (and technically, it's not a CMS). If you actually have Drupal, Joomla, WordPress, etc., they have their own support forums. The error message sounds like it could be from osC.

 

Do you know what version of PHP your host just upgraded to? Maybe they just started giving "deprecated" ("don't use, we're going to get rid of it") warnings for MySQL. For a while now, osCommerce has used MySQLi, so either you have an outdated add-on installed, or you really have an old osC 2.2 installation. If someone sold it to you in 2012, they ripped you off. They should have installed osC 2.3.3 or 2.3.4 by that point. Who knows if it's worth suing them. In any case, you'll need to upgrade to osC 2.3.4, which is the current version. If you're actually at osC 2.2-something, you'll have to install 2.3.4 and migrate your data over. It's been discussed many times on this forum.

Posted

When you say "CMS", are you talking about osCommerce? That's what we support in this forum (and technically, it's not a CMS). If you actually have Drupal, Joomla, WordPress, etc., they have their own support forums. The error message sounds like it could be from osC.

 

Do you know what version of PHP your host just upgraded to? Maybe they just started giving "deprecated" ("don't use, we're going to get rid of it") warnings for MySQL. For a while now, osCommerce has used MySQLi, so either you have an outdated add-on installed, or you really have an old osC 2.2 installation. If someone sold it to you in 2012, they ripped you off. They should have installed osC 2.3.3 or 2.3.4 by that point. Who knows if it's worth suing them. In any case, you'll need to upgrade to osC 2.3.4, which is the current version. If you're actually at osC 2.2-something, you'll have to install 2.3.4 and migrate your data over. It's been discussed many times on this forum.

 

Hi, i don't know a lot of website building, i got a 2010 version they say, they just updated php to 5.6, where can i see what version i have and how i update my osCommerce?

 

thank you

Posted

Even a 2010 installation should have used osC 2.3.something. Look in includes/application_top.php and see what osC version it says it is. If it's 2.2-something, you were ripped off.

Posted

Even a 2010 installation should have used osC 2.3.something. Look in includes/application_top.php and see what osC version it says it is. If it's 2.2-something, you were ripped off.

 

It is 'osCommerce Online Merchant v2.3'

 

Can anyone upgrade it for me? i'm not good at it. or is it better i start all over with a new version?

Posted

@@koenelinos For your options see the thread that Heather posted here...it should be a sticky or there should be a sticky about it...seems to be one of the most asked questions.

 

http://www.oscommerce.com/forums/topic/401422-login-to-admin/?p=1717397

 

If you don't want to do it yourself there is a commercial support thread here (look at the top of the forums for the topic) where you can get a quote for the work involved.

 

Dan

Posted

Hi - sticking plaster job

 

You store works but admin does not? In the store side PHP errors are suppressed, on the admin they are not - what you are seeing is the error output which then throws the headers already sent.

 

If you look at the admin/includes/application_top.php file they'll be a line something like

// Set the level of error reporting
  error_reporting(E_ALL & ~E_NOTICE);

change that to

// Set the level of error reporting
//  error_reporting(E_ALL & ~E_NOTICE);
/hide all possible errors
error_reporting(0);
//overrides php.ini setting
ini_set('display_errors', '0');

That should let you login to the admin area for the time being.

 

The PHP warnings are telling you that your install uses mysql queries and they are going to be phased out in favour of mysqli / PDO - you can look at upgrading the store or else try this http://addons.oscommerce.com/info/8703 - I have not tried that one but it looks OK - grab a copy of xampp with the PHP 5.6.3 (https://www.apachefriends.org/index.html) and test your changes on a localhost first

Posted

Good information @@Bob Terveuren.  

 

Another point worth mentioning is the use of the admin directory which I think we usually suggest be renamed for security reasons. 

 

Now is there a place where this information can be added or plastered to?  :)

 

Dan

Posted

OK, osC 2.3 (2.3.0) is known to be incompatible with recent PHP versions (5.3 may be the latest it can run with). You should first back up your files and database, and then apply the upgrade to 2.3.1, then to 2.3.2, etc., 2.3.3, 2.3.3.1, 2.3.3.2, 2.3.3.3, 2.3.3.4, and finally, 2.3.4. Unfortunately there's no canned provision for jumping all the way, just the incremental steps. They're not major jobs, just keeps you busy for a few hours. At the end, you should have a genuine PHP 5.6-compatible osC 2.3.4, updated database, and all your add-ons should still be there (but no promises!). It's always possible that whoever set this up for you put in some strange code that will break the upgrade process. Once you're up and running, please try to periodically upgrade so you don't fall so far behind again.

 

If you're not confident about your site maintenance skills, hire someone to do it for you.

Posted
// Set the level of error reporting
//  error_reporting(E_ALL & ~E_NOTICE);
//hide all possible errors <----- waaah missed a slash there
error_reporting(0);
//overrides php.ini setting
ini_set('display_errors', '0');

 

change that to

// Set the level of error reporting
//  error_reporting(E_ALL & ~E_NOTICE);
/hide all possible errors
error_reporting(0);
//overrides php.ini setting
ini_set('display_errors', '0');

Got that wrong should be:

 

 

Posted

Bob's change will suppress the error message, and enable you to keep running for now. However, in the long run, you will run into more and more problems with this old-code-on-new-PHP setup, and will have to upgrade. Start the upgrade process now, before it becomes an emergency.

Archived

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

×
×
  • Create New...