I have installed wampserver on my pc. I unzipped the cake php installation files in the "www" folder of wampserver. Now, when I try to run- "http://localhost/cakephp", I get a whole list of errors along with the cake php getting started page. Here are some of the errors:
Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\cakephp\cake\libs\inflector.php on line 131 Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\cakephp\cake\libs\configure.php on line 136 Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\cakephp\cake\libs\configure.php on line 226 Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\cakephp\cake\libs\configure.php on line 906
How do I fix this? I got similar errors for codeignite.
Which version of PHP are you running ?
To get E_DEPRECATED errors, it must be PHP 5.3 (which is quite recent) -- and I think the last version of WampServer uses this one.
See :
As it's pretty recent and brought lots of new stuff, you might run into some kind of troubels (you actually did) with PHP 5.3.... Especially if the software you used is not compatible with it yet.
You might want to downgrade to the previous version of WampServer...
Or you could try lowering the error_reporting level (see also error_reporting
), to not get those warnings.
But if you are getting those, you'll probably run into other problems as well...
Actually, after a rapid search into CakePHP's Trac, I found at least those :
error_reporting(E_ALL & ~E_DEPRECATED);
None of those is solved... So it seems CakePHP is really not ready for PHP 5.3... (It's probably not the only Framework in this situation btw -- Zend Framework v 1.9 which went out couple of days ago is the first version that officially supports PHP 5.3, for instance)
If you want to work with CakePHP, so, you'll probably have to use PHP 5.2.x (like 5.2.9 or 5.2.10).
You're actually not the only one in your situation, it seems... Too bad, as there are pretty nice things in PHP 5.3...
hi I faced the same problem. I have easyphp installed and the latest easyphp is also using php version 5.3. I downloaded cakephp stable version : Release: 1.2.4.8284 Stable. When i opened the web page, i also got the same 'depricated' notices. I also tried mangling with the 'error_reporting' section with no luck.
As I didn't want to downgrade my php 5.3 to an earlier version, I tried CakePHP 1.3-dev. And the problem was fixed.
I am also having the same problem.....I downgraded wamp5 2 to wamp 1.6.0...Now its working perfect
I had similar issue and I installed the 1.3.0-beta and the problem went away...
e
I tried one solution given by Pascal: https://trac.cakephp.org/ticket/6026 applied this patch and in my case this helped. Thx
I had also same problem but I got resolve by changing in httpd.conf and php.ini My changes are here-
in httpd.conf replace
#LoadModule rewrite_module modules/mod_rewrite.so
to
LoadModule rewrite_module modules/mod_rewrite.so
and in tab Directory "{yourdirectoryname}:/wamp/www/">
replace
Order Deny,Allow
Deny from all
to
Order Allow,Deny
Allow from all
in php.ini
make curl ext on. there is no need to run but you should do :) extension=php_curl.dll
My server and php configuration was Apache Version : 2.2.17, PHP Version : 5.3.4