Cakephp doesn't work after installing php5-curl package
Asked Answered
L

2

0

I have an android app, it call a function of a web-server (using cakephp). And it return error like this 'call to undefined function curl_init()'. I do some search on google and try to fix that error by install php5-curl package, but after installing this package, the web-server doesn't work any more. it return

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

does anyone know how to fix it? Thanks in advance.

Legislate answered 28/3, 2012 at 10:34 Comment(3)
what version of PHP are you using?? I had this same problem but it was a problem between the combination of CakePHP 1.3.6 and PHP 5.4. After updating CakePHP to it's latest version the problem has been resolved.Dodecagon
See #1249452 if you want to hide theseInsusceptible
What is the lowest stable that we should upgrade to? Will 1.4 or similar? I don't want to go through the headache of upgrading all the way to 2.3Plumber
B
1

Please check if your CakePHP /app/tmp/cache folder is writable. I faced similar issue with CakePHP 1.3 and realized it was due to the cache folder's permission. Hope this helps.

In your terminal, type the following command to allow the CakePHP folder to be writable:-

chmod -R 777 /your_root_directory/your_site_name/app/tmp/cache
Bijouterie answered 25/2, 2015 at 6:59 Comment(1)
It seems completely unrelated, by yes, it fixes this issues. Because upgrading CakePHP is sometimes not an option.Hydrodynamic
M
0

Your cakephp version is old, and has problems with the latest version of PHP.

You could try updating your CakePhp version. Seems that your are using the 1.3 version, so update to the latest one. You could find it

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

Only replacing the cake/ folder with the new one, you fix this problem

Mimas answered 6/8, 2012 at 14:56 Comment(3)
Only replacing the "cake" folder will break your app, you need to replace bootstrap, index, core and some other changes etc ... Please consider correcting the answer.Underpainting
Sorry me, Im trying to understand what do you suggest. Why do you need to replace bootstrap, index, etc? Your normal project structure should be: app-name /app /cake .. / So you dont change anything on the app/ folder, only the cake one (thats the reason because you'll never need to change the content of /cake)Mimas
Some of the other changes are documented: book.cakephp.org/1.3/en/The-Manual/Appendices/Mihttp://…, some of them are not but others found them: blog.room34.com/archives/4480, I switched 1.2 to 1.3 no so long ago, and it was not as simple as just replacing the cake folder, even if you respect their standards, not get me wrong, it's not hard to do it, but it requires some work (I think it took me about 4 hours when I did it), but still discovered problems in the next days as a result of testing.Underpainting

© 2022 - 2024 — McMap. All rights reserved.