1
votes

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

2
What operating system are you using? How did you install PHP?Brian McKenna
Linux. I didn't install PHP. I'm using a University server.Matt

2 Answers

2
votes

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.

2
votes

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.