alientyc
(Alientyc)
June 5, 2011, 2:10pm
1
Hi,
Was trying to learn yii and as per the guide setup the yii app on my MAC using the command
%php YiiRoot/framework/yiic.php webapp /myrootweb/
However, i encountered the error below
Parse error: parse error, expecting T_OLD_FUNCTION' or
T_FUNCTION’ or T_VAR' or
‘}’’ in /Applications/MAMP/htdocs/yiicms/yii/framework/YiiBase.php on line 63
My account has the permission to execute yiic.php
I am running yii 1.1.7.r3135, fresh download from yii website.
My server pass the yii
Can someone advise?
Thanks.
mdomba
(Maurizio Domba Cerin)
June 5, 2011, 2:32pm
2
phtamas
(Phtamas)
June 5, 2011, 5:55pm
3
Try this command in terminal:
which php
Response should be something like this:
/Applications/MAMP/bin/php5.3/bin/php
If you get something else, your system probably uses a different (older) php version for command line.
alientyc
(Alientyc)
June 9, 2011, 12:45pm
4
the yii/requirements/index shows php version pass
alientyc
(Alientyc)
June 9, 2011, 12:46pm
5
i think you are right, the result was /usr/bin/php
Any idea how to change it?
phtamas:
Try this command in terminal:
which php
Response should be something like this:
/Applications/MAMP/bin/php5.3/bin/php
If you get something else, your system probably uses a different (older) php version for command line.
mdomba
(Maurizio Domba Cerin)
June 9, 2011, 12:50pm
6
To see the PHP command line version… run from command line
php --version
phtamas
(Phtamas)
June 9, 2011, 1:13pm
7
Add “/Applications/MAMP/bin/php5.3/bin” to the PATH environment variable of your system. Lots of info and tutorial on this subject can be found on the web, if you don’t know how to do it.
alientyc
(Alientyc)
June 9, 2011, 1:27pm
8
I called the php5 on the direct path and it works
Applications/MAMP/bin/php5/bin/php /directoryto/yiic webapp /wwwroot/blog
Thank you all for your advice