tags:

views:

105

answers:

3

Hey all,

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

+1  A: 

Do you want to run PHP on USB for example? then check this out. Search google for more.

ghostdog74
Hm.... this is interesting. I don't think this would work because I am not anywhere near the server and cannot run gui programs off it.
Matt
+2  A: 

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.

GreenMatt
Yah that's what I'm trying to do. Unfortunately php has not been set up to just be able to type "php" in the command line and have it work. I need to go to the path, and when I run it from the path is gives me "permission denied"
Matt
GreenMatt
+2  A: 

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.

Ignacio Vazquez-Abrams
It's the same name on debian/ubuntu based systems.
Hippo