Hi,
I'm a bit of a newbie, seeking help on how to run a .php from the shell.
I'm running debian, with Apache-ssl which is compiled with mod_php4. PHP
for web sites works great.
However, to run a php script from the shell, do I need to install php
from scratch?
Thanks
Andrew Hearn 4 11921
Andrew Hearn <an*********@yahoo.com> wrote: I'm a bit of a newbie, seeking help on how to run a .php from the shell.
I'm running debian, with Apache-ssl which is compiled with mod_php4. PHP for web sites works great.
However, to run a php script from the shell, do I need to install php from scratch?
No, just install the php-cgi packages (php4-cgi*). This contains
/usr/bin/php4 which you can use to run php scripts. Either use
'php4 /foo/bar.php' or
foo.php:
#!/usr/bin/php4
<?php
echo "Hello world!\n";
?>
--
Daniel Tryba
Daniel Tryba wrote: Andrew Hearn <an*********@yahoo.com> wrote:
I'm a bit of a newbie, seeking help on how to run a .php from the shell.
I'm running debian, with Apache-ssl which is compiled with mod_php4. PHP for web sites works great.
However, to run a php script from the shell, do I need to install php from scratch?
No, just install the php-cgi packages (php4-cgi*). This contains /usr/bin/php4 which you can use to run php scripts. Either use 'php4 /foo/bar.php' or
foo.php: #!/usr/bin/php4 <?php echo "Hello world!\n"; ?>
Thanks for the help, this has worked... However I need IMAP support, is
it possible to compile php4-cgi with IMAP support?
Is it as simple as following the instructions at: http://uk.php.net/manual/en/ref.imap.php
Thank you!
Andrew Hearn.
Andrew Hearn <an*********@yahoo.com> wrote: I'm running debian, with Apache-ssl which is compiled with mod_php4. PHP for web sites works great.
However, to run a php script from the shell, do I need to install php from scratch?
install the php-cgi packages (php4-cgi*)
Thanks for the help, this has worked... However I need IMAP support, is it possible to compile php4-cgi with IMAP support?
To me it's unclear if you are using the packges from your distribution
or your compiling yourself, but in the first case install php4-imap (and
do a "dpkg -l 'php4*'" to find out what modules are available).
--
Daniel Tryba
Andrew Hearn wrote: Hi,
I'm a bit of a newbie, seeking help on how to run a .php from the shell.
I'm running debian, with Apache-ssl which is compiled with mod_php4. PHP for web sites works great.
However, to run a php script from the shell, do I need to install php from scratch?
Thanks
Andrew Hearn
try "whereis php". It should show you where the executable is.
Regards,
Shawn
--
Shawn Wilson sh***@glassgiant.com http://www.glassgiant.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steven Bethard |
last post by:
This has probably been answered before, but my Google skills have failed
me so far...
Is there an os independent way of checking to see if a particular
executable is on the path? Basically what...
|
by: presentt |
last post by:
Hello,
I'm running Ubuntu Linux 5.04.
I just started teaching myself Python today, and have been reading a
few things to get started. I came across something in one (namely...
|
by: Caroline |
last post by:
I'd like to launch an executable file from a web page. Basically, the user
enters seven parameters and then clicks a button to generate a graph. The
input is written to a file and then read by...
|
by: FireStarter |
last post by:
Guys,
How can I get the path to the current executable at run time? I think the VB6
equivalent is App.Path.
Thanks for your help.
FireStarter
|
by: vishsid3 |
last post by:
Hi guys , I am new to this forum .
can anybody plz tell me - "how can I run a c executable in some
directory ,while the executable is in some other directory "
I am new to unix and c ,so any...
|
by: Tim Daneliuk |
last post by:
I have a program wherein I want one behavior when a file is set as executable
and a different behavior if it is not. Is there a simple way to determine
whether a given named file is executable...
|
by: patrik.kahari |
last post by:
Is there a c++ function similar to getcwd that does not give you the
working directory but the directory or path of the currently running
executable?
I need this because im porting a game that...
|
by: Jeffrey Froman |
last post by:
Hello All,
I have two python versions installed, one in /usr/bin, and one in
/usr/local/bin. However, when invoking python without a full path,
I get the wrong executable with the right...
|
by: NasirMunir |
last post by:
I am trying to run an executable using shell. The executable look for certain files in the same directory and then run on those files.
My problem: I have created a form which asks from the user to...
|
by: mathieu |
last post by:
I'd like to be able to get the path to the current working executable
(from inside it).
Technically this is easy, I simply have to collapse: getcwd and
argv
Well argv comes in a little late,...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |