Pro-Test Install PHP
1. Tar zvxf php-5.3.8.tar.gz
2. CD php-5.3.8
3.
./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--WITH-APXS=/USR/LOCAL/APACHE2/BIN/APXS \
--with-libxml-dir=/usr/local/libxml2
A problem occurred:
Configure:error:xml2-config not found. Please check your LIBXML2 installation.
[Email protected] php-5.3.28]#--prefix=/usr/local/php \
-------------------------------------------------------
Solution:
Check if the LIBXM package is installed
[Email protected] php-5.3.8]# Rpm-qa |grep libxml2
libxml2-2.6.26-2.1.12
libxml2-python-2.6.26-2.1.12
Reinstall the LIBXML2 and Libxml2-devel packages
Yum Install LIBXML2
Yum Install Libxml2-devel-y
Find out if the Xml2-config file exists after installation
[[email protected] php-5.3.8]# Find/-name "Xml2-config"
/usr/bin/xml2-config
Reinstall PHP if it exists
[Email protected] php-5.3.8]#./configure
The sign of successful installation is the presence of a license
--------------------------------------------------
And then re-
4.
Make && make install
Cd/usr/local/apache2/conf
Ls
"Httpd.conf" is the read-only (add! To override) Modification method
-----------
Solution:
chmod 777 httpd.conf
VI mode
: Set Nu appears line number
ESC exits edit mode
: wq! Force Save exit
Line No. 309 Find AddType application/x-gzip. gz. tgz Add the following below
AddType application/x-httpd-php. PHP (with spaces in front)
AddType Application/x-httpd-php-source. PHPS (front with spaces)
MV php.ini-production php.ini.dist Heavy Command
Method Two: Install LIBXML2 (not tested)
1 tar zxvf libxml2-2.6.32.tar.gz
2 CD libxml2-2.6.32
3./configure--PREFIX=/USR/LOCAL/LIBXML2
4 Make
5 Make Install
--------------------------------------
Renaming
MV Php.ini-production Php.ini.dist
Create a new file
Touch info.php