PHP with CLI

Christopher Ness nesscg at mcmaster.ca
Mon Mar 1 13:50:27 UTC 2004


To use PHP with a command line simply put this at the top of your
script.  You need to tell it where to find php.

#!/usr/bin/php -q

Any output that would normally go to the browser should go to STDOUT.

This script worked for me.  Make sure you have the file as an
executable.  Below is the command to set the permissions to to read,
write and execute for only the OWNER of the file.

chmod 700 filename.php

This script worked for me. (don't include the equal signs)

=========================================================

#!/usr/bin/php -q
<? phpinfo(); ?>

=========================================================

Cheers,
Chris

On Mon, 2004-03-01 at 00:18, Steven Stern wrote:
> I have an application that requires the CLI module in PHP. The PHP that's
> installed with Fedora doesn't seem to have it.
> 
> 1) Is there a binary RPM available for PHP with CLI support? I couldn't find
> it on the mirrors.
> 
> 2) If not, and if I compile a new version of PHP, how does this affect my
> ability to use up2date to keep PHP current?
> --
>    Steve
>    
-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://nesser.org/pgp-key/

08:44:09 up 46 min, 3 users, load average: 0.05, 0.23, 0.20 

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040301/f8cd539d/attachment-0001.sig>


More information about the fedora-list mailing list