【第三步:】 编译安装php
① tar -xzvf php-4.4.2.tar.gz
② cd php-4.4.2
③ ./configure --prefix=/usr/local/php --with-MySQL=/usr/local/mysql \
--with-apache=/usr/local/apache --with-apxs2=/usr/local/apache/bin/apxs
④ echo "AddType xapplication/x-httpd-php .php .php3" >> /usr/local/apache/conf/httpd.conf
然后修改文件/etc/php.ini,将参数register-global的值设置为on,
⑤ /usr/local/apache/bin/apachtel restart
⑥ touch /usr/local/apache/htdocs/phpinfo.php
⑦ echo "<? phpinfo(); ?>" >> /usr/local/apache/htdocs/phpinfo.php
最后,在IE中输入以下URL测试php环境:,如果出现如下页面,则说明php环境配置成功!