Php app/console command in Symfony

apps

#1

Hello,

I’m trying out the Symfony 2 platform for the first time and am having issues running the ‘php app/console’ command in shell.

To recap how i’ve set-up Symfony:

  1. I created a new subdomain and set it to run using php 5.3.x Fast CGI.
  2. I loaded Symfony and found everything to be working correctly… except…
  3. when I want to use the ‘php app/console’ commands (which are run using ssh), I get a php parsing error:
    “Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(’ in /home/…/Symfony/app/console on line 13”

I assume this means that the shell php command is not running 5.3. (Line 13 in app/console uses namespaces.) So my question is, how do I make it do that?


#2

Or put /usr/local/php53/bin on your $PATH.

Or put /usr/local/php53/bin on your $PATH.


#3

[quote=“andrewf, post:2, topic:57299”]

Thanks. That worked!

I’m a novice when it comes to shell commands.


#4

Hi all I need help.
Well I have installed the wampserver2.2:
-Apache Version: 2.2.22
-PHP Version: 5.4.3
-MySQL Version: 5.5.24
and 2.1.3 symfony_vendor

I installed everything I wanted, but because of something not working the console ‘cmd’ in windows7, write ‘c:\wamp\www\ Symfony’ and write ‘php app \ console --version’ is an error "Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '('C:\ wamp\symfony\app\console on line 13 ".
Any help, thanks