如题,安装的时候按照贵站教程把所需要的xml,gd,jpeg png等等组件全部都按上了,安装过程中没有出现错误,apache mysql php文件浏览一切正常,在info中也看到了gd的enabled信息,但是死活就是出不来验证码图片,直接浏览验证码页则是空白页,error已经no,也不报错,请教怎么解决啊,谢谢谢谢!!
组件和apache等版本是:
红旗linux5.0
apache-2.2.6.tar.gz
mysql-5.0.41.tar.gz
php-5.2.4RC1.tar.bz2
PHP编译的时候是
./configure --prefix=/d/php --with-mysql=/d/mm --with-apxs2=/d/apache/bin/apxs --enable-track-vars
--enable-ftp --enable-inline-optimization --enable-trans-sid --with-libxml=/usr/xml
--with-gd=/usr/local/gd --with-png-dir=/usr/local/png --with-zlib-dir=/usr/local/zlib
--with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype
freetype-2.3.5
gd-2.0.33(安装gd的时候也with过jpeg png zlib freetype的路径了)
libxml2-2.6.11
jpegsrc.v6b
libpng-1.2.20
zlib-1.2.2
libxslt-1.1.12(这个我安装完之后总是报一个错误启动不起来apache所以没有安装)
PHP验证码代码
<?php
session_start();
if($act == "water")
{header ("Content-type: image/png");
$login_check_number = strtoupper(substr(md5(rand()),20,4));
session_register("login_check_number");
$im = @imagecreate (80, 20)
or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 200, 200, 200);//设置干扰像素,防止被OCR
for ($i=0;$i<=128;$i++)
{$point_color = imagecolorallocate ($im, rand(0,255), rand(0,255), rand(0,255));
imagesetpixel($im,rand(2,128),rand(2,38),$point_color);}//逐个画上验证码字符
for ($i=0;$i<=5;$i++)
{$text_color = imagecolorallocate ($im, rand(0,255), rand(0,128), rand(0,255));
$x = 5 + $i * 20;
$y = rand(1,5);
imagechar ($im, 5, $x, $y, $login_check_number{$i}, $text_color);}//输出PNG图像
imagepng ($im);imagedestroy ($im);die();
}
?>
调用就是<img src="*.php">
安装路径核实过NNNN遍了没有错误,帮帮忙!在线等啊!!! |