ga-wdi-boston / php-guide

Other
0 stars 4 forks source link

linux installing php trouble #5

Open dvdpwll opened 8 years ago

dvdpwll commented 8 years ago

i get this error in my terminal:

Sorry, but php-version was unable to find version '7.0' under ''.

after I inserted this code into my ~/.bashrc file:

# php-version
source $HOME/local/php-version/php-version.sh && php-version 7.0

but I get this message when I run php -v:

The program 'php' can be found in the following packages:
 * php7.0-cli
 * hhvm
Try: sudo apt install <selected package>

I am going to run sudo apt install php7.0-cli to see what happens.

dvdpwll commented 8 years ago

Okay, after I ran sudo apt install php7.0-cli I got this mesage when I do php -v:

PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies

but I still get the:

Sorry, but php-version was unable to find version '7.0' under ''.

when I open terminal.

I removed the php code from ~/.bashrc and it seems to work fine. When I run php -v it still outputs this:

PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies

So I'm not sure what adding it to the ~/.bashrc file was supposed to do.

laurenfazah commented 8 years ago

Adding to bashrc was for php-version to run 7.0. For wednesday, as long as you're running PHP 7.0, any way that'll be fine. Thanks, David!