• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    New

    path for PHP 5.4 for CLI?

    What path could I use (and add to my .bash_profile) to successfully invoke php 5.4 (or higher?) from CLI?

     

    While PHP 5.4 was selected in Hosting Details > Programming Languages tab a quick check in CLI:

    php -v

    returns

    PHP 5.3.13 (cli) (built: May 14 2012 16:26:28) 
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

    Next, in my local .bash_profile I have:

    alias php="/usr/local/php5_3/bin/php"

    and if change that to

    alias php="/usr/local/php5/bin/php"

    then my PHP version becomes 5.2.

     

     

    1 REPLY 1
    Moderator
    Moderator

    Hey @ur,

     

    First let me say welcome to the community! Glad to have you join us! Smiley Happy

     

    I may be wrong, but it sounds like you're using an older shared hosting plan as the issue described is something commonly encountered on  Classic/Web hosting plans. Because of the configuration of these environments, they usually use separate FTP servers (nodes) for access. Depending on the nodes associated with your account, your CLI will most likely only have 5.2/5.3 available as very few of these were updated with 5.4. 

     

    If you absolutely have to have 5.4, you might consider moving your site to a Linux cPanel shared hosting plan. These new hosting plans we currently offer allow you to select

    PHP versions 5.4, 5.5, and 5.6. Also, the version specified in the panel works for both web and CLI.

     

    If you're trying to use this within different type of hosting plan, please let us know. If it's outside of the plans that I suggested, perhaps another member would have a better idea on how to work around this.

     

    CG - GoDaddy | Community Moderator
    24/7 support available at x.co/247support