2017-11-16 4 views
0

私はphp -vまたはphp -iを使用して私のPHP版を表示することを確認したhereを確認しました。しかし、私はこれらのコマンドを入力すると、私は-bash: php: command not foundを得た。私はrpm -qa | grep phpを入力すると、私はなぜOracle LinuxはPHPパッケージを認識できないのですか?

php71w-bcmath-7.1.11-1.w7.x86_64 
php71w-pdo-7.1.11-1.w7.x86_64 
php71w-ldap-7.1.11-1.w7.x86_64 
mod_php71w-7.1.11-1.w7.x86_64 
php71w-mbstring-7.1.11-1.w7.x86_64 
php71w-xml-7.1.11-1.w7.x86_64 
php71w-mysql-7.1.11-1.w7.x86_64 
php71w-gd-7.1.11-1.w7.x86_64 
php71w-common-7.1.11-1.w7.x86_64 

を取得し、私は(phpコマンドを持っており、その名前をphp71wを持っているすべてのパッケージを示す)yum provides php | grep php71wを入力するとき、私は私が欠けている何

mod_php71w-7.1.8-2.w7.x86_64 : PHP module for the Apache HTTP Server 
mod_php71w-7.1.9-1.w7.x86_64 : PHP module for the Apache HTTP Server 
mod_php71w-7.1.9-2.w7.x86_64 : PHP module for the Apache HTTP Server 
mod_php71w-7.1.10-1.w7.x86_64 : PHP module for the Apache HTTP Server 
mod_php71w-7.1.11-1.w7.x86_64 : PHP module for the Apache HTTP Server 
mod_php71w-7.1.11-1.w7.x86_64 : PHP module for the Apache HTTP Server 

を取得しますか? mod_php71w-7.1.11-1.w7.x86_64 : PHP module for the Apache HTTP Serverにphpコマンドがあり、インストールされていると表示されている場合は、なぜphp -vが認識されませんか?

+0

また、php-cliパッケージも必要です。 –

+0

この回答ありがとうございます。私はそれを受け入れることができるようにこれを答えとして書くことができますか? – GabrielRado

答えて

3

通常、PHPコマンドラインインターフェイスはデフォルトではインストールされません。あなたのディストリビューション/バージョン用の正しいphp-cliパッケージを見つけてインストールしてください。