Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error message in banner manager


darqawi

Recommended Posts

Posted

Hello

 

Can anyone shed any light on this please?

 

Im getting the following error message when I go to the banner manager (which is working and hasn't had any changes made to it)

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

 

I haven't edited the file it refers to so I'm not sure what has created the problem, all other areas of admin work fine with no errors.

 

Thanks.

Any land is a brave mans country

Posted

I seem to have fixed this although I don't really know how....using Google I found the following post from the German forum. I copied all of the code and replaed my phplot.php file and the error message has disapeared!

 

I'd still appreciate any insight into it if anyone can offer some.

 

It seems to very rare with only one other mention of it on this forum, when the site goes onto a live sever I will test the original phplot file to see if the warning reappears.

Any land is a brave mans country

  • 1 month later...
Posted

I seem to have fixed this although I don't really know how....using Google I found the following post from the German forum. I copied all of the code and replaed my phplot.php file and the error message has disapeared!

 

I'd still appreciate any insight into it if anyone can offer some.

 

It seems to very rare with only one other mention of it on this forum, when the site goes onto a live sever I will test the original phplot file to see if the warning reappears.

It's a compatibility issue with php5.3.

  • 1 month later...
Posted

Converting the string to (int) worked for me.

 

Change:

 

$which_ypos = $which_ypos - ImageFontHeight($which_font);
$height = ImageFontHeight($which_font);
$width = ImageFontWidth($which_font);
ImageString($this->img, $which_font, $xpos, ($i*$height + $which_ypos), $str[$i], $which_color);

 

To:

$which_ypos = $which_ypos - ImageFontHeight( (int)$which_font );
$height = ImageFontHeight( (int)$which_font );
$width = ImageFontWidth( (int)$which_font );
ImageString($this->img, (int)$which_font, $xpos, ($i*$height + $which_ypos), $str[$i], $which_color);

  • 2 months later...
  • 1 year later...
Posted

download link below and replace phplot.php with this one.

 

phplot.zip

 

 

Hi Irgendwie geht der download nicht obwohl ich mich angemeldet habe

 

Gruß

 

Dirk

  • 10 months later...
  • 8 months later...
Posted

Converting the string to (int) worked for me.

 

Change:

 

$which_ypos = $which_ypos - ImageFontHeight($which_font);
$height = ImageFontHeight($which_font);
$width = ImageFontWidth($which_font);
ImageString($this->img, $which_font, $xpos, ($i*$height + $which_ypos), $str[$i], $which_color);

 

To:

$which_ypos = $which_ypos - ImageFontHeight( (int)$which_font );
$height = ImageFontHeight( (int)$which_font );
$width = ImageFontWidth( (int)$which_font );
ImageString($this->img, (int)$which_font, $xpos, ($i*$height + $which_ypos), $str[$i], $which_color);

 

This is actually correct afik I havn't tested it yet but about to do so. This can also be found here and GITHUB.

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

Thanks to Matt for these links.

I hope you dont mind this post here.

I'm considering 2.33 currently running 2.2rc2a I think?

GL

  • 3 months later...
Posted

Thanks for this fix :)

It worked for me!!

Archived

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

×
×
  • Create New...