php: command not found on centos
You have to install the commandline interface version of php before you can use it from bash
:
yum install php-cli
the commandline version is not necessary if PHP is part of a page in nginx.
Related videos on Youtube
user3566301
Since 2002, I have started to web development with HTML and ASP languages.I have interested with ASP short time.I met with PHP language in 2003.I developed many projects on PHP up to this time.In 2009, I started to Yasar University as a Software Engineering graduationg student.Also, I graduated university for 5 years(with Prepararority Class).I have served as a Web Developer for Reklam-Fabrikası, where I have been repeatedly recognized for integrating and developing many web sites for 1 years.I completed my summer internship on Türkiye İş Bankası, which is the largest Banking Companies in Turkey.I have worked for many freelance projects.I have developed back-end of slot machine games as a Freelance Web Developer on Beyn Bilgi Teknolojileri A.Ş. for a month.I have developed Public Transport Assistant which called TravelBrain on my graduation project.Also, I have served as a Part-Time Software Developer for Ericsson for 9 months in my last year of university.
Updated on September 18, 2022Comments
-
user3566301 over 1 year
I've currently installed CentOS (6.5 version), nginx, mysql and php. I've tried to navigate to
index.php
in a browser, and it looks fine, but if I try to run the script via the command-line I get:php: command not found
Why did that happen? How can I solve it?
Edit: I tried to install the php-cli package:
# yum install php-cli Error: Package: php-cli-5.3.3-40.el6_6.x86_64 (updates)Requires: php-common(x86-64) = 5.3.3-40.el6_6 Installed: php-common-5.4.35-1.el6.remi.x86_64 (@remi) php-common(x86-64) = 5.4.35-1.el6.remi Available: php-common-5.3.3-38.el6.x86_64 (base) php-common(x86-64) = 5.3.3-38.el6 Available: php-common-5.3.3-40.el6_6.x86_64 (updates) php-common(x86-64) = 5.3.3-40.el6_6 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
-
user3566301 over 9 yearsSee edited post