Good day,

The php file can have whichever extension that you want, provided that the
webserver understands which application is associated with which extension.

If you want to run a PHP script as a CGI or without the webserver , just
install the PHP standalone executable.  This is done by default with many
RPM packages, and can easily be done with a tarball.

To run the script, just put:

#!/usr/local/bin/php

(or whatever location it's installed into) as the first line of your php
script.  Your CGI program can run this program like any other shell command
and get the results.

Also, if the extension is .cgi , your web server should understand that it's
a cgi program and exec it appropriately.

============================
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-----Original Message-----
From: hugh danaher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 1:20 PM
To: [EMAIL PROTECTED]; php
Subject: Re: [PHP] PHP and CGI


That I know, the file with the php code needs to have the extension of .php
I absolutely don't know anything about CGI, but could you somehow "include"
a .php file in your script?
----- Original Message -----
From: "SpyProductions Support Team" <[EMAIL PROTECTED]>
To: "hugh danaher" <[EMAIL PROTECTED]>; "php"
<[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 12:07 PM
Subject: RE: [PHP] PHP and CGI


>
> No, it is in a CGI script.
>
> And I can't recompile PHP for cgi extensions.  :(
>
> -Mike
>
>
> > -----Original Message-----
> > From: hugh danaher [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 12, 2002 2:43 PM
> > To: [EMAIL PROTECTED]; php
> > Subject: Re: [PHP] PHP and CGI
> >
> >
> > is your file extension .php?
> > hugh
> > ----- Original Message -----
> > From: "SpyProductions Support Team" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 12, 2002 11:25 AM
> > Subject: [PHP] PHP and CGI
> >
> >
> > >
> > > I did some research in the archives on this, but couldn't come up with
a
> > > straight answer.
> > >
> > > I have a CGI script that uses and HTML template/form.  I would like to
> > embed
> > > a PHP script in the template to take some of the values of the
> > CGI and put
> > > them in a database.  I set up the database, wrote the PHP, but now
find
> > that
> > > the CGI script apparently won't recognize my PHP.
> > >
> > > Anyone have any ideas as to what I need to do?
> > >
> > > The CGI is a preset thing I can't re-write in PHP (at least for
> > now).  And
> > I
> > > don't know much CGI myself.
> > >
> > > Thanks!
> > >
> > > -Mike
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to