Reputation: 22911
I was just wondering if anyone knows if there is a smaller version of php. I don't need any full-blown apache support I just need to be able to execute "php" to run a script in the terminal.
I already have PHP installed on the server, but I do not have access to running "php" in the terminal. I'd just like to run my script that I wrote in PHP.
Thanks, Matt Mueller
Upvotes: 1
Views: 296
Reputation: 798606
Many Linux distros have a package that contains the CLI version of PHP. On modern Fedora and derivatives (RHEL, CentOS, etc.) that package is php-cli
. If that package is installed (use rpm -q php-cli
to find out) and you still cannot use the php
executable then you should consider asking the system administrators why they've disabled it.
Upvotes: 2
Reputation: 18580
Maybe this won't work for you, but on every Linux system with PHP installed that I've used, I've been able to do the following to run a php script from the command line:
$ php SCRIPTNAME
Alternatively, to see if you can run a php script, you could also try:
$ which php
If you have command line access to php, this should tell you the path to the executable.
Upvotes: 2