darqawi Posted November 10, 2009 Posted November 10, 2009 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
darqawi Posted November 10, 2009 Author Posted November 10, 2009 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
Blakles Posted December 19, 2009 Posted December 19, 2009 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.
vyung Posted February 3, 2010 Posted February 3, 2010 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);
didika Posted April 28, 2010 Posted April 28, 2010 It's a compatibility issue with php5.3. download link below and replace phplot.php with this one. phplot.zip
dsalchow Posted August 2, 2011 Posted August 2, 2011 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
inouasakura Posted June 7, 2012 Posted June 7, 2012 Hi, I'm Wisnu I'm new user of oscommerce, this thread very helpful for me, sorry if my english is bad.
Milde Shag Posted February 24, 2013 Posted February 24, 2013 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.