Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a debian etch server with php5 packages installed.

My issue is that I can't find any php executable to run scripts on the command line. Running "whereis php5" return folders with only config files, .so files and no executables and "whereis php" returns nothing.

I've googled and found out about php-cli. Is this the solution that I'm looking for? If so, what are the differences between php5 and php5-cli packages? Will installing the php5-cli package interfere with my current setup of php5?

Thanks for the help!

Wadih

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

'php5' isn't php itself. There is libapache2-mod-php5 which is the php5 module used by apache (.so file), php5-cli will install a standalone binary file that can be used to run php script locally on the server (/usr/bin/php5). You can have both installed without any problems

share|improve this answer
add comment

I think the package descriptions says it all :

php5 package description:

This package is a meta-package that, when installed, guarantees that you have at least one of the four server-side versions of the PHP5 interpreter installed. Removing this package won't remove PHP5 from your system, however it may remove other packages that depend on this one.

php5-cli package description:

This package provides the /usr/bin/php5 command interpreter, useful for testing PHP scripts from a shell, or perhaps even performing general shell scripting tasks, if you're frightened of perl and python.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.