php libpng错误 [英] php libpng error
问题描述
我正在运行测试机设置,以用作开发目的的本地主机.我已经从零开始进行了MySQL,Apache2,带有GD(libjpeg,libpng和php的freetype和xpm的php)的PHP5以及Zend Framework的构建.这是MacBook Pro.
除了libpng之外,其他所有东西都运行良好.运行在另一台计算机上运行的验证码脚本时出现以下错误:
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
php文件中的行是:
The line in the php file is:
$font=imagecreatefrompng($font_file);
我得到的只是蓝色背景,而不是上面带有文字的蓝色背景图像.
我已经将整个站点目录设置为777,所以我认为这不是权限问题,除非有一个临时目录设置不正确.
有什么建议吗?
谢谢
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
推荐答案
font = imagecreatefrompng(
font=imagecreatefrompng(
font_file);
font_file);
我得到的只是蓝色背景,而不是上面带有文字的蓝色背景图像.
我已经将整个站点目录设置为777,所以我认为这不是权限问题,除非有一个临时目录设置不正确.
有什么建议吗?
谢谢
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
这篇关于php libpng错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!