作者 主題: FB下將PHP升級至v5.2.6後就出問題了 …  (閱讀 8057 次)

0 會員 與 1 訪客 正在閱讀本文。

yes298

  • 活潑的大學生
  • ***
  • 文章數: 380
    • 檢視個人資料
FreeBSD 7.0下將PHP v5.2.5升級至 PHP v5.2.6, 會一併升級php-extension,
Reboot後用指令php -v 和 php-cgi –v無任何顯示, 之後Lighttpd web server
就無法處理php頁面了 …

沒有任何資訊, 該如何去解決問題呢?

damon

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 4227
    • 檢視個人資料
    • http://blog.damon.tw/
回覆: FB下將PHP升級至v5.2.6後就出問題了 …
« 回覆 #1 於: 2008-05-03 21:19 »
freebsd[/home/damon]-damon->php -v
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: May  3 2008 07:51:15)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
freebsd[/home/damon]-damon->php-c
php-cgi    php-config
freebsd[/home/damon]-damon->php-cgi  -v
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: May  3 2008 07:51:18)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
freebsd[/home/damon]-damon->uname -a
FreeBSD freebsd.damon.tw 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #2: Fri Apr 18 01:56:52 CST 2008     root@freebsd.damon.tw:/usr/obj/usr/src/sys/GENERIC  amd64

看來也許是你升級沒成功吧

yes298

  • 活潑的大學生
  • ***
  • 文章數: 380
    • 檢視個人資料
回覆: FB下將PHP升級至v5.2.6後就出問題了 …
« 回覆 #2 於: 2008-05-04 14:43 »
學長, 我是用以下Script的來更新所有ports的:

代碼: [選擇]
portsnap fetch extract update
sync;sync;sync;
if [ ! -f /usr/local/sbin/portupgrade ]; then
cd /usr/ports/ports-mgmt/portupgrade ; make install clean distclean
fi

portupgradeV=`pkg_info | grep portupgrade | awk '{print $1}' | cut -d- -f2`
New_portupgradeV=`grep DISTVERSION= /usr/ports/ports-mgmt/portupgrade/Makefile | awk '{print $2}'`
if [ $portupgradeV = $New_portupgradeV ]
then
echo "portupgrade version is same ..."
else
clear
echo "portupgrade needs upgrade first ..."
portupgradeV=`pkg_info | grep portupgrade | awk '{print $1}'`
/usr/local/sbin/portupgrade -o /usr/ports/ports-mgmt/portupgrade $portupgradeV
fi

if [ -x /usr/local/sbin/portsdb ]; then
/usr/local/sbin/portsdb -Uu
fi

if [ -x /usr/local/sbin/pkgdb ]; then
/usr/local/sbin/pkgdb -Fu
fi

if [ -x /usr/local/sbin/portupgrade ]; then
/usr/local/sbin/portupgrade -acCvy
fi

portsclean -C
portsclean -DD

用以上Script更新後, 在/var/log/messages出現以下錯誤:

代碼: [選擇]
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'recode' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'bcmath' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'bz2' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'calendar' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'ctype' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'curl' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'dba' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'pcre' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'SimpleXML' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'SPL' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'dom' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'exif' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'fileinfo' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'filter' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'fribidi' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'ftp' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'gd' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'gettext' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'gmp' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'hash' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'iconv' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'imap' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'json' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'mhash' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'ming' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'openssl' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'pdf' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'pdo_sqlite' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'posix' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'session' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'eAccelerator' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'shmop' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'soap' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'sockets' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'SQLite' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'sysvmsg' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'sysvsem' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'sysvshm' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'tidy' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'xml' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'wddx' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'xmlreader' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'xmlrpc' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'xmlwriter' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'xsl' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'zip' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'zlib' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'yaz' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'snmp' already loaded in Unknown on line 0


damon

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 4227
    • 檢視個人資料
    • http://blog.damon.tw/
回覆: FB下將PHP升級至v5.2.6後就出問題了 …
« 回覆 #3 於: 2008-05-04 23:00 »
有簡單的方法為甚麼要用那麼複雜的東西?
csup ports tree , make fetchindex , portupgrade -a , restart apache,這樣就收工了

tiebob

  • 憂鬱的高中生
  • ***
  • 文章數: 108
    • 檢視個人資料
回覆: FB下將PHP升級至v5.2.6後就出問題了 …
« 回覆 #4 於: 2008-05-05 07:16 »
重覆載入 extension
代碼: [選擇]
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'recode' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'bcmath' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'bz2' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'calendar' already loaded in Unknown on line 0
May  4 10:53:43 dl php-cgi: PHP Warning:  Module 'ctype' already loaded in Unknown on line 0

你可以檢查一下 /usr/local/etc/php.ini 和 /usr/local/etc/php/extensions.ini 內的extension 是否重覆。

yes298

  • 活潑的大學生
  • ***
  • 文章數: 380
    • 檢視個人資料
回覆: FB下將PHP升級至v5.2.6後就出問題了 …
« 回覆 #5 於: 2008-05-05 08:22 »
你可以檢查一下 /usr/local/etc/php.ini 和 /usr/local/etc/php/extensions.ini 內的extension 是否重覆。

檢查過, 沒有重覆的, 不清楚什麼問題,輸入指令PHP -V時沒有那些錯誤, 只是在LOG檔看到 ...

johnpupu

  • 憂鬱的高中生
  • ***
  • 文章數: 194
    • 檢視個人資料
回覆: FB下將PHP升級至v5.2.6後就出問題了 …
« 回覆 #6 於: 2008-05-06 16:33 »
很簡單 砍掉重練...

ps:我自已在昇級是用portmaster -aD