Click here to Skip to main content
15,902,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm running a test machine setup to be used as localhost for development purposes. I've done a build from scratch of MySQL, Apache2, PHP5 with GD (libjpeg, libpng, and php's freetype and xpm), and Zend Framework. This is a MacBook Pro.

Everything is working great with exception of libpng. I'm getting the following error when running a captcha script that works on another machine:
PHP Warning: imagecreatefrompng(): gd-png error: cannot allocate libpng main struct in/Library/WebServer/Documents/.../kcaptcha.php on line 164


The line in the php file is:
$font=imagecreatefrompng($font_file);


Instead of the blue background image with text on it, all I get is the blue background.

I've set the entire site directory to 777, so I don't think it's a permission problem, unless there is a temp directory that';s not set right.

Any advise?

Thanks
Posted
Updated 3-Sep-10 8:35am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900