PHP is not a verification code to identify Onethink-resolve the overturn

Source: Internet
Author: User
Tags install perl
Environment: centos6.4 (64-bit), apache/2.2.24 (Unix), php/5.4.21
Issue: The new project (with the Onethink frame) Verification code cannot be displayed, prompting the absence of FreeType.

Solution: Reinstall PHP

The steps are as follows:

PHP Installation
To consider what you need to install SVN (Apache), Onethink stuff

1. Install dependencies yum Install Perl yum install libxml2 yum install libxml2-devel yum install libjpeg libjpeg-devel yum install LIBPN G-devel Yum install freetype-devel yum install gd-devel yum Install Curl Curl-devel 2. Configure the source CD ~/SRC//Go to the directory where the source code compressed package is stored. Tar zxvf php-5.3.13.tar.gz cd php-5.3.13/./configure--prefix=/usr/local/php5--with-apxs2=/usr/local/apache2/bin/ Apxs--with-mysql=/usr/local/mysql--with-gd--with-zlib--with-jpeg-dir=/usr/lib64/--with-png-dir=/usr/lib64/-- with-freetype-dir=/usr/lib64/--enable-gd-native-ttf--enable-sockets--with-iconv--enable-mbstring-- With-config-file-path=/usr/local/php5/etc--enable-zlib=/usr/lib64/--enable-zip--with-curl--with-xpm-dir=/usr/ Lib64/make make install CP Php.ini-production/usr/local/php5/etc/php.ini 3. Restart the Apache server and use Phpinfo to see if the PHP installation was successful. Service apache2 Restart in the default Web site directory, create a new PHP file, and then use the Web browser or wget test (if Curl is not turned on, check to see if the php.ini file exists Extension_dir = "/usr/ local/php5/lib/php/extensions/no-debug-non-zts-20090626/"extension = curl.so does not exist addTo 



The following error will appear at compile time:

Checking for Jpeg_read_header in-ljpeg ... yesif configure fails try--with-vpx-dir= checking for
 
  
   
  Png_write_ Image in-lpng. yesconfigure:error:libXpm. (A|SO) not found.
 
  

Reason:

Configure general Search compilation path is/usr/lib/, because PHP by default in/usr/lib/to find the relevant library file (excerpt from the online)

Solution:

The host is the x64 platform,
Ln-s/usr/lib64/libxpm.so*/usr/lib/

and is specified at compile time,--with-xpm-dir=/usr/lib64/x11

./configure--PREFIX=/USR/LOCAL/PHP5--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql-- WITH-GD--with-zlib--with-jpeg-dir=/usr/lib64/--with-png-dir=/usr/lib64/--with-freetype-dir=/usr/lib64/-- Enable-gd-native-ttf--enable-sockets--with-iconv--enable-mbstring--with-config-file-path=/usr/local/php5/etc-- enable-zlib=/usr/lib64/  --enable-zip--with-curl  --with-xpm-dir=/usr/lib64/x11





There will be no errors after that, run make and make install, and if it is reinstalled, do not configure php.ini

CP php.ini-production/usr/local/php5/etc/php. ini



Last night toss a long time, finally toss good, after Onethink verification code can be normal display.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.