Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil problem
  • Hi all, When I try to run oil from terminal I got this problem:
    $ php oil -v
    
    Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /Users/ioncatalin/Sites/iptfuel/oil on line 38
    
    Parse error: syntax error, unexpected T_STRING in /Users/ioncatalin/Sites/iptfuel/oil on line 38
    

    I think the problem is that my terminal uses the php version bundled with osx leopard,
    When I run php -v it says:
    PHP 5.2.5
    

    What I need to do so that terminal uses the php version on my mamp installation?
  • On MAMP 1.9.x from terminal you need to run the following:
    export PATH=/Applications/MAMP/bin/php5.3/bin/:$PATH
    
  • Josh: I personally just upgraded the core version of PHP. I like being able to run the two different versions as I can install things like Readline that have no place in MAMP. Anyway:
    echo $PATH
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/phil/.rvm/bin $which php
    /usr/bin/php

    This shows the order of your PATH and where your php binary is installed. If PHP is installed in the first folder then you will need to either rename the binary or shove a new path on the front, either way it needs a symlink of "php" in your path somewhere to point to MAMP's PHP 5.3 binary located:
    ln -s /Applications/MAMP/bin/php5.3/bin/php /usr/bin/php

    You'll most likely need to do the same with your php.ini as otherwise it will continue looking for /private/etc/php.ini which will now be irrelevant. Back it up (rename it) then either copy your /Applications/MAMP/conf/php5.3/php.ini to its old location or put in a symlink.
  • Josh: I personally just upgraded the core version of PHP. I like being able to run the two different versions as I can install things like Readline that have no place in MAMP. Anyway:
    echo $PATH
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/phil/.rvm/bin $which php
    /usr/bin/php

    This shows the order of your PATH and where your php binary is installed. If PHP is installed in the first folder then you will need to either rename the binary or shove a new path on the front, either way it needs a symlink of "php" in your path somewhere to point to MAMP's PHP 5.3 binary located:
    ln -s /Applications/MAMP/bin/php5.3/bin/php /usr/bin/php

    You'll most likely need to do the same with your php.ini as otherwise it will continue looking for /private/etc/php.ini which will now be irrelevant. Back it up (rename it) then either copy your /Applications/MAMP/conf/php5.3/php.ini to its old location or put in a symlink.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion