Environment: centos6.4 (64-bit), Apache/2.2.24 (Unix), PHP/5.4.21
Problem: The verification code of the new project (with OneThink as the framework) cannot be displayed, prompting the lack of freetype. solution: to reinstall php, follow these steps:PHP installation
Consider the things required for installing SVN (Apache) and OneThink.
1. install dependency yum install perl yum install libxml2 yum install libxml2-devel yum install libjpeg-devel yum install libpng-devel yum install freetype-devel yum install gd-devel yum install curl-devel 2. configure source code cd ~ /Src // go to the directory where the source code 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 install cp php. ini-production/usr/local/php5/etc/php. ini 3. restart the Apache server and use phpinfo to check whether php is successfully installed. Service apache2 restart is in the default website directory. Create a php file and use web browser or wget for testing. (If the curl is not enabled, check php. whether the ini file has extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/" extension = curl. so can be added without saving)
The following error occurs during compilation:
checking for jpeg_read_header in -ljpeg... yesIf configure fails try --with-vpx-dir=<DIR>checking for png_write_image in -lpng... yesconfigure: error: libXpm.(a|so) not found.
Cause: the general search and compilation path for configure is/usr/lib/, because php searches for related library files (from the internet) under/usr/lib/by default. solution: the host is an x64 platform,
Ln-s/usr/lib64/libXpm. so */usr/lib/
And it is specified during compilation, -- 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
After that, no errors will occur. Run make and make install to install the agent. If you are re-installing the agent, you do not need to configure php. ini.CpPhp. ini-production/Usr/local/php5/etc/php. Ini has been tossing for a long time last night and is finally tossing. After that, the OneThink verification code will be displayed normally.