免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1992 | 回复: 0
打印 上一主题 下一主题

[Web] ubuntu 10.04中apache 启用php5支持有问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-01-22 19:48 |只看该作者 |倒序浏览
静态没有问题,现在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页面,就提示下载

重装了很多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#


求解!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP