imagecopyresampled and imagecopyresized

images php coding issues or problems here.

Moderators: macek, egami, gesf

nick_k
New php-forum User
New php-forum User
Posts: 34
Joined: Wed Dec 25, 2002 6:04 am
Location: The Netherlands
Contact:

imagecopyresampled and imagecopyresized

Postby nick_k » Sun Mar 09, 2003 7:16 am

i have a script that needs imagecopyresampled, but when i use it, i get and error that sais that its a call it an undefined function. Next, i tried imagecopyresized, but it sais the same thing. I have PHP Version 4.3.1, and Apache/1.3.27. Any ideas?

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Sun Mar 09, 2003 11:16 am

4.3.0 and thus 4.3.1 were shipped (umm distroed) with GD2.0.4 which accomodates imagecopyresampled.

If you are getting an undefined func return, I'd guess your host has disabled GD - probably through prior misuses and Thomas's snags with memory allocation.

nick_k
New php-forum User
New php-forum User
Posts: 34
Joined: Wed Dec 25, 2002 6:04 am
Location: The Netherlands
Contact:

Postby nick_k » Sun Mar 09, 2003 1:07 pm

this is my own personal server, so how would i enable GD then?

Xerpher
New php-forum User
New php-forum User
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada
Contact:

Postby Xerpher » Sun Mar 09, 2003 1:15 pm

I had to download a php_gd2.dll (just ask and I'll email it to you) and then edit the line in php.ini where:

Code: Select all

;extension=php_gd2.dll
to

Code: Select all

extension=php_gd2.dll

nick_k
New php-forum User
New php-forum User
Posts: 34
Joined: Wed Dec 25, 2002 6:04 am
Location: The Netherlands
Contact:

Postby nick_k » Wed Mar 12, 2003 6:18 am

thanks for your help Xerpher, but i found a much simpler way to make preview of images (and a pretty obvious way actually), i just did this <img src = whatever.jpg height = 120 width = 120>

psycho
New php-forum User
New php-forum User
Posts: 10
Joined: Tue Nov 26, 2002 5:35 am
Location: The Nehterlands
Contact:

Same problem here

Postby psycho » Thu Mar 13, 2003 10:41 am

But Xerpher,

If i delete the ; from the

Code: Select all

;extension=php_gd2.dll

line i get another error

:?

have a nice day

Xerpher
New php-forum User
New php-forum User
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada
Contact:

Postby Xerpher » Thu Mar 13, 2003 6:40 pm

Did you put the php_gd2.dll file in your php directory like I told you to?


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 2 guests