易截截图软件、单文件、免安装、纯绿色、仅160KB

php编译gd出错!(已解决)

php编译gd出错!(已解决)
在32位ubuntu9.04上编译php5.2.12,到gd时make出错:
ext/gd/libgd/.libs/gd_png.o: In function
`php_gd_gdImageCreatefromPngCtx':
/home/test/php-5.2.12/ext/gd/libgd/gd_png.c:142: undefined reference to
`png_check_sig'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] 错误 1
直接下载gd,在gd目录make也类似的错
gcc -g -O2 -o .libs/annotate annotate.o /usr/local/lib/libiconv.so
-Wl,-rpath -Wl,/usr/local/lib  -L/usr/local/lib
./.libs/libgd.so /usr/local/lib/libjpeg.so /usr/local/lib/libfreetype.so
/usr/local/lib/libpng14.so -lz -lm
./.libs/libgd.so: undefined reference to `png_check_sig'
collect2: ld returned 1 exit status
make[2]: *** [annotate] 错误 1
make[2]:正在离开目录 `/home/test/gd-2.0.35'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/test/gd-2.0.35'
make: *** [all] 错误 2
把php版本换为5.2.8也错,而且从上面单独编译gd错来看,与php无关.libpng已编译安装了的
网上搜索不到原因
补充:现在解决了.
可以参见
[url]http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3803631[/url]
可以算是php的一个bug,libpng-1.4.0源码中的libpng-1.4.0.txt有说明,已经取消了png_check_sig这个函
数,改用png_sig_cmp代替.自从libpng-0.90就已经反对使用png_check_sig函数了.这个帖子中采用修改php源码的方
法,编辑ext/gd/libgd/gd_png.c,将
if (!png_check_sig (sig, 8)) { /* bad signature */
换成
if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
但我不知道其他哪些地方有没有这个函数,所以我还是用libpng-1.2.35吧,看libpng-1.2.35.txt,就没有提
png_check_sig的事.
编译安装libpng-1.2.35后,php-5.2.12的make通过了


相关文档:

php——include语句


原文链接:http://www.phpdo.net/index.php/2010/02/02/1-9/
 
PHP中Include语句在用法上和require语句基本相同,但是他们还存在两点差异:
   机制不同
 Require语句在进行文件包含时,不管这条require语句是否被运行,都会将被包含代码中的文件包含进来。
 Include语句在进行文件包 ......

PHP高级语法(四)—— 面向对象(下)

8 访问类型
类型的访问修饰符允许开发人员对类成员的访问进行限制,这是PHP5 的新特性,但却是OOP语言的一个好的特性。而且大多数OOP 语言都已支持此特性。PHP5 支持如下3 种访问修饰符:
public(公有的、默认的),private(私有的)和protected(受保护的)三种。
public 公有修饰符,类中的成员将没有访问限制,所有的外部 ......

php环境搭建(自己也写一篇)

首先注意版本问题,一定要仔细查看php manual上的内容,如http://www.php.net/manual/en/install.windows.apache2.php 上有一个note:
Note
:
Apache 2.2 Support

Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named php5apache2_2.dll
rather than php5apache2.d ......

php环境搭建(自己也写一篇)

首先注意版本问题,一定要仔细查看php manual上的内容,如http://www.php.net/manual/en/install.windows.apache2.php 上有一个note:
Note
:
Apache 2.2 Support

Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named php5apache2_2.dll
rather than php5apache2.d ......

php 循环删除一个目录或清空一个目录


<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Mat ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号