Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] PHP Image Creation problems & MacOSX



I've got a fairly simple php script which creates a simple gif image.
Now, if I use this script on my primary webhost, everything works
correctly and the image is created.

However, I would also like to see it working on my local machine and in
this case, I just get back the standard broken image icon.

I am guessing something is not configured properly, but I am uncertain
as to what that might be. Although, I'm pretty sure it has to do with that GD is not installed automatically with the standard Apache/PHP installation under MacOSX.


Assuming this is it, what is the best way to get GD up and running with PHP?

Otherwise, does anyone have any ideas?

Here's the php script...

<?php
header ("Content-type: image/gif");
$im = imagecreate (50, 100);
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 1, 5, 5,  "A Simple Text String", $text_color);
imagegif ($im);
imagedestroy ($im);
?>
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.