Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
如何快速解決php錯誤訊息: Strict Standards: Only variables should be assigned by reference in (php版本的問題) – unethost無限空間虛擬主機 技術分享部落格

如何快速解決php錯誤訊息: Strict Standards: Only variables should be assigned by reference in (php版本的問題)

最近協助移機後,又發生php版本的相容性問題,
這次出現的錯誤訊息如下:

Strict Standards: Only variables should be assigned by reference in /home/xxxxxx/public_html/chat/xajax_core/xajaxxxxxxxManager.inc.php on line 286

(因安全性及隱私權問題,部份以xxxxx加密)

如果是有php軟體工程師底子,遇到php錯誤訊息,
就是重新編寫code,讓code可以相容於高一點的版本,

反之可以修改主機,將php版本調回同一個版本。

舉我們的虛擬主機為例(調整php):

1.先登入cpanel > 搜索:php > 點擊 php selector

how_to_fast_fix_php_error_message_strict-standards-only-variables-should-be-assigned-by-reference-in_01

2.根據我們的查詢,因原先php是使用5.3的版本,
所以也要將虛擬主機調到 5.3 才會正常。
(切換後,記得在點下左下角的儲存)

how_to_fast_fix_php_error_message_strict-standards-only-variables-should-be-assigned-by-reference-in_02

 

 

雖然靠調整php解決了問題,但是我們還是會建議站長,
得需要考慮程式安全性及擴充性問題,
去修改可以相容高一點的版本,
而且越新的php版本,對效能也會有幫助的。

 

(本篇教學由unethost.com客服撰寫)

延伸閱讀:如何備份Cpanel後台安裝的套裝程式?

安裝上述的軟體,我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。