Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem installing cake php

Tags:

php

cakephp

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.

like image 370
Adit Gupta Avatar asked Aug 01 '09 17:08

Adit Gupta


People also ask

How can I download CakePHP 2?

To download the latest major release of CakePHP, visit the main website https://cakephp.org and follow the “Download” link. All current releases of CakePHP are hosted on GitHub.


1 Answers

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 :

  • Predefined Constants
  • PHP 5.3.0 Release Announcement

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 :

  • Ticket #6026 : php 5.3 needs error_reporting(E_ALL & ~E_DEPRECATED);
  • Ticket #6500 : PHP 5.3 incompatibility

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

like image 115
Pascal MARTIN Avatar answered Oct 10 '22 07:10

Pascal MARTIN