This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Installation and setup » error while running symfony -V
icon4.gif  error while running symfony -V [message #80090] Thu, 18 June 2009 09:14 Go to next message
shiva  is currently offline shiva
Messages: 16
Registered: June 2009
Location: bangalore
Junior Member
hi
I'm using XAMPP for Linux 1.7.1, symfony-1.2.7.tgz
& i'm following installation procedure given under.. http://www.symfony-project.org/getting-started/1_2/en/04-Sym fony-Installation

when i use this command:
$ php lib/vendor/symfony/data/bin/symfony -V
it gives error:

PHP Parse error: parse error, unexpected T_OBJECT_OPERATOR in /home/sfproject/lib/vendor/symfony/data/bin/symfony on line 16
Content-type: text/html
X-Powered-By: PHP/4.3.9

pls help me to rectify this problem

thanks,
Shiva



shiva
Bangalore
Re: error while running symfony -V [message #80091 is a reply to message #80090 ] Thu, 18 June 2009 09:25 Go to previous messageGo to next message
shiva  is currently offline shiva
Messages: 16
Registered: June 2009
Location: bangalore
Junior Member
After searching in this forum i found a answer shown below:

Quote:

ok, i know this is a very very old thread, but am just replying here cuz i faced this prob and while googling i landed here.

its cuz, object chaining, ie the line u mentioned works only in php 5, and not in php 4.

so, you seem to be using php 4 while symfony requires php 5.


but php status shows php5 is active, as XAMPP has both php4 & php5

[root@localhost sfproject]# /opt/lampp/lampp phpstatus
5.2.9


pls help me to rectify this problem


shiva
Bangalore
Re: error while running symfony -V [message #80105 is a reply to message #80090 ] Thu, 18 June 2009 11:16 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
If you do "php -v" at the command line, you will find that the php that you are using is PHP4, which is not sufficient to run symfony.

The solution is to modify your system path and remove the path to PHP4, leaving just the path to PHP5. To do this on Windows you'll need to find the configuration panel for your environment variables - if you get stuck just do a bit of googling. Find your path variable, which will have a number of pathnames in it separated by semicolons (;) and remove the path to your PHP4 installation. Personally I find it easiest to select-all and paste into Notepad, edit, then select-all and paste back into the properties window.


Remember Palestine
Re: error while running symfony -V [message #80301 is a reply to message #80105 ] Sat, 20 June 2009 09:36 Go to previous messageGo to next message
shiva  is currently offline shiva
Messages: 16
Registered: June 2009
Location: bangalore
Junior Member
halfer wrote on Thu, 18 June 2009 14:46

If you do "php -v" at the command line, you will find that the php that you are using is PHP4, which is not sufficient to run symfony.

The solution is to modify your system path and remove the path to PHP4, leaving just the path to PHP5. To do this on Windows you'll need to find the configuration panel for your environment variables - if you get stuck just do a bit of googling. Find your path variable, which will have a number of pathnames in it separated by semicolons (Wink and remove the path to your PHP4 installation. Personally I find it easiest to select-all and paste into Notepad, edit, then select-all and paste back into the properties window.


hi halfer,
thanks for reply,
php -V shows:

[root@localhost sfproject]# php -v
PHP 4.3.9 (cgi) (built: Nov 24 2004 08:48:16)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

how do i upgrade to php5.
help me..

thanks


shiva
Bangalore
Re: error while running symfony -V [message #80315 is a reply to message #80301 ] Sat, 20 June 2009 13:54 Go to previous messageGo to next message
Russ  is currently offline Russ
Messages: 413
Registered: August 2008
Location: Oslo, Norway
Faithful Member

If you type:

which php

You will find out which php binary is being used. There is a good chance that it is a symlink in your /usr/bin directory which points to the old version of php.

Remove and replace this symlink to point to the php5 binary and you should be good to go Smile

Edit: If your /usr/bin/php points to /etc/alternatives/php (which is also a symlink) then change *that* symlink to point the php5 one - just in case there are other parts of your system relying on that link.

rm /etc/alternatives/php
ln -s /usr/bin/php5 /etc/alternatives/php

(The /usr/bin/php5 link will exist if you apt-get installed php5, but in some cases you might need to point to the actual php5 binary, wherever that is on your system)

[Updated on: Sat, 20 June 2009 18:48]


*On Freenode I am rooster*
http://www.walkandclimb.co.uk/images/monkeydust.jpghttp://www.walkandclimb.co.uk/userpix/2_linux_wave_small_2.jpg
Re: error while running symfony -V [message #80560 is a reply to message #80090 ] Wed, 24 June 2009 15:32 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Ah, beg your pardon - I thought you were on Windows. As russ says, you need to change your path, or modify "php" in your path to symlink to the PHP5 binary.

Let us know how you get on, and don't be afraid to google for clues Very Happy


Remember Palestine
Previous Topic:Internet Explorer cant open my symfony site
Next Topic:Keeping the production database password secret
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software