Home > Article > Operation and Maintenance > The phpcms background verification code does not display in the Linux environment
Website environment:
Linux CentOS
php5.2.10
apache 2.2.11
Zend Opt3.3.3
Cause:
checkcode.php generates a file in .jpg format, but phpinfo() does not show that it supports the jpg format.
Solution:
1. Download jpegsrc.v6b.tar.gz and freetype-2.3.7.tar.gz files
2. Installation:
Checking jpeg library [root@www download]# rpm -qa | grep jpeg libjpeg-devel-6b-43.fc10.i386 libjpeg-6b-43.fc10.i386 Install jpeg library [root@www download]# tar -zxvf jpegsrc.v6b.tar.gz [root@www download]# cd jpeg-6b [root@www jpeg-6b]# ./configure --prefix=/usr/local/jpeg --with-freetype=/usr/local/freetype --enable-shared --enable-static [root@www jpeg-6b]# make [root@www jpeg-6b]# make intall Checking freetype library [root@www download]# rpm -qa | grep freetype freetype-2.3.7-1.fc10.i386 freetype-devel-2.3.7-1.fc10.i386 Install freetype library [root@www download]# tar -zxvf freetype-2.3.7.tar.gz [root@www download]# cd freetype-2.3.7 [root@www freetype-2.3.7]# ./configure --prefix=/usr/local/freetype --enable-shared --enable-static [root@www freetype-2.3.7]# make [root@www freetype-2.3.7]# make intall
3. Now start installing php-5.2.10.
First enter the php source code directory.
#make #make install #cp php.ini-recommended /usr/local/php/etc/php.ini #echo AddType application/x-httpd-php .php>>/usr/local/apache2/conf/httpd.conf
Finally, based on the installation completion information returned by make install.
You may want to add: /usr/local/php/lib/php to your php.ini include_path
Add the path to include_path in the php.ini file and save it.
At this point, PHP is installed.
4. Check the phpinfo() file. The returned result shows that gd supports jpeg format.
5. Now install PHPCMS2008 SP2 and enter the background login interface. everything is normal.
Recommended tutorial: linux tutorial
The above is the detailed content of The phpcms background verification code does not display in the Linux environment. For more information, please follow other related articles on the PHP Chinese website!