2012-03-28 69 views
0

我有一個android應用程序,它調用一個web服務器的功能(使用cakephp)。並且它返回像這樣的錯誤'調用未定義的函數curl_init()'。 我在google上進行了一些搜索,並嘗試通過安裝php5-curl軟件包來修復該錯誤,但是在安裝此軟件包之後,web服務器不再工作。它返回Cakephp在安裝php5-curl包後不工作

Strict Standards: Non-static method App::core() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 429

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Warning: Illegal string offset 'file' in /var/www/postmail/cake/libs/debugger.php on line 622

Warning: Illegal string offset 'line' in /var/www/postmail/cake/libs/debugger.php on line 622

Strict Standards: Non-static method App::core() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 429

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 398

Strict Standards: Non-static method Configure::read() should not be called statically in /var/www/postmail/cake/basics.php on line 213

Strict Standards: Non-static method Configure::getInstance() should not be called statically in /var/www/postmail/cake/libs/configure.php on line 155

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 657

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 657

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 668

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 668

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 673 Warning (2): strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [CORE/cake/libs/cache.php, line 570] Strict Standards: Non-static method Configure::read() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 308

Strict Standards: Non-static method Configure::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/configure.php on line 155

Strict Standards: Non-static method CakeLog::write() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 311

Strict Standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 311

Strict Standards: Non-static method CakeLog::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/cake_log.php on line 230

Strict Standards: Non-static method App::import() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/cake_log.php on line 180

Strict Standards: Non-static method App::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/configure.php on line 909

Strict Standards: Non-static method Cache::read() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/configure.php on line 982

Strict Standards: Non-static method Cache::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/cache.php on line 330

Strict Standards: Non-static method Configure::read() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/cache.php on line 505

Strict Standards: Non-static method Configure::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/configure.php on line 155

Strict Standards: Non-static method Inflector::underscore() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/cache.php on line 672

Strict Standards: Non-static method Inflector::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/inflector.php on line 512

Notice: Trying to get property of non-object in /var/www/postmail/cake/libs/cache/file.php on line 248

Fatal error: Call to a member function cd() on a non-object in /var/www/postmail/cake/libs/cache/file.php on line 248

有沒有人知道如何解決它? 在此先感謝。

+0

什麼版本的PHP您使用的是?我有這個相同的問題,但它是CakePHP 1.3.6和PHP 5.4的組合之間的問題。將CakePHP更新爲最新版本後,問題已解決。 – elboletaire 2012-04-14 14:56:55

+0

如果您想要隱藏這些信息,請參閱http://stackoverflow.com/questions/1248952/php-5-disable-strict-standards-error – 2012-05-26 04:26:57

+0

我們應該升級到最低穩定性的是什麼?請問1.4還是類似的?我不想經歷頭痛的升級到2.3 – Ryan 2013-05-07 02:47:46

回答

0

你的cakephp版本很舊,並且有最新版本的PHP出現問題。

你可以嘗試更新你的CakePhp版本。似乎你正在使用1.3版本,所以更新到最新版本。 你可以找到它

https://github.com/cakephp/cakephp/archives/1.3

只有用新的替換蛋糕/文件夾,你解決這個問題

+3

只有更換「蛋糕」文件夾會破壞你的應用程序,你需要更換引導,索引,核心和其他一些改變等...請考慮糾正答案。 – 2013-04-29 07:57:40

+1

對不起,我試圖理解你的建議。 爲什麼你需要更換bootstrap,index等? 你正常的項目結構應該是: 應用程序名稱 /應用 /蛋糕 .. / 所以你不改變應用程序/文件夾的東西,只有蛋糕一個(那是因爲你再也不需要理由改變/蛋糕的內容) – Darkaico 2013-07-04 18:57:39

+0

其他一些變化記錄在案:http://book.cakephp.org/1.3/en/The-Manual/Appendices/Mihttp://blog.room34.com/archives/4480grating -from-CakePHP-1-2-to-1-3.html,其中一些不是但其他人發現它們:http://blog.room34.com/archives/4480,我很久以前就把1.2切換到1.3了,並不像替換蛋糕文件夾那麼簡單,即使你尊重他們的標準,不要誤會我的意思,這並不難,但它需要一些工作(我想我花了大約4個小時它),但由於測試,在接下來的幾天仍然發現問題。 – 2013-08-09 13:25:13

1

請檢查您的CakePHP /應用程序的/ tmp /緩存文件夾可寫。我遇到了CakePHP 1.3的類似問題,並意識到這是由於緩存文件夾的權限。希望這可以幫助。

在你的終端,鍵入以下命令,讓CakePHP的文件夾是可寫的: -

chmod -R 777 /your_root_directory/your_site_name/app/tmp/cache 
+1

這似乎完全不相關,是的,它修復了這個問題。因爲升級CakePHP有時不是一種選擇。 – 2017-04-21 08:12:58