tags:

views:

2824

answers:

8

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.

+4  A: 

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 :

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...

Pascal MARTIN
ya..it's PHP 5.3...so, which version of php is supported by cake php?
Learner
Documentation of CackePHP says "PHP 4 or 5" ; I suppose PHP 5.2.x (like 5.2.9 or 5.2.10) would be OK.
Pascal MARTIN
(I just edited my answer with a bit more informations and a couple of links -- too long for just a comment)
Pascal MARTIN
Thanks man...that was really helpful! :)
Learner
You're welcome :-) Have fun ! (and you might still take a look at PHP 5.3, in a few months, when it's better supported : it has some nice stuff ! )
Pascal MARTIN
A: 

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.

Vicer
A: 

I am also having the same problem.....I downgraded wamp5 2 to wamp 1.6.0...Now its working perfect

It is possible to implement cake php 1.2 version without downgrading your wamp server.Just install add-ons for Apache, PHP and MySQL. Click on Wampsever -> PHP->Version->Get MoreI have installed different versions of PHP, MySQL and Apache on my wampserver for testing purposes.
Learner
A: 

Thanks upgrading to dev version of cakePHP worked.

A: 

I followed this page http://iarmar.com/blog/cakephp-deprecated-warnings/ and my cakephp worked now...

Idontspeakenglish
A: 

I had similar issue and I installed the 1.3.0-beta and the problem went away...

e

edshadi
A: 

You saved my life. I downloaded the easyphp 5.3 and had exactly the same mistake! thanks for your help! Now i'm installing easyphp 5.2 and see how it goes. Again, thanks!
Gigi

Gigi
A: 

I tried one solution given by Pascal: https://trac.cakephp.org/ticket/6026 applied this patch and in my case this helped. Thx

alekwisnia