problems with GD!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
doctorsrp
Forum Newbie
Posts: 10
Joined: Fri Feb 20, 2004 12:08 am

problems with GD!

Post by doctorsrp »

Ok guys, I've looked everywhere and there doesnt seem to be an answer... I'm trying to enable GD 1 or 2 (it doesnt matter) on PHP 4 running under Apache 1.3. I have changed the root extension dir directive to point to the correct place c:/php. I have un-commented the extension includes for 'extension=php_gd.dll' and 'extension=php_gd2.dll' in the php.ini file and i'm running out of answers.

I get the error:

Fatal error: Call to undefined function: imagecreate() in c:\work\php\test.php on line 3

Please any suggestions welcome

Thanks in advance

samson
User avatar
Dr Evil
Forum Contributor
Posts: 184
Joined: Wed Jan 14, 2004 9:56 am
Location: Switzerland

Post by Dr Evil »

Have you restarted your server ?
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

have you looked at phpinfo()?

if not, write a file like this:

Code: Select all

<?php phpinfo(); ?>
and save it, then open it in a browser. itll tell all the extensions you have running, and all your settings. lots of good info =)

also if you have a php startup log make sure that the extensions are loading.

ive also found that if your using windows its usually easier just to copy all the extensions you want to use to "\windows\system32" directory instead of telling php where to look for them.
doctorsrp
Forum Newbie
Posts: 10
Joined: Fri Feb 20, 2004 12:08 am

Still having GD problems

Post by doctorsrp »

thanks for the responses guys, still no luck though i'm affraid. One thing that I have noticed though is that having just installed Zend (php IDE) the php.ini file apparently is located in the c:/windows directory although it doesnt appear to be there!!!

Any ideas?

Cheers
tsg
Forum Contributor
Posts: 142
Joined: Sun Jan 12, 2003 9:22 pm
Location: SE, Alabama
Contact:

Post by tsg »

try adding :

header("Content-type: image/jpeg");
Post Reply