PHP Classes

error msg

Recommend this page to a friend!

      Make Banner Class  >  All threads  >  error msg  >  (Un) Subscribe thread alerts  
Subject:error msg
Summary:Invalid image dimensions
Messages:5
Author:nasser
Date:2007-08-05 00:05:12
Update:2012-08-01 15:17:19
 

  1. error msg   Reply   Report abuse  
Picture of nasser nasser - 2007-08-05 00:05:12
When I access makeban/makeban.php for the first time, I am getting the following error msg:

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in ....\httpdocs\makeban\makeban.class.php on line 118

Would you please help.

  2. Re: error msg   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2007-08-05 04:02:04 - In reply to message 1 from nasser
I am not getting the warning on screen or in my logs, but the problem may be the variable initialized as text... try changing line 113 of the makeban.class.php file

From

function createImage($imageXpos='', $imageYpos=''){

To

function createImage($imageXpos=0, $imageYpos=0){

And see if the warning does not go away, a work around is to lower your error reporting which can be accomplished in the makeban.php file, to match the default reporting for php you can add...

error_reporting(E_ALL ^ E_NOTICE);

Just put it at the top after the <?PHP tag

Dave

  3. Re: error msg   Reply   Report abuse  
Picture of nasser nasser - 2007-08-05 18:20:17 - In reply to message 2 from Dave Smith
Dave,

Thanks for the timely class and of course for the help.

I am still getting the error msg. Here is the link to my site:

etaxistand.com/makeban/makeban.php

  4. Re: error msg   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2007-09-09 09:00:57 - In reply to message 3 from nasser
Sorry for the delayed response, I never recieved notification that there was a reply...

I am thinking you may have GD version 1 installed on your server. The image appeared to indicate this. I have only tested on 2.0, but if you are interested in getting it working and you can verify that your server is using the older version, contact me via e-mail to dave-at-wagontrader-dot-com.

Dave

  5. Re: error msg   Reply   Report abuse  
Picture of rio rio - 2012-08-01 15:17:19 - In reply to message 2 from Dave Smith
I found the similar error report too.
The problem is because mistyping variables "imageXpos". In some places it was written as "imageXPos" with capitalized "P".
Just use your text editor and replace all imageXPos into imageXpos.
The error message will be gone.