andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


PHP error wit cropToDimensions

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas
View previous topic :: View next topic  
Author Message
41200
Newbie


Joined: 27 Sep 2003
Posts: 2

PostPosted: Sat Sep 27, 2003 2:12 pm    Post subject: PHP error wit cropToDimensions Reply with quote

I copied you script from your pages, and i installed php_gd2.dll (my server working on w2k).
If i used your samples, system wrote me:
Code:
PHP Notice:  Undefined variable:  position in class.cropcanvas.php on line 186
and not created images.
Can me say, where are error ?

Thank you
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Sat Sep 27, 2003 3:25 pm    Post subject: Reply with quote

Hi there, and welcome to the board!

The problem lies with the fact that I have an un-used variable in one of the functions (cropToDimensions) and you have your PHP errors set to give you notices as well as other error types. To fix the notice, change line 186 from this:

Code:
return ($this->_cropSize($sx, $sy, $nx, $ny, $position, 'cropToDimensions'));


to this:

Code:
return ($this->_cropSize($sx, $sy, $nx, $ny, null, 'cropToDimensions'));


and that should get rid of the notice.

I don't think that notices should stop the script from working. So if it's not producing the images then you may have other problems. Make sure you have the permissions set to write the files.

Regards,

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
41200
Newbie


Joined: 27 Sep 2003
Posts: 2

PostPosted: Sat Sep 27, 2003 3:32 pm    Post subject: Reply with quote

Thx for your correct Smile

now working normaly.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group