How i installed Apache2+PHP42
发表于:2007-06-09来源:作者:点击数:
标签:
[font=verdana] Allright...thisiswhatIdidtogetmyinstallofphp4.2.0workingwithapache2onfreebsd.... #Moveto/usr/source cd/usr/source #Getthefollowingsource: http://www.apache.org/dist/httpd/httpd-2.0.35.tar.gz http://www.php.net/do_download.ph
[font=verdana]
Allright... this is what I did to get my install of php4.2.0 working with apache2 on freebsd....
# Move to /usr/source
cd /usr/source
# Get the following source:
http://www.apache.org/dist/httpd/httpd-2.0.35.tar.gz
http://www.php.net/do_download.php?download_file=php-4.2.0.tar.gz
# Decompress the sources:
tar -xvzf httpd-2.0.35.tar.gz
tar -xvzf php-4.2.0.tar.gz
cd ../httpd-2.0.35
./configure \
--prefix=/usr/local/apache --enable-module=most --enable-shared=max
make
make install
SPECIAL NOTE: Freebsd support at this time requires GNU portable threads (which is avaliable via ports)
you will need to perform the following steps to get php 4.2.0 running properly....
cd /usr/local/ports/devel/pth
make
make install
and add "--with-tsrm-pth" to the configure statement below....
back to the install....
cd ../php-4.2.0
./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/conf \
--enable-versioning \
--enable-ftp \
--enable-bcmath \
--disable-de
bug \
--enable-memory-limit=yes \
--enable-track-vars
make
make install
# Make sure you have, Uncomment (remove the #'s), Change or Create
# the following lines in the file /usr/local/apache/conf/httpd.conf
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.php3 index.phtml
</IfModule>
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
cp /usr/local/php-4.1.2/php.ini-dist /usr/local/apache/conf/php.ini
# Start Apache:
/usr/local/apache/bin/apachectl start
# Create a file in /usr/local/apache/htdocs called index.php
<html>
<head><title>PHP Test Page</title></head>
<body>
<? phpinfo(); ?>
</body>
</html>
# Point your Web Browser at:
http://localhost/index.php
[/font]
jupy 回复于:2002-05-20 12:07:20
|
我按你的做法装,结果还是显示: Cannot load /usr/local/apache/modules/libphp4.so into server: /usr/local/apache/modules/libphp4.so: Undefined symbol "pthread_getspecific" GUN pth-1.4.1也装了,大家看会是什么问题?
|
MaxBSD 回复于:2002-05-20 16:25:18
|
I would not recommend you use Apache2+php in production at this stage as php42 only supports apache2 experimentally. That being said, you can expect problems.
|
ㄚ標 回复于:2002-11-28 12:58:49
|
tar xfz httpd-2.0.43.tar.gz tar xfz php-4.2.3.tar.gz cd httpd-2.0.43 ./configure --prefix=/usr/local/www --enable-so make;make install
cd ../php-4.2.3 ./configure --with-apxs2=/usr/local/www/bin/apxs make;make install cp php.ini-dist /usr/local/lib/php.ini
/usr/local/www/conf/httpd.conf add AddType application/x-httpd-php .php
/usr/local/www/bin/apachectl start
cd /usr/local/www/htdocs echo "<? phpinfo() ?>" > ver.php
look -> http://*.*.*.*/ver.php
ok!
|
i叶大马猴 回复于:2002-11-28 15:10:52
|
现在是装apache2还是apache1.3好??
|
MaxBSD 回复于:2002-11-28 17:25:41
|
如果你用到的module不多,就用apache2八。比apache1要快的。尤其是win32的版本。
|
woodhead 回复于:2002-11-29 10:52:05
|
如果要用php,还是装1.3系列. apache2上每次升级php都总有一些麻烦
|
HonestQiao 回复于:2002-12-04 09:09:05
|
我的启动apache2没有问题,但是运行php需要下载了
|
HonestQiao 回复于:2002-12-04 12:14:55
|
我今天俺找你的方法做了,启动apache提示libphp4.so不能load仔细一看,原来modules 被我马虎成了modeles了,可是我修改之后,运行了,支持php只是原文下载了啊
|
ihweb 回复于:2002-12-04 13:16:01
|
我一般是apache 1.3.x + php 4.x ,很好用。
到目前好象是apache 1.3.27+php4.3 吧。
|
zmcsdh 回复于:2002-12-07 10:25:39
|
有没有人教一下, 安装用动态库的APACHE, 加载PHP 和其它动态模块的方法!
|
softman 回复于:2002-12-15 14:41:53
|
我用的是freebsd4.7 release,可是我全部按照这个安装,启动时:说libphp4.so不能加载, 我find了磁盘,没有发现任何地方有libphp4.so这个文件。看来大家都是这样的,我肯定没有像honostqiao一样把moudule敲错了。
怎么回事,搂住你的系统是不是和我们的不一样呀。怎么,你就安装成功了?
|
hano 回复于:2003-05-21 22:48:02
|
楼上的,moudule 应为module
|
powerplane 回复于:2003-06-24 19:59:11
|
用port来装就可以了
注意在make mod_php4时候,要这样make [b:9917739497]-DWITH_APACHE2[/b:9917739497] install
|
wangbin 回复于:2003-07-26 12:40:01
|
我的libphp4.so已经load了,还是不解释php
|
原文转自:http://www.ltesting.net