i have hosting di dreamhost i try using yii for my framework and when a start create aplication something wrong show off like this bellow :
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/.sanders/mydomain/mydomaindotcom/yii/framework/YiiBase.php on line 55
I know this is an old thread, but it gave me a clue as to what my problem was also. thought maybe what I write might help someone else. This maybe 1and1 specific but maybe it’ll help someone else with a similar problem.
When I ran a "php -v" it gave me => PHP 4.4.9
So I remembered that there may also be a php5 executable, so
When I ran a "php5 -v" it gave me => PHP 5.2.17
I could then invoke it like this:
php5 yiic webapp ../../myNewWebApp
and it created my app.
Since the default was to use php4 then at my host, I had to add this to .htaccess also
AddType x-mapp-php5 .php
Which processes the php in the current and subdirectories as php 5.