当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : apache 启用php5支持有问题
帖子发表于 : 2011-01-21 19:48 
头像

注册: 2006-04-18 20:49
帖子: 312
地址: 苏州
送出感谢: 1
接收感谢: 1
购买了本网站的VPS,做个小网站,静态没有问题,现在php支持有些问题,奇怪,软件都是从米国的官方源 apt-get 安装的

引用:
root@myhost:~# apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
root@myhost:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
mountall
The following packages will be upgraded:
bsdutils libblkid1 libdbus-1-3 libuuid1 mount sudo util-linux
7 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,401kB of archives.
After this operation, 4,096B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
root@myhost:~# apt-get install php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
root@myhost:~# apt-get install libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
root@myhost:~#

root@myhost:/etc/apache2/mods-available# cat php5.conf
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_value engine Off
</Directory>
</IfModule>
</IfModule>
root@203736:/etc/apache2/mods-available#

现在用浏览器打开php页面,就提示下载


_________________
自行车运动摄影、足球摄影照片分享
qiaomu.org


页首
 用户资料  
 
2 楼 
 文章标题 : Re: apache 启用php5支持有问题
帖子发表于 : 2011-01-21 20:16 
头像

注册: 2006-04-18 20:49
帖子: 312
地址: 苏州
送出感谢: 1
接收感谢: 1
重装了很多php5的包,然后重启apache,故障依旧

引用:
root@myhost:/home# apt-get install php5-common php5-dev php5-cgi php-apc php5-mysql php5-curl php5-gd php5-idn php-pear php5-mcrypt php5-memcache php5-ming php5-recode php5-tidy php5-xmlrpc --reinstall
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
autoconf automake autotools-dev binutils ca-certificates gcc gcc-4.4 gnupg gnupg-curl libc-dev-bin libc6-dev libcurl3 libcurl3-gnutls libgif4 libgomp1
libidn11 libltdl-dev libltdl7 libming1 librecode0 libssl-dev libtidy-0.99-0 libtool linux-libc-dev m4 manpages manpages-dev php5-cli shtool zlib1g-dev
Suggested packages:
autoconf2.13 autoconf-archive gnu-standards autoconf-doc gettext binutils-doc gcc-multilib automake1.9 flex bison gdb gcc-doc gcc-4.4-multilib
libmudflap0-4.4-dev gcc-4.4-doc gcc-4.4-locales libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7 gnupg-doc xloadimage imagemagick
eog libpcsclite1 glibc-doc libtool-doc automaken gfortran fortran95-compiler gcj
The following NEW packages will be installed:
autoconf automake autotools-dev binutils ca-certificates gcc gcc-4.4 gnupg gnupg-curl libc-dev-bin libc6-dev libcurl3 libcurl3-gnutls libgif4 libgomp1
libidn11 libltdl-dev libltdl7 libming1 librecode0 libssl-dev libtidy-0.99-0 libtool linux-libc-dev m4 manpages manpages-dev php-apc php-pear php5-cgi
php5-cli php5-curl php5-dev php5-idn php5-memcache php5-ming php5-recode php5-tidy php5-xmlrpc shtool zlib1g-dev
0 upgraded, 41 newly installed, 4 reinstalled, 0 to remove and 8 not upgraded.
Need to get 31.1MB of archives.
After this operation, 97.3MB of additional disk space will be used.
Do you want to continue [Y/n]? y


root@myhost:/home# !/etc
/etc/init.d/apache2 restart
* Restarting web server apache2 ... waiting [ OK ]
root@myhost:/home#


_________________
自行车运动摄影、足球摄影照片分享
qiaomu.org


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译