Today will be the company's official website to get local test time, found that the verification code can not be shown, the company's official website used to do with Dede, find the Dede in the include/vdimgck.php, run alone, no error, do not show
Follow the file step-by-step to find the following code
Output text
$LASTC = ';
for ($i =0; $i < $rndcodelen; $i + +)
{
$BC = Mt_rand (0, 1);
$rndstring [$i] = Strtoupper ($rndstring [$i]);
$c _fontcolor = $fontColor [Mt_rand (0,4)];
$y _pos = $i ==0? 4: $i * ($font _size+2);
$c = Mt_rand (0, 15);
@ imagettftext ($im, $font _size, $c, $y _pos, $c _fontcolor, $font _file, $rndstring [$i]);
$LASTC = $rndstring [$i];
}
Originally here has a @ conforms to the @ conforms to remove, again runs, the procedure reported the call to undefined function imagettftext () The error, originally when the GD storehouse appeared the question
The GD library is turned on Via Phpinfo (), but there is no freetype and JPEG support but PNG support
It is estimated that freetype and JPEG are not installed
So the two software is installed
Yum Install freetype*
Yum Install libjpeg*
After the installation, find out where the library is installed.
Find/-name FreeType
Results in the/usr/include/freetype2/folder
Empathy Libjpeg in the/usr/include
Then enter the PHP source code of the PHP source code (downloaded code)/EXT/GD folder in the use of phpize to expand the installation
(My PHP is installed in/usr/local/php)
/usr/local/php/bin/phpize
./configure--with-freetype-dir=/usr/include/freetype2--with-jpeg-dir=/usr/include--with-php-config=/usr/local/ Php/bin/php-config
And then
Make
Make install
This completes the GD library in PHP to recompile
Reboot the Apache service issue to a successful resolution