Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil Problem
  • I'm on Site5 shared hosting, and installed FuelPHP manually (I have bash shell access, but couldn't install via the shell, not really sure why). Now, when I try to run oil commands, (using php oil) I get
    Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /home/username/oil on line 38
    
    Parse error: syntax error, unexpected T_STRING in /home/username/oil on line 38
    
    I'm guessing it has something to do with the fact that the server has PHP 5.2 and 5.3 installed, and I have to use a .htaccess line to make it use 5.3
    AddHandler application/x-httpd-php53 .php
    

    I could of course be wrong, I really have no idea why the error is happening but that seems to be the one thing that is out of the ordinary in my setup. If it matters, Fuel is installed outside of the public documents directory, the project it is for is in a subfolder of my web server's public document directory. So yeah, any help on getting it to work, either via installing the "normal" way so oil works - I can't sudo which seems to be the issue there, or getting php oil to work, would be very much appreciated. I saw on another thread something about setting the Path, but it was for someone setting up on a Mac, I don't know if that applies to me or not. BTW it is a Linux host.
  • If you're using 'php oil', it will use the CLI version of PHP. If you have multiple versions installed, make sure the correct one is used. You can type 'php -v' to check the version. If the paths you use are non-standard (i.e. you have changed them in your index.php), don't forget to also change them in oil.
  • ok, thanks for pointing me in the right direction. If anyone else has the same problem (getting oil to use the right version of php when both are installed) you can make php an alias to the correct version (i.e., php 5.3. is located at /usr/local/php53/bin/php on my server, so I ssh'ed to the server and typed: alias php="/usr/local/php53/bin/php" and now when I run php oil it uses php 5.3).

Howdy, Stranger!

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

In this Discussion