特殊:Badtitle/NS100:ApacheMySQLPHP/AptPhp4Output

来自Ubuntu中文
Oneleaf留言 | 贡献2007年5月13日 (日) 13:23的版本 (New page: {{From|https://help.ubuntu.com/community/ApacheMySQLPHP/AptPhp4Output}} {{Languages|php5}} ''In this page, '''apache''' refers to the apache version 1.3 package and '''apache2''' refers to...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :ApacheMySQLPHP/AptPhp4Output/zh | | {{#ifexist: ApacheMySQLPHP/AptPhp4Output/zh | | {{#ifeq: {{#titleparts:ApacheMySQLPHP/AptPhp4Output|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ApacheMySQLPHP/AptPhp4Output|1|-1|}} | zh | | }}

In this page, apache refers to the apache version 1.3 package and apache2 refers to apache version 2.0.

Apache2 is the recommended version, presently.

PHP4

emma@ubuntu:~$ apt-cache show php4
Package: php4
...
Depends: libapache2-mod-php4 (>= 4:4.4.2-1build1) | libapache-mod-php4 (>= 4:4.4.2-1build1) | php4-cgi (>= 4:4.4.2-1build1), php4-common (>= 4:4.4.2-1build1)
...

Php4 depends on either libapache2-mod-php4 or libapche-mod-php4.

PHP5

emma@ubuntu:~$ apt-cache show php5
Package: php5
...
Depends: libapache2-mod-php5 (>= 5.1.2-1ubuntu3) | php5-cgi (>= 5.1.2-1ubuntu3), php5-common (>= 5.1.2-1ubuntu3)
...

Php5 will only depend on libapache2-mod-php5. There is no libapache-mod-php5.


Installing php4 alone

emma@ubuntu:~$ sudo apt-get install -s php4
Password:
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-php4 libapr0
  libzzip-0-12 php4-common ssl-cert
Suggested packages:
  apache2-doc lynx www-browser php-pear
The following NEW packages will be installed
  apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-php4 libapr0
  libzzip-0-12 php4 php4-common ssl-cert
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
...

Installing php4 by itself will bring in libapache2-mod-php4

Installing both

emma@ubuntu:~$ sudo apt-get install -s php4 php5
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-php4 libapr0
  libzzip-0-12 php4-common php5-cgi php5-common ssl-cert
Suggested packages:
  apache2-doc lynx www-browser php-pear
The following NEW packages will be installed
  apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-php4 libapr0
  libzzip-0-12 php4 php4-common php5 php5-cgi php5-common ssl-cert
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
...

Installing both php4 and php5 will bring in only the libapache2-mod-php4 package.

keeping libapache2-mod-php5

emma@ubuntu:~$ sudo apt-get install -s php5 libapache2-mod-php5 php4
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  apache-common apache2-common apache2-mpm-prefork apache2-utils
  '''libapache-mod-php4''' libapr0 libzzip-0-12 php4-common php5-common ssl-cert
Suggested packages:
  apache apache-ssl apache-perl apache2-doc lynx www-browser php-pear
The following NEW packages will be installed
  apache-common apache2-common apache2-mpm-prefork apache2-utils
  libapache-mod-php4 libapache2-mod-php5 libapr0 libzzip-0-12 php4 php4-common
  php5 php5-common ssl-cert
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.

If libapache2-mod-php5 is already installed, libapache-mod-php4 gets installed, along with apache (as well as apache2).