後,我安裝了PHP的curl擴展使用以下命令:
安裝curl擴展PHP停止工作我工作的Ubuntu 12.04服務器上
apt-get install curl
apt-get install php5-curl
service apache2 restart
這樣做的PHP停止工作
後,如果我要求的一些PHP頁面,火狐嘗試下載文件,而不是一些研究,我發現,在該目錄下/etc/apache2/mods-enabled/
缺少鏈接到文件後,運行該腳本
的:
/etc/apache2/mods-available/php5.conf
/etc/apache2/mods-available/php5.load
所以我跑的命令a2enmod php5
和鏈接已創建
但是當我的午餐service apache2 restart
失敗/var/log/apache2/error.log
下
我發現了一些線,如:
PHP Warning: PHP Stratup: Unable to load dynamic library '/usr/lib/php5/20100525/pdo.so' - /usr/lib/php5/20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
各種estensions。
我已經驗證該目錄/usr/lib/php5/20100525/
不存在了
但我發現,包含.so文件
我也看到,該目錄/etc/php5/conf.d
是空的,沒有任何鏈接的目錄/usr/lib/php5/20121212/
,但所有.ini文件在/etc/php5/mods-available
我的問題是: 爲什麼更新已經創建了所有這些問題?
如何解決呢?解決方案可以將參考從/usr/lib/php5/20100525/
更改爲/usr/lib/php5/20121212/
?我可以在那裏做什麼?
感謝您的幫助和抱歉,我的英語水平
UPDATE
我創建的鏈接通過SEB
ln -s /usr/lib/php5/20121212/ /usr/lib/php5/20100525
的建議,但是當我重新啓動Apache失敗,出現錯誤:
apache2: Syntax error on line 210 of /etc/apache/apache2.conf:
Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load:
Cannot load /usr/lib/apache2/modules/libphp5.so into server:
/usr/lib/apache2/modules/libphp5.so:
cannot open shared object file: No such file or directory
可以PHP重新安裝的解決這個問題? 如果是的我該怎麼辦? 再次感謝
UPDATE
後,我從snapshotand恢復虛擬機多了一些不成功的嘗試我用aptitude解決了這個問題。
aptitude install php5-curl
The following NEW packages will be installed:
libcurl3{a} libjson-c2{a} php5-curl php5-json{a}
The following packages will be upgraded:
php5-common
1 packages upgraded, 4 newly installed, 0 to remove and 130 not upgraded.
Need to get 722 kB of archives. After unpacking 820 kB will be used.
The following packages have unmet dependencies:
libapache2-mod-php5 : Dipende: php5-common (= 5.4.12-2~precise+1) but 5.5.3+dfsg 1+debphp.org~precise+2 is to be installed.
php5-gd : Dipende: php5-common (= 5.4.12-2~precise+1) but 5.5.3+dfsg-1+debphp.org~precise+2 is to be installed.
php5-mcrypt : Dipende: php5-common (= 5.4.12-2~precise+1) but 5.5.3+dfsg-1+debphp.org~precise+2 is to be installed.
php5-mysql : Dipende: php5-common (= 5.4.12-2~precise+1) but 5.5.3+dfsg-1+debphp.org~precise+2 is to be installed.
php5-cli : Dipende: php5-common (= 5.4.12-2~precise+1) but 5.5.3+dfsg-1+debphp.org~precise+2 is to be installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) libapache2-mod-php5
2) php5
3) php5-cli
4) php5-gd
5) php5-mcrypt
6) php5-mysql
7) phpmyadmin
Leave the following dependencies unresolved:
8) libapache2-mod-php5 recommends php5-cli
Accept this solution? [Y/n/q/?] n
我回答沒有
這第一個解決方案 第二個提出的解決方案是
The following actions will resolve these dependencies:
Remove the following packages:
1) apache2.2-bin
2) apache2.2-common
Install the following packages:
3) apache2-bin [2.4.6-2~precise+1 (precise)]
4) apache2-data [2.4.6-2~precise+1 (precise)]
5) libgd3 [2.1.0-2~precise+1 (precise)]
6) liblua5.1-0 [5.1.4-12ubuntu1 (precise)]
7) libtiff4 [3.9.5-2ubuntu1.5 (precise-security, precise-updates)]
8) libvpx1 [1.0.0-1 (precise)]
9) php5-readline [5.5.3+dfsg-1+debphp.org~precise+2 (precise)]
Upgrade the following packages:
10) apache2 [2.2.22-1ubuntu1.2 (now) -> 2.4.6-2~precise+1 (precise)]
11) apache2-mpm-itk [2.2.22-1ubuntu1.2 (now) -> 2.4.6-2~precise+1 (precise)]
12) libapache2-mod-php5 [5.4.12-2~precise+1 (now) -> 5.5.3+dfsg-1+debphp.org~precise+2 (precise)]
13) libaprutil1 [1.3.12+dfsg-3 (now, precise) -> 1.5.2-1~precise+1 (precise)]
14) libaprutil1-dbd-sqlite3 [1.3.12+dfsg-3 (now, precise) -> 1.5.2-1~precise+1 (precise)]
15) libaprutil1-ldap [1.3.12+dfsg-3 (now, precise) -> 1.5.2-1~precise+1 (precise)]
16) php5-cli [5.4.12-2~precise+1 (now) -> 5.5.3+dfsg-1+debphp.org~precise+2 (precise)]
17) php5-gd [5.4.12-2~precise+1 (now) -> 5.5.3+dfsg-1+debphp.org~precise+2 (precise)]
18) php5-mcrypt [5.4.12-2~precise+1 (now) -> 5.5.3+dfsg-1+debphp.org~precise+2 (precise)]
19) php5-mysql [5.4.12-2~precise+1 (now) -> 5.5.3+dfsg-1+debphp.org~precise+2 (precise)]
Accept this solution? [Y/n/q/?] y
我接受這第二個解決方案,安裝成功後,我只需要調整虛擬主機的配置爲Apache 2。4
試圖安裝pdo也做一個更新? – bansi