0
votes

I'm starting a new project with cakePHP 3.0 and I'm having problems with the cake console. When I try to run any command like:

bin/cake bake

I get the following error message:

X-Powered-By: PHP/4.4.9 Content-type: text/html


Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /homepages/37/d542973365/htdocs/gestioPPF/bin/cake.php on line 33

Parse error: syntax error, unexpected T_STRING in /homepages/37/d542973365/htdocs/gestioPPF/bin/cake.php on line 33

I was working with the console without problems with cakePHP 2.x. Anyone know if I missed some previous configuration?

Thanks in advance, Cadí.

2
Which version of PHP do you have. Type php --version in the console, what do you get? - Gilko

2 Answers

2
votes

X-Powered-By: PHP/4.4.9 Content-type: text/html

If this is the php version (4.4) you're running you won't be able to run CakePHP 3.x at all. Update your php version and see if it works then.

One of the first things to do when using something new is to check it's requirements and documentation. It cleary states there that you need at least PHP 5.4.16 or greater and a few other things.

0
votes

cakePHP 3.0 : try this update the file bin/cake => php to php5.5

exec php "$CONSOLE"/cake.php "$@" 

to

exec php5.5 "$CONSOLE"/cake.php "$@"