Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEED HELP! deprecated functions and other errors after install


mondobongo3

Recommended Posts

Hy! I'm new here :)

I have just installed oscommerce and gived it a test on localhost. On Banner Manager i got a entire list of errors. Please help me fix them, because I don't want to use elder version of PHP.

Below is the list of errors.

Thank you very much !

 

Banner Manager

 

Deprecated: Function eregi() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 782

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 939

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 939

 

Deprecated: Function ereg_replace() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 677

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 678

 

Deprecated: Function ereg_replace() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 677

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 678

 

Deprecated: Function ereg_replace() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 677

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 678

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 675

 

Deprecated: Function ereg_replace() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 677

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 678

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 679

 

Warning: imagefontwidth() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 680

 

Warning: imagestring() expects parameter 2 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 689

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 675

 

Deprecated: Function ereg_replace() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 677

 

Deprecated: Function split() is deprecated in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 678

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 679

 

Warning: imagefontwidth() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 680

 

Warning: imagestring() expects parameter 2 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 689

Link to comment
Share on other sites

this issue because some fiction of php in oscommerce doesn't support php v5.3, you need to patch it.

 

http://www.oscommerce.com/forums/topic/341025-function-eregi-is-deprecated/

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

this issue because some fiction of php in oscommerce doesn't support php v5.3, you need to patch it.

 

http://www.oscommerce.com/forums/topic/341025-function-eregi-is-deprecated/

 

I noticed that post (and some others on similar issues) before posting mine... the only reason why I posted is that I i don't know PHP. As I could see, there are minor sintax differences in using the new functions, accepted by php 5.3.

 

for example, on Admonistration panel, under My Store, i got this:

Deprecated: Function ereg() is deprecated in G:\xampplite\htdocs\catalog\admin\configuration.php on line 80

the code on that line is:

if (ereg('->', $use_function)) {

As I see the sittuation, I must replace ereg() with preg_match()... but, what else to change, becaus just replacing that is not enough ? I have no idea on php syntax. Maybe a brief explanation would help me to understand the principle and make all changes by myself.

 

Thank you.

Link to comment
Share on other sites

It's explained in the reference article and in

http://www.oscommerce.com/forums/topic/341737-function-ereg-replace-is-deprecated/page__p__1434612__hl__eregi%20deprecated__fromsearch__1entry1447311

http://www.oscommerce.com/forums/topic/342525-page-script-error/page__p__1430745entry1430745

http://us.php.net/manual/en/migration53.deprecated.php

http://www.oscommerce.com/forums/topic/281009-contribution-oscthumb/page__view__findpost__p__1488216

 

You have no choice but to edit your PHP code to change references to various "deprecated" PHP functions. There will not be any further releases of 2.2, that's for certain, so you have to do it. I have no idea what @web-project meant when he said "because some fiction of php in oscommerce doesn't support php v5.3", but the fact is that certain old PHP functions (including ereg) are being removed from PHP effective PHP 6.0. As of 5.3 you get nagged about it to remind you to fix your code.

 

It is not sufficient to just change the function name. The argument syntax changes too.

Link to comment
Share on other sites

 

THANKS MrPhil ! I reparied the code :D

 

Now, one more set of problems... what is wrong with this functions? (still in Banner Manager)

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 675

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 679

 

Warning: imagefontwidth() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 680

 

Warning: imagestring() expects parameter 2 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 689

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 675

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 679

 

Warning: imagefontwidth() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 680

 

Warning: imagestring() expects parameter 2 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 689

Link to comment
Share on other sites

THANKS MrPhil ! I reparied the code :D

 

Now, one more set of problems... what is wrong with this functions? (still in Banner Manager)

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 675

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 679

 

Warning: imagefontwidth() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 680

 

Warning: imagestring() expects parameter 2 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 689

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 675

 

Warning: imagefontheight() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 679

 

Warning: imagefontwidth() expects parameter 1 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 680

 

Warning: imagestring() expects parameter 2 to be long, string given in G:\xampplite\htdocs\catalog\admin\includes\classes\phplot.php on line 689

 

if you done everything correctly, you will see different result, as you need to patch the phplot.php file too.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...