SETUP PHP

1.   ./configure --prefix=/usr/local/php \

--mandir=/usr/local/share/man \
--infodir=/usr/local/share/info \
--with-apxs2=/usr/local/apache/bin/apxs \
--enable-cgi --with-mysql=/usr/local/mysql \
--with-config-file-path=/usr/local/php/etc \
--with-pdo-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--enable-zip --enable-sqlite-utf8 -enable-sockets \
--enable-soap --enable-pcntl --enable-mbstring \
--enable-calendar --enable-bcmath \
--enable-exif --with-mcrypt --with-mhash --with-gd \
--with-png-dir --with-jpeg-dir --with-freetype-dir \
--with-libxml-dir --with-curl --with-curlwrappers \
--with-zlib   --with-openssl --with-kerberos=shared \
--with-gettext=shared --with-xmlrpc=shared

2.       make,make test

3.       make install

4.     复制php.ini-distphp.ini,并存放到编译时我们指定的目录中/usr/local/httpd/conf/php.ini,编辑php.ini,找到

; default_charset = "iso-8859-1",

在下面加入一行

; default_charset = "gb2312"

5.       安装完成重启apache,测试PHP环境是否可以运行。在/usr/local/apache/htdocs中增加一个test.php,打开浏览器:http://localhost/test.php

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值