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
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.
- Is there a binary RPM available for PHP with CLI support? I couldn't find
it on the mirrors.
- 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
On Mon, 01 Mar 2004 08:50:27 -0500, Christopher Ness nesscg@mcmaster.ca wrote:
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.
Unfortunately, simple scripts like that work, but the complex script that's used to configure the latest CVS version of Horde doesn't. I get the error "<filename. is not available through the web interface." The developers at Horde.org say this is a PHP compilation issue. -- Steve
On Mon, 2004-03-01 at 09:17, Steven Stern wrote:
Unfortunately, simple scripts like that work, but the complex script that's used to configure the latest CVS version of Horde doesn't. I get the error "<filename. is not available through the web interface." The developers at Horde.org say this is a PHP compilation issue.
But if you run the script as a CLI there is no "web interface". I can't really see what you are trying to do, but it sounds like you should run the PHP through a web server because it is asking for interaction.
What flag do they require for the compile, and do you know why/what it does?
Chris
On Mon, 01 Mar 2004 09:34:14 -0500, Christopher Ness nesscg@mcmaster.ca wrote:
But if you run the script as a CLI there is no "web interface". I can't really see what you are trying to do, but it sounds like you should run the PHP through a web server because it is asking for interaction.
What flag do they require for the compile, and do you know why/what it does?
Chris
When I try to run it through the web, I get a 403 "forbidden" error, even though the file is owned by "root:nobody" and "nobody" has read/execute permissions. The script prompts the console for input and is not supposed to be run through the web.
My hope is that they change it by the time this comes out of development and into release. -- Steve
Steven Stern said:
When I try to run it through the web, I get a 403 "forbidden" error, even though the file is owned by "root:nobody" and "nobody" has read/execute permissions.
I don't know if it will fix your problem, but unless you have changed the default httpd runs as the "apache" user, not "nobody".
On Mon, 1 Mar 2004 14:51:15 -0500 (EST), "William Hooper" whooperhsd3@earthlink.net wrote:
Steven Stern said:
When I try to run it through the web, I get a 403 "forbidden" error, even though the file is owned by "root:nobody" and "nobody" has read/execute permissions.
I don't know if it will fix your problem, but unless you have changed the default httpd runs as the "apache" user, not "nobody".
-- William Hooper
I changed it to run as "nobody". There are problems with the Horde HEAD build and the developer thinks it purely a Fedora problem. He may be right, but I'm going back to the stable distribution and wait for them to do a bit more developing. -- Steve
Em Seg, 2004-03-01 às 11:34, Christopher Ness escreveu:
But if you run the script as a CLI there is no "web interface". I can't really see what you are trying to do, but it sounds like you should run the PHP through a web server because it is asking for interaction.
But you can make it run with curses-based interface, or even gtk. What makes php a language almost as suitable for standalone apps as python.
Someone said: "the best computer language is that one you know about".