`

php-5.3,php-5.4的thttpd2.25b补丁,及编译方法

阅读更多

php不支持thttpd的最新版本thttpd-2.25b,所以我做了个2.25b的补丁

以php5.4为例

下载thttpd-2.25b.tar.gz

tar -zxf thttpd-2.25b.tar.gz

下载php-5.4.7.tar.bz2

tar -jxf php-5.4.7.tar.bz2

cd php-5.4.7

patch -p1 ../php-5.4.7_thttpd-2.25b.patch

./configure --prefix=/opt/php-5.4.7 --with-thttpd=../thttpd-2.25b

make&&make install

cd ../thttpd-2.25b

patch -p1 <../thttpd-2.25b-fix_getline.patch

./configure --prefix=/usr/local

make&&make install

cp contrib/redhat-rpm/thttpd.conf /etc/

cp contrib/redhat-rpm/thttpd.init /etc/init.d/thttpd

安装后的thttpd已经内含了php的解释器

thttpd.conf修改如下

cat /etc/thttpd.conf
# This section overrides defaults
dir=/usr/local/www
chroot
user=www# default = nobody
logfile=/var/log/thttpd.log
#pidfile=/var/run/thttpd.pid
# This section _documents_ defaults in effect
# port=80
# nosymlink# default = !chroot
# novhost
# nocgipat
# nothrottles
# host=0.0.0.0
# charset=iso-8859-1

/etc/init.d/thttpd start


server api已经是thttpd

php5.3的编译方法相同

  • 大小: 53.7 KB
分享到:
评论
2 楼 getelephantbyid 2018-03-09  
make 无法通过.....
1 楼 getelephantbyid 2018-03-09  
patch -p1 ../php-5.4.7_thttpd-2.25b.patch
大佬。我执行完这个linux就卡着了...是需要加<符号么?

相关推荐

Global site tag (gtag.js) - Google Analytics