/etc/php4/cli/php.ini
The configuration file for the CLI version of PHP.
php [options]
[-f]
file
[[--]
args ...]
php [options]
-r
code
[[--]
args ...]
php [options]
--
[args ...]
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This is the command line interface that enables you to do the following:
You can parse and execute files by using parameter -f followed by the name of the file to be executed.
Using parameter -r you can directly execute PHP code simply as you would do inside a .php file when using the eval() function.
If none of -r or -f is present but a single parameter is given then this parameter is taken as the filename to parse and execute (same as with -f). If no parameter is present then the standard input is read and executed.
-a
Run interactively
-c path|file
Look for php.ini file in the directory path or use the specified file
-n
No php.ini file will be used
-d foo[=bar]
Define INI entry foo with value bar
-e
Generate extended information for debugger/profiler
-f file
Parse and execute file
-h
This help
-i
PHP information and configuration
-l
Syntax check only (lint)
-m
Show compiled in modules
-r code
Run PHP code without using script tags '<?..?>'
-s
Display colour syntax highlighted source
-v
Version number
-w
Display source with stripped comments and whitespace
-z file
Load Zend extension file
Arguments passed to script. Use '--' args when first argument starts with '-' or script is read from stdin
/etc/php4/cli/php.ini
The configuration file for the CLI version of PHP.
/etc/php4/cgi/php.ini
The configuration file for the CGI version of PHP.
/etc/php4/apache/php.ini
The configuration file for the version of PHP that apache uses.
/etc/php4/apache2/php.ini
The configuration file for the version of PHP that apache2 uses.
This command simply writes the text "Hello World" to standard out.
This shows the configuration of your gd extension. You can use this to easily check which imag formats you can use. If you have any dynamic modules you may want to use the same ini file that php uses when executed from your webserver. There are more extensions which have such a function. For dba use:
php -r 'print_r(dba_handlers(1));'
You can use a shebang line to automatically invoke php from scripts. Only the CLI version of PHP will ignore such a first line as shown below:
#!/bin/php
<?php
// your script
?>
This manpage describes php, version 4.4.4-8+etch6.
2 releases since Debian 3.1 (Sarge); the text changed 1 time.