Re: [PHP] PHP as CGI-CLI on FreeBSD/Apache22

2011-06-27 Thread Nilesh Govindarajan
On 06/27/2011 10:13 PM, Grant Peel wrote:
 Hi all,

 Up to this point we have been running PHP as an Apache 22 module.

 We would like to rebuild PHP over the next few weeks to run it as a CGI/CLI 
 PHPSuexec system.

 I am hoping there may be others that have made this migration and might have 
 a step by step how to (so far research shows it should be reasonably simple 
 to do), and would be willing to share it.

 Right now we have 

 FreeBSD 8.0
 Apache22 built from ports, with apache suexec enabled,
 PHP5 Built from ports,

 Any hints are appreciated,

 -G

PHP in CGI sucks at performance, you should give a thought to fastcgi +
php + suexec as in here: http://forum.linode.com/viewtopic.php?t=2982
Though its written for ubuntu, you can derive some tricks from there.
I don't know if php-fpm + suexec is possible. php-fpm is best for fastcgi.

-- 
Regards,
Nilesh Govindarajan
@nileshgr


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



Re: [PHP] PHP and CGI

2009-08-20 Thread sono-io

Hi Tedd,


In your .htacess file add this:

# handler for phpsuexec. -- makes following prefixes considered for  
php

FilesMatch \.(htm|html|pl)$
SetHandler application/x-httpd-php
/FilesMatch



	Thanks for the code.  I placed it in the .htaccess file for the  
output templates, but unfortunately it didn't work.  It just prints  
out part of the PHP code on the template:


 / '; for ($year = date(Y) ; $year = date(Y) + 9 ; $year++)  
{ echo $year\n; } echo ''; ?


	Thanks also to everyone else who responded as well.  I'm off to find  
a PHP shopping cart!


Frank

Re: [PHP] PHP and CGI

2009-08-19 Thread tedd

At 5:10 PM -0700 8/18/09, sono...@fannullone.us wrote:
	I've searched high and low for an answer to this.  Hopefully 
someone here might know.  Can PHP be used under a CGI?  I tried to 
put the following code on one of my perl shopping cart pages but it 
doesn't work:


?php
echo select name=\Year\;
for ($year = date(Y) ; $year = date(Y) + 8 ; $year++) {
echo option value=\$year\$year/option\n;
}
echo /select;
?

	 It works fine on a .php page.  I know that SSI will not work 
under CGI, so maybe it's the same for PHP.  Is there anyway to get 
this to work?


Thanks,
Frank



Frank:

I won't guarantee that this will work, but it's worth a try.

In your .htacess file add this:

# handler for phpsuexec. -- makes following prefixes considered for php
FilesMatch \.(htm|html|pl)$
 SetHandler application/x-httpd-php
/FilesMatch

If it works, let me know.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] PHP and CGI

2009-08-18 Thread Daevid Vincent
 

 -Original Message-
 From: sono...@fannullone.us [mailto:sono...@fannullone.us] 
 Sent: Tuesday, August 18, 2009 5:10 PM
 To: PHP General List
 Subject: [PHP] PHP and CGI
 
   I've searched high and low for an answer to this.  
 Hopefully someone  
 here might know.  Can PHP be used under a CGI?  I tried to put the  
 following code on one of my perl shopping cart pages but it doesn't  
 work:
 
 ?php
 echo select name=\Year\;
 for ($year = date(Y) ; $year = date(Y) + 8 ; $year++) {
   echo option value=\$year\$year/option\n;
 }
 echo /select;
 ?
 
It works fine on a .php page.  I know that SSI will 
 not work under  
 CGI, so maybe it's the same for PHP.  Is there anyway to get this to  
 work?

Well, if you already have the page coded in Perl, why not just write those 5
lines in perl?!

It's a straight up for loop basically and some print statements. You're not
hitting a database or using anything remotely PHP-esque there.

I'm not so sure you can just mix and match parsers. I recall years ago some
talk of doing this, but I think it's just so rare and really impractical
that it's not worth setting up even if you can do it with some Apache magic.
Stick to one pre-processor language. Either all PHP or all Perl but not
both.

Daevid.

Some people, when confronted with a problem, think 'I know, I'll use XML.'
Now they have two problems. 


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



Re: [PHP] Php in Cgi

2004-12-08 Thread Richard Lynch
Peter Law wrote:
 I am learning Php and have a web site host where scripts have to be in the
 cgi-bin. What is put in the original web page to call a script from the
 cgi-bin? The info from the web host is below.

Something like this may be useful to you:

Make two files.

Name one of them: form.html

Put this in it:

HTMLBODY
  FORM ACTION=/cgi-bin/form_processor.php METHOD=POST
INPUT NAME=nameBR
INPUT TYPE=SUBMIT VALUE=What's your name?
  /FORM
/BODY/HTML

Name the second file: form_processor.php

Put this in it:

?php
  if (isset($_POST['name'])){
  ?
Hello, ?php echo $_POST[name]?BR
Welcome to my website!
  ?php
  }
?

Now, upload the HTML page to the HTML part of your site, but put the PHP
page in your cgi-bin part of your site.

Visit the HTML page, and it *SHOULD* invoke the PHP page when you submit
the form.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] PHP in CGI ....php.in

2004-10-31 Thread Christian Ista

 where did you place your php.ini?

In the root of my application in www. /home/mydomaine/www

Thanks,


Christian, 

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



Re: [PHP] PHP in CGI ....php.in

2004-10-31 Thread Jonel Rienton
have you tried
#!/usr/local/lib/php -c /home/mydomaine/www
--
I not know English well, but I know 7 computer languages.
On Oct 31, 2004, at 2:32 AM, Christian Ista wrote:

where did you place your php.ini?
In the root of my application in www. /home/mydomaine/www
Thanks,
Christian,
--
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


Re: [PHP] PHP in CGI ....php.in

2004-10-30 Thread Christian Ista

 #!/usr/bin/php -c /path/to/php.ini

I tried this

#!/usr/local/lib/php -c php.ini

In the php.ini :
register_globals = on

but that's not work

Any idea ?

Christian, 

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



Re: [PHP] PHP in CGI ....php.in

2004-10-30 Thread Jonel Rienton
Hi,
where did you place your php.ini?
regards,
Jonel
--
I not know English well, but I know 7 computer languages.
On Oct 30, 2004, at 2:48 AM, Christian Ista wrote:

#!/usr/bin/php -c /path/to/php.ini
I tried this
#!/usr/local/lib/php -c php.ini
In the php.ini :
register_globals = on
but that's not work
Any idea ?
Christian,
--
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


Re: [PHP] PHP in CGI ....php.in

2004-10-29 Thread Greg Donald
On Fri, 29 Oct 2004 21:14:27 +0200, Christian Ista [EMAIL PROTECTED] wrote:
 Someone else told me it's possible to have a php.ini by website. Could you
 tell me where put in and what in ?

php -c /path/to/php.ini


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] PHP in CGI ....php.in

2004-10-29 Thread Christian Ista
 php -c /path/to/php.ini

Could you explain ??

My php pages are in /home/mysite/www

Thanks, 

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



Re: [PHP] PHP in CGI ....php.in

2004-10-29 Thread Greg Donald
On Fri, 29 Oct 2004 21:45:24 +0200, Christian Ista [EMAIL PROTECTED] wrote:
  php -c /path/to/php.ini
 
 Could you explain ??

This is how you specify which php.ini file to use with a cgi binary
php.  Is that not what you asked?

When you use php as a cgi binary (not as mod_php) you can run php a
couple of ways:

1) command line:

php -c /path/to/php.ini -r echo 'Hello World';

2) command line scripts:

#!/usr/bin/php -c /path/to/php.ini
?php
echo 'Hello world';
?


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] PHP as CGI or Module

2004-09-24 Thread raditha dissanayake
Binay wrote:
Hi
How to check whether PHP is installed as CGI or Apache module?
Thanks
Binay
 

I assume this is a spin of from your thread on turck mmcache. I am 
pretty sure you have not read the mmcache docs or searched for  google 
on this. Because there are countless articles on installing turck.  To 
cut a long story short you should compile php with --disbable-cgi to use 
turck.  Please google next time before posting.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP as CGI or Module

2004-09-24 Thread Binay
Hi,

I knew that Turck does not work in CGI mode. But didn't find it worth
checking cuz earlier it was working and my administrator said he only
upgraded the php and did nothing. So i presumed that PHP is still running as
apache module only.

But when after lotttsss of hair pulling couldn't make turck run with 4.3.8 ,
finally decided to check type (mode) of PHP installation. I m sorry for
convience caused.

Thanks
Binay

- Original Message -
From: raditha dissanayake [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 24, 2004 1:40 PM
Subject: Re: [PHP] PHP as CGI or Module


 Binay wrote:

 Hi
 
 How to check whether PHP is installed as CGI or Apache module?
 
 Thanks
 Binay
 
 
 I assume this is a spin of from your thread on turck mmcache. I am
 pretty sure you have not read the mmcache docs or searched for  google
 on this. Because there are countless articles on installing turck.  To
 cut a long story short you should compile php with --disbable-cgi to use
 turck.  Please google next time before posting.



 --
 Raditha Dissanayake.
 
 http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
 Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
 Graphical User Inteface. Just 128 KB | with progress bar.

 --
 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



Re: [PHP] PHP as CGI or Module

2004-09-24 Thread raditha dissanayake
Binay wrote:
But when after lotttsss of hair pulling couldn't make turck run with 4.3.8 ,
finally decided to check type (mode) of PHP installation. I m sorry for
convience caused.
 

I admire your attitude. Many others would have come out with a flame in 
response to my message.  Please let me tip my hat to you.

best regards
raditha
--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php .vs cgi app..

2004-07-14 Thread Vail, Warren
This is one of those questions that will get lot's of different answers
depending on your responders perspective.  This is my view;

PHP can be executed as a CGI or as a MOD by Apache (or most web servers).
This means that Apache can load a fresh copy of PHP with each browser
request to the server (CGI), or it can load PHP on startup, or first request
(MOD) and can continue to use that version for each subsequent browser
request to the server (on .php files only, of course).  Interestingly
enough, I believe Perl can be executed by Apache in either fashion as well.

Apache gets config parameters, when PHP is available, that tells it where to
find the PHP modules, and will load them from there in either case.  The
server also has a Base Directory where it expects to find it's
html/php/perl/etc documents and will make sure the appropriate interpreter
is used based on the document file type.  There was a time when the first
line of the script (beginning with a splash/bang; i.e. #!/usr/local/bin/perl
) determined the interpreter, and this may still be available in Apache.  It
should still be possible to even write C programs and execute the compiled
binary as a CGI, which means in this case no interpreter is required and
form input is read from stdin and html is sent to the browser via stdout (if
you are familiar with C).  While C may produce the fastest code, you should
find PHP is much more suited for developing web applications than almost any
other option.

Just to add to the confusion, PHP can be executed from the command line of a
telnet session, or more commonly by a cron timer program, which I have
also heard referred to as running PHP as a cgi.  The syntax for that is;

/path/to/php /path/to/php/script.php

Hope this helps a bit,

Warren Vail
 


-Original Message-
From: bruce [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 14, 2004 10:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php .vs cgi app..


hi..

a really general/basic question... what is the difference between a cgi
app and a php app.. does it really come down to where the app is being run
from..

i mean within apache, if i specify that php/perl/etc... app resides at a
given location, and that files with a certain extension are to be handled by
the perl/php/etc app, then i can handle the processing of the file by the
interpreter anywhere within my site that i grant access to. is there
anything/any reason to have a cgi-bin portion of my app, other than good
design practice...

clarification would be useful!!!

thanks..

-bruce

-- 
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



Re: [PHP] php .vs cgi app..

2004-07-14 Thread Ciprian Constantinescu
As I know, if you run PHP as a module for Apache is faster than running
as CGI. Also Python scripts can be run as a module(faster) or as CGI. The
main disadvantage for Python as a module is that you don't get all the
facilities of CGI.

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



Re: [PHP] php as CGI and $_POST

2004-06-05 Thread Peter Risdon
David T-G wrote:
Peter --
...and then Peter Risdon said...
% 
% David T-G wrote:
% 
%  bash-2.05a$ /usr/local/bin/php -v
%  PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)
% 
% You probably need the cgi version - not the command line one you 
% actually have.

Ooohhh...  Ouch.  So there are *three* possible PHP compiles:
module, CGI, and CLI?
 

So far as the php binary in /usr/local/bin is concerned there are two - 
cli and cgi. The module consists of different files (see the AddModule 
and LoadModule bits of httpd.conf). You can have both (I have made that 
my standard build for multi-homed machines) but need to muck about a bit 
for this.

OK.  To save us the cost of rebuilding at this host, is there any way to
pass args to the CLI version of the script running as a CGI?
 

You might find you start getting odd problems with http headers if you 
use the cli version. In general you're better off using the cgi one. But 
you can get this by recompiling but not installing php cgi, then copy 
the php executable to, say, /usr/local/bin/php-cgi and prefacing your 
scripts with this in the shebang. That would mean zero disruption for 
users on the machine.

Peter.
Thanks  HAND
:-D
 

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


Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]):
 
 and know that it works as intended, but now I seem completely unable to
 get any $_POST (or even $_GET) data into the script.  I suspect, from
 reading the manual and noting the warnings, that any GET data will be
 ignored, and that's fine, but I know that I can provide that without even
 messing about with a form that I might somehow be screwing up, so I
 thought I'd try it...
 
 My code is as simple as
 
   #!/usr/local/bin/php

What does '/usr/local/bin/php -v' show?


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Curt, et al --

...and then Curt Zirzow said...
% 
% * Thus wrote David T-G ([EMAIL PROTECTED]):
%  
%  My code is as simple as
%  
%#!/usr/local/bin/php
% 
% What does '/usr/local/bin/php -v' show?

Doesn't seem to scary to me:

  bash-2.05a$ /usr/local/bin/php -v
  PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)
  Copyright (c) 1997-2003 The PHP Group
  Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies


% 
% 
% Curt


TIA  HAND

:-D
-- 
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp1qcksBNrfz.pgp
Description: PGP signature


Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Peter Risdon
David T-G wrote:
Curt, et al --
...and then Curt Zirzow said...
% 
% * Thus wrote David T-G ([EMAIL PROTECTED]):
%  
%  My code is as simple as
%  
%#!/usr/local/bin/php
% 
% What does '/usr/local/bin/php -v' show?

Doesn't seem to scary to me:
 bash-2.05a$ /usr/local/bin/php -v
 PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)
 

You probably need the cgi version - not the command line one you 
actually have.

Peter.
 Copyright (c) 1997-2003 The PHP Group
 Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
% 
% 
% Curt

TIA  HAND
:-D
 

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


Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]):
 Curt, et al --
 
 ...and then Curt Zirzow said...
 % 
 % * Thus wrote David T-G ([EMAIL PROTECTED]):
 %  
 %  My code is as simple as
 %  
 %#!/usr/local/bin/php
 % 
 % What does '/usr/local/bin/php -v' show?
 
 Doesn't seem to scary to me:
 
   bash-2.05a$ /usr/local/bin/php -v
   PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)

that cli should be cgi.

I'm assuming you compiled php with something like:
   configure --with-apxs=/yada/apxs [other options]

What you need to do is recompile php with configure like:
   configure --[other options]

Then make will build a cgi binary in sapi/cgi/php, relative to your build
directory.  If you want both versions (cgi and cli) you'll have to
manually place the cgi version of php somewhere else than
/usr/local/bin or name it something php_cgi. And then reference
that file in you php script.




Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Peter --

...and then Peter Risdon said...
% 
% David T-G wrote:
% 
%  bash-2.05a$ /usr/local/bin/php -v
%  PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)
% 
% You probably need the cgi version - not the command line one you 
% actually have.

Ooohhh...  Ouch.  So there are *three* possible PHP compiles:
module, CGI, and CLI?

OK.  To save us the cost of rebuilding at this host, is there any way to
pass args to the CLI version of the script running as a CGI?


Thanks  HAND

:-D
-- 
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgphoH93CTsi6.pgp
Description: PGP signature


Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]):
 Peter --
 
 ...and then Peter Risdon said...
 % 
 % David T-G wrote:
 % 
 %  bash-2.05a$ /usr/local/bin/php -v
 %  PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)
 % 
 % You probably need the cgi version - not the command line one you 
 % actually have.
 
 Ooohhh...  Ouch.  So there are *three* possible PHP compiles:
 module, CGI, and CLI?
 
 OK.  To save us the cost of rebuilding at this host, is there any way to
 pass args to the CLI version of the script running as a CGI?

You might have getenv('QUERY_STRING') for GET data and *possibly* to
get the POST data you can do something like:

$fp = fopen('php://stdin', 'r');
while (!feof($fp) ) $buf .= fgets($fp, 1024);
fclose($fp);

Then of course you're going to have to parse the query_string and
post data in order to get the variable names and values..

parse_str(getenv('QUERY_STRING'), $_GET);


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Curt, et al --

...and then Curt Zirzow said...
% 
% * Thus wrote David T-G ([EMAIL PROTECTED]):
%  
%bash-2.05a$ /usr/local/bin/php -v
%PHP 4.3.4 (cli) (built: Jan  6 2004 15:27:52)
% 
% that cli should be cgi.
% 
% I'm assuming you compiled php with something like:
%configure --with-apxs=/yada/apxs [other options]

Yep.  And with CLI enabled, too.


% 
% What you need to do is recompile php with configure like:
%configure --[other options]

Gotcha.  Thanks for the pointers.


% 
% Then make will build a cgi binary in sapi/cgi/php, relative to your build
% directory.  If you want both versions (cgi and cli) you'll have to
% manually place the cgi version of php somewhere else than
% /usr/local/bin or name it something php_cgi. And then reference
% that file in you php script.

I found where our support crew had built the current version not quite
six months ago, and that a lovely buildme file with our approximately 8
billion --with* params in it, so I just copied the tree, pulled apxs out,
rebuilt, and copied the CGI php somewhere as you suggest.  And now I have
post data; yippee :-)

Thanks also for your other response.  Finding the build tree was
definitely the easier route :-)


HAND

:-D
-- 
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgpJXoqkHNGmw.pgp
Description: PGP signature


Re: [PHP] php as cgi and module at same time

2004-04-10 Thread Curt Zirzow
* Thus wrote Andy B ([EMAIL PROTECTED]):
 is it possible to have php installed with apache as cgi and module both at
 the same time...??

Yes. See php.net/install


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] php as cgi with static libraries?

2004-02-19 Thread Marten Lehmann
that's what I already did (--enable-static=db4), but after that a 'ldd 
php' still showed me references to libdb.so. I don't want to build php 
with absolutely no dynamic libaries, only certain libaries shall be 
compiled in statically.
Still no answer? Is noone experienced enough in the building-process 
(may affect gcc in general, not php-specific).

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


Re: [PHP] php as cgi with static libraries?

2004-02-16 Thread Marten Lehmann
Hello,

You will need to build php yourself, take a look at configure --help:

$ ./configure --help | grep static
  --enable-static[=PKGS]  build static libraries [default=yes]
that's what I already did (--enable-static=db4), but after that a 'ldd 
php' still showed me references to libdb.so. I don't want to build php 
with absolutely no dynamic libaries, only certain libaries shall be 
compiled in statically.

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


Re: [PHP] php as cgi with static libraries?

2004-02-15 Thread Adam Bregenzer
On Sun, 2004-02-15 at 17:19, Marten Lehmann wrote:
 when I'm building php as a cgi-module, a 'ldd php' shows a list of some 
 libraries, that are linked in dynamically. How can I link some of them 
 statically into the php-binary? I can't rely of external libs in some cases.

You will need to build php yourself, take a look at configure --help:

$ ./configure --help | grep static
  --enable-static[=PKGS]  build static libraries [default=yes]

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

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



Re: [PHP] php as cgi script

2003-11-28 Thread Nicole Lallande
Ivone --

You are using a PERL invocation for php.  PHP scripts begin with
?php
the # sign is a comment in PERL - not in PHP.

To run php as cgi you need to install the php cgi version (as opposed to 
the apache modular installation.)  That will allow you to run cgi 
scripts on the command line.

http://www.php.net/manual/en/install.commandline.php

Best regards,

Nicole

Ivone Uribe wrote:

Hello all!

I have this problem:

I need to run a php
(http://xx.yy.zz/cgi-bin/pruebacgi.php) that contains
that line 

#!/usr/local/bin/php -q
I get it an error from my apache log:
malformed header from script. Bad header=   php
[options] -r cod
e: /www/cgi-bin/pruebacgi.php
I hope someone can help me! I don't know what can I
do.
In fact if I run any php that have this line
#!/usr/local/bin/php
I get an error like that
Premature end of script headers:
/www/cgi-bin/pruebacgi.php 



I have installed the php4.3.3 and apache 1.3.28.

I configured the php with this line
./configure --with-mysql
--with-apache=../apache_1.3.28 --enable-track-vars
Do I need to configure some else in my apache or php
configuration file. Whan can I do to solve this
problem?
Thanks in advance
KISSES
Ivone




__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
 

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


Re: [PHP] php as cgi script

2003-11-28 Thread Ivone Uribe
Hi Nicole!

Thanks for your reply!

I'm a little confused:
Do I need to compile the php as cgi? I thought it was
when you wanted to run php from commanline: as 
./pruebacgi.php 
(Servers-CGI/Commandline) 

But in my case I want to call a php like that:
http://xx.yy.zz/cgi-bin/pruebacgi.php
and this php has this line #!/usr/local/bin/php

Do I have to compile a php as a cgi, or do I need to
do something on the apache server? Please could you
clarify my doubts.


For example this is a sample of the code:

?php
header(Content-Type: text/vnd.wap.wml);
$log=2;

$fp1 = fopen(logs/$HTTP_X_UP_SUBNO.get_location,
a);
$separador=-x-x-x-x-x-x-x-x- .date(l dS of F Y
h:i:s A). -x-x-x-x-x-x-x-x-;
$qerror=0;
?

?echo ?xml version=\1.0\
encoding=\ISO-8859-1\?\r\n;?


!DOCTYPE wml PUBLIC -//PHONE.COM//DTD WML 1.1//EN
http://www.phone.com/dtd/wml11.dtd;
wml
card title=teste

p align=center
br/Testbr/
/p

/card
/wml


I really appreciate your help.
Kisses,
Ivone
--- Nicole Lallande [EMAIL PROTECTED] wrote:
 Ivone --
 
 You are using a PERL invocation for php.  PHP
 scripts begin with
 ?php
 
 the # sign is a comment in PERL - not in PHP.
 
 To run php as cgi you need to install the php cgi
 version (as opposed to 
 the apache modular installation.)  That will allow
 you to run cgi 
 scripts on the command line.
 
 http://www.php.net/manual/en/install.commandline.php
 
 Best regards,
 
 Nicole
 
 Ivone Uribe wrote:
 
 Hello all!
 
 I have this problem:
 
 I need to run a php
 (http://xx.yy.zz/cgi-bin/pruebacgi.php) that
 contains
 that line 
 
 #!/usr/local/bin/php -q
 I get it an error from my apache log:
 malformed header from script. Bad header=   php
 [options] -r cod
 e: /www/cgi-bin/pruebacgi.php
 I hope someone can help me! I don't know what can I
 do.
 
 In fact if I run any php that have this line
 #!/usr/local/bin/php
 I get an error like that
 Premature end of script headers:
 /www/cgi-bin/pruebacgi.php 
 
 
 
 I have installed the php4.3.3 and apache 1.3.28.
 
 I configured the php with this line
 ./configure --with-mysql
 --with-apache=../apache_1.3.28 --enable-track-vars
 
 Do I need to configure some else in my apache or
 php
 configuration file. Whan can I do to solve this
 problem?
 
 
 Thanks in advance
 KISSES
 Ivone
 
 
 
 
 
 __
 Do you Yahoo!?
 Free Pop-Up Blocker - Get it now
 http://companion.yahoo.com/
 
   
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: [PHP] php as cgi script

2003-11-28 Thread Kelly Hallman
On Fri, 28 Nov 2003, Nicole Lallande wrote:
 Ivone --
 You are using a PERL invocation for php.  PHP scripts begin ?php

#! is not a perl invocation, it is a Unix convention to tell the shell 
which program should be used to process the file contents. If you are 
running PHP as a CGI from a webserver, chances are good you do want
#!/path/to/php as the first line, and ?php on the next line.

I don't think you can pass a flag like #!/usr/bin/php -q though, and I
doubt you would want to, since you still need to send the headers upon
first output. If you did not send headers and just started outputting, the 
server would return a 500 Internal Server Error.

The directory you're running it from needs to have ExecCGI permission
(i.e. /cgi-bin/) and assuming no special setup has been done, you probably
want to start the file off with that #! line as mentioned above. Also, you
may want to try naming the file .cgi

 the # sign is a comment in PERL - not in PHP.

# also denotes a comment in PHP. Though #! is not a comment, per se.  
(However, if you feed the file directly to some interpreter like perl, it
does have the benefit of being ignored as a comment.)

 To run php as cgi you need to install the php cgi version (as opposed to
 the apache modular installation.)  That will allow you to run cgi
 scripts on the command line.

CGI stands for common gateway interface, which is the interface between a
web server/request and some external program, so it has little to do with
the command line. However, to run PHP from the command line, you do need
to run it with the CGI version of PHP. The question did not specify 
needing to run PHP from the command line, but as a CGI by the webserver.

--
Kelly Hallman
// Ultrafancy

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



Re: [PHP] php as cgi script

2003-11-28 Thread Ivone Uribe
Thanks very much to all,

Ok, I understand now.. so I need to install php as a
cgi oppose to the module apache.

Do you have some good page that can help me to
configure and compile correctly the php as cgi?

Thanks in advance,
Kisses,
Ivone
--- Kelly Hallman [EMAIL PROTECTED] wrote:
 On Fri, 28 Nov 2003, Nicole Lallande wrote:
  Ivone --
  You are using a PERL invocation for php.  PHP
 scripts begin ?php
 
 #! is not a perl invocation, it is a Unix convention
 to tell the shell 
 which program should be used to process the file
 contents. If you are 
 running PHP as a CGI from a webserver, chances are
 good you do want
 #!/path/to/php as the first line, and ?php on the
 next line.
 
 I don't think you can pass a flag like
 #!/usr/bin/php -q though, and I
 doubt you would want to, since you still need to
 send the headers upon
 first output. If you did not send headers and just
 started outputting, the 
 server would return a 500 Internal Server Error.
 
 The directory you're running it from needs to have
 ExecCGI permission
 (i.e. /cgi-bin/) and assuming no special setup has
 been done, you probably
 want to start the file off with that #! line as
 mentioned above. Also, you
 may want to try naming the file .cgi
 
  the # sign is a comment in PERL - not in PHP.
 
 # also denotes a comment in PHP. Though #! is not a
 comment, per se.  
 (However, if you feed the file directly to some
 interpreter like perl, it
 does have the benefit of being ignored as a
 comment.)
 
  To run php as cgi you need to install the php cgi
 version (as opposed to
  the apache modular installation.)  That will allow
 you to run cgi
  scripts on the command line.
 
 CGI stands for common gateway interface, which is
 the interface between a
 web server/request and some external program, so it
 has little to do with
 the command line. However, to run PHP from the
 command line, you do need
 to run it with the CGI version of PHP. The
 question did not specify 
 needing to run PHP from the command line, but as a
 CGI by the webserver.
 
 --
 Kelly Hallman
 // Ultrafancy
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: [PHP] PHP vs CGI ???

2003-09-19 Thread Donald Tyler
PHP can be installed as either a CGI or an Apache module. There is
documentation on this in the PHP readme files.

Pretty much everything I read said that its always better to use the
Apache Module version. (apparently its much more stable and secure)

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 8:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP vs CGI ???

Hi!

I have a question.  Someone said that PHP is CGI, that kind of
turned my
head because PHP is not like that.  But I can see one thing, PHP can be
compiled as either a 'Shell-Scripting-Language', 'Webserver Component'
or
'Both'...   PHP would be a form of CGI if it is used as Shell Scripting
Language but if I compile Apache and have it create a PHP module then it
is
not a form of CGI.

Can anyone point this out or clarify this?  It would be very much be
appreciated.

Thanks,
 Scott F.

-- 
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



Re: [PHP] PHP vs CGI ???

2003-09-19 Thread Scott Fletcher
Looked through all of those 11 README files and they don't say much about
it.

Donald Tyler [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 PHP can be installed as either a CGI or an Apache module. There is
 documentation on this in the PHP readme files.

 Pretty much everything I read said that its always better to use the
 Apache Module version. (apparently its much more stable and secure)

 -Original Message-
 From: Scott Fletcher [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 19, 2003 8:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP vs CGI ???

 Hi!

 I have a question.  Someone said that PHP is CGI, that kind of
 turned my
 head because PHP is not like that.  But I can see one thing, PHP can be
 compiled as either a 'Shell-Scripting-Language', 'Webserver Component'
 or
 'Both'...   PHP would be a form of CGI if it is used as Shell Scripting
 Language but if I compile Apache and have it create a PHP module then it
 is
 not a form of CGI.

 Can anyone point this out or clarify this?  It would be very much be
 appreciated.

 Thanks,
  Scott F.

 -- 
 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



Re: [PHP] PHP vs CGI ???

2003-09-19 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]):
 Looked through all of those 11 README files and they don't say much about
 it.

Traditionally php had two modes:
  1. module
  2. cgi/commandline

the cgi/commandline could be used interchangably.

Now there are three modes:
  1. module
  2. cgi
  3. commandline (CLI)

some references:

http://php.net/manual/en/features.commandline.php
http://php.net/manual/en/install.commandline.php


 

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] PHP vs CGI ???

2003-09-19 Thread Robert Cummings
PHP comes in three major compilations: module, CGI, and CLI. The module
only works for web server (that I know of) and is the fastest way to
serve PHP based content from a web server. CGI can be run for either the
shell, or from the web server. There is a performance hit when run from
the web server since the binary must be loaded on every request;
however, many hosting companies offer the CGI solution because it gives
the developer complete control over PHP version, extensions, and
anything else related to the binary itself. CGI as I said can also be
used for shell scripts. It was originally the only way to use PHP for
shell scripting until the recent addition of the CLI compilation which
provides features and enhancements specifically targeted at shell
scripting in PHP.

HTH,
Rob.

On Fri, 2003-09-19 at 10:16, Scott Fletcher wrote:
 Looked through all of those 11 README files and they don't say much about
 it.
 

-- 
..
| InterJinn Application Framework -- http://www.interjin.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] PHP or CGI in C/C++

2003-08-01 Thread Decapode Azur
 I would expect compiled C/C++ to be faster as there is no need for
 the code to be interperated and compiled on each request.


Is it possible to compile PHP to improve the speed execution ?



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



Re: [PHP] PHP or CGI in C/C++

2003-08-01 Thread John Manko
i did a quick google, and found the following.  hope it helps

http://phpcomplete.com/articles.php?sec=readArticleid=306
http://www.php-accelerator.co.uk
plus, there is something called PHP bcompiler (byte compiler).

I dont know the details of any of these, but should help.  maybe others 
can expand on the details.

- John Manko

Decapode Azur wrote:

I would expect compiled C/C++ to be faster as there is no need for
the code to be interperated and compiled on each request.
   



Is it possible to compile PHP to improve the speed execution ?



 



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


Re: [PHP] PHP or CGI in C/C++

2003-08-01 Thread desa15

You can install Zend Optimizer from www.zend.com is free but with comercial
license.

Perform some optimizations in your code to not compile the same code in
each request.


Un saludo, Danny


   

  John Manko   

  [EMAIL PROTECTED]  Para: Decapode Azur [EMAIL 
PROTECTED]  
  cc: [EMAIL PROTECTED]   

   Asunto:   Re: [PHP] PHP or CGI in C/C++ 

  01/08/2003 08:45 

   

   





i did a quick google, and found the following.  hope it helps

http://phpcomplete.com/articles.php?sec=readArticleid=306
http://www.php-accelerator.co.uk

plus, there is something called PHP bcompiler (byte compiler).

I dont know the details of any of these, but should help.  maybe others
can expand on the details.

- John Manko


Decapode Azur wrote:

I would expect compiled C/C++ to be faster as there is no need for
the code to be interperated and compiled on each request.




Is it possible to compile PHP to improve the speed execution ?








--
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



Re: [PHP] PHP or CGI in C/C++

2003-07-31 Thread David Nicholson
Hello,

This is a reply to an e-mail that you wrote on Thu, 31 Jul 2003 at
13:38, lines prefixed by '' were originally written by you.
 Greetinx,
 I'm a newbie and wondering which PHP script or CGI in C/C++
generally
 can
 run/respond faster via http from the same server doing the same
tasks.
 I appreciate your comments in advance.

I would expect compiled C/C++ to be faster as there is no need for
the code to be interperated and compiled on each request.  You will
need to do your own benchmarking to see if the difference bothers you
though.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirely in PHP)

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



Re: [PHP] PHP or CGI in C/C++

2003-07-31 Thread Jeff Harris
On Jul 31, 2003, David Nicholson claimed that:

|Hello,
|
|This is a reply to an e-mail that you wrote on Thu, 31 Jul 2003 at
|13:38, lines prefixed by '' were originally written by you.
| Greetinx,
| I'm a newbie and wondering which PHP script or CGI in C/C++
|generally
| can
| run/respond faster via http from the same server doing the same
|tasks.
| I appreciate your comments in advance.
|
|I would expect compiled C/C++ to be faster as there is no need for
|the code to be interperated and compiled on each request.  You will
|need to do your own benchmarking to see if the difference bothers you
|though.
|David.
|--

Usually, though, the speed difference you pick up or lose from one
instruction set is miniscule compared to the time it takes for the html to
speed across the Internet. Asking about speed of a script on one language
against another is a moot point. If you ask is it faster to save a cookie
on the user's machine or save it in a database, you'd get an answer that
would probably help you design a faster site.

If you have a site getting enough hits per second to actually make a
difference, then there are some other speed considerations before getting
to the output. In this case, you'd have to ask yourself if the speed
picked up on the output is worth the time difference in the development
cycle.

Jeff
-- 
Registered Linux user #304026.
lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



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



Re: [PHP] PHP or CGI in C/C++

2003-07-31 Thread Joel Rees
 Greetinx,

Greetinx to you to.

 I'm a newbie and wondering which PHP script or CGI in C/C++ generally can
 run/respond faster via http from the same server doing the same tasks.

CGI is inherently slow. The way I understand it, php as CGI will
probably be pretty much the same speed as C/C++ as CGI. PHP with mod_php
should be faster than C/C++ as CGI. 

Compiling a server module is a complicated business, so you would
probably want to avoid trying to compile a C/C++ webapp as a server
module unless you have lots of experience (and I doubt you would be
asking this question if you have that much experience.

A book you might find useful in this context is Chris Radcliff's Perl
for the Web. (Perl is one of PHP's grandpappies, so much of the
discussion will apply to PHP.)

 I appreciate your comments in advance.

I made no comments in advance, but you're welcome anyway. ;-P

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


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



Re: [PHP] PHP vs. CGI

2003-03-05 Thread Leif K-Brooks
CGI meaning perl?

SpyProductions Support Team wrote:

Does PHP use less system resources than CGI on a server?

I have a bulletin board which is incredibly active, but there is a PHP
sister to it.
Thanks,

-Mike



 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


RE: [PHP] PHP vs. CGI

2003-03-05 Thread Mike At Spy

Sorry, yes.  :)

-Mike


 -Original Message-
 From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 4:45 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP vs. CGI
 
 
 CGI meaning perl?
 
 SpyProductions Support Team wrote:
 
 Does PHP use less system resources than CGI on a server?
 
 I have a bulletin board which is incredibly active, but there is a PHP
 sister to it.
 
 Thanks,
 
 -Mike
 
 
 
   
 
 
 -- 
 The above message is encrypted with double rot13 encoding.  Any 
 unauthorized attempt to decrypt it will be prosecuted to the full 
 extent of the law.
 
 
 
 
 -- 
 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



Re: [PHP] PHP vs. CGI

2003-03-05 Thread David T-G
Mike --

...and then SpyProductions Support Team said...
% 
% Does PHP use less system resources than CGI on a server?

Now that we know that by 'CGI' you mean 'perl' we're at least getting
*somewhere*.  We don't really know what you mean, though, so I''ll see if
I can fill out the truth table for you.

In general, a mod_* version will be faster and lighter than a CGI version
(yes, you can have PHP as a CGI as well).  In general, php and perl are
about on the same footing; both can be heavyweights but certainly don't
have to be.

 perlphp
   +--+--+
   |approx|approx|
   | some amount  | some amount  |
  mod  | of resources | of resources |
   |   X  |   Y  |
   +--+--+
   |  something   |  something   |
   |more  |more  |
  CGI  |than  |than  |
   |  X   |  Y   |
   +--+--+

You'll probably find that X and Y are about the same.  Your choice of
column doesn't matter one way or another.  Which row you use is the
kicker.


% 
% I have a bulletin board which is incredibly active, but there is a PHP
% sister to it.

The real question becomes how are you running the perl version and,
figuring that's as a CGI, would you rather switch languages or just
modules?.


% 
% Thanks,
% 
% -Mike


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] PHP vs. CGI

2003-03-05 Thread John Taylor-Johnston
Three advantages I like:
1- no more cgiwrap.
2- thus I can work in any directory and am not bound to cgi-bin
3- Sheer ease of coding. A lot easier to learn, it's open-source and newsgroups are 
more helpful. Perl groups are less helpful, programmer centred and not newbie-friendly.
Just my 2ยข


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



Re: [PHP] PHP vs. CGI

2003-03-05 Thread michael kimsal
John Taylor-Johnston wrote:
Three advantages I like:
1- no more cgiwrap.
2- thus I can work in any directory and am not bound to cgi-bin
'being bound to cgi-bin' is a function of how the server is set up, not
'cgi' itself.  I've worked on systems where anything ending in .cgi
was treated as a cgi script, regardless of directory location.


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


RE: [PHP] php and cgi

2002-04-03 Thread Boris Wong

thanks all for the response. i tried various methods but still have no luck.

using virtual:

   ?php
$curDir = dirname( getenv( SCRIPT_FILENAME ) );
virtual( myscript.cgi );
chdir( $curDir );
   ?

i got the following warning:

Warning: Unable to include 'myscript.cgi' - request execution failed in
/[dir-path]/index.php on line 71

any more clues?

thanks!

/bw

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 10:46 PM
To: Boris Wong
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] php and cgi


On Tue, 2 Apr 2002, Boris Wong wrote:

 i was wondering if anyone knows how i can execute a cgi script
 (with -rwxrwxrwx mode) written in perl from within php?

 i tried

 ?php
 include ('mycgi.cgi');
 ?

This worked for me:

?php

virtual(/cgi-bin/progname);

?

ALthough I did use absolute paths in the cgi script.

Regards,


Terry.

[EMAIL PROTECTED]


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




RE: [PHP] php and cgi

2002-04-02 Thread Martin Towell

try exec() or back-ticks ``
see how that goes

Martin


-Original Message-
From: Boris Wong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php and cgi


hi,

i was wondering if anyone knows how i can execute a cgi script
(with -rwxrwxrwx mode) written in perl from within php?

i tried

?php
include ('mycgi.cgi');
?

but the content of the cgi file is displayed instead of executing it.

?php
system ('mycgi.cgi');
?

didn't help as well.

i also tried calling the url where this cgi is located (which is in the same
file structure my php is located), like this:

?php
include ('http://www.myurl.org/mycgi.cgi');
?

but the browse keeps on loading and nothing shows up.

thanks in advance.

/bw


-- 
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




Re: [PHP] php and cgi

2002-04-02 Thread Terry Carney

On Tue, 2 Apr 2002, Boris Wong wrote:

 i was wondering if anyone knows how i can execute a cgi script
 (with -rwxrwxrwx mode) written in perl from within php?

 i tried

 ?php
 include ('mycgi.cgi');
 ?

This worked for me:

?php

virtual(/cgi-bin/progname);

?

ALthough I did use absolute paths in the cgi script.

Regards,


Terry.

[EMAIL PROTECTED]


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




Re: [PHP] PHP and CGI

2002-02-12 Thread hugh danaher

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




RE: [PHP] PHP and CGI

2002-02-12 Thread SpyProductions Support Team


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




Re: [PHP] PHP and CGI

2002-02-12 Thread hugh danaher

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




RE: [PHP] PHP and CGI

2002-02-12 Thread SpyProductions Support Team


I don't know.  I was thinking about breaking it off and just doing an
include like in html.  I'll try it out by tomorrow morning unless someone
else has a definitive solution.  :)

Thanks for the suggestion!

-Mike


 -Original Message-
 From: hugh danaher [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 12, 2002 3: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




RE: [PHP] PHP and CGI

2002-02-12 Thread Darren Gamble

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




RE: [PHP] PHP and CGI

2002-02-12 Thread Michael R @ Spy


I made some time to test, and no dice.  The comment doesn't seem to matter.
:(

Thanks,

-Mike


 -Original Message-
 From: Darren Gamble [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 12, 2002 3:26 PM
 To: 'hugh danaher'; [EMAIL PROTECTED]; php
 Subject: RE: [PHP] PHP and CGI


 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





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




RE: [PHP] PHP and CGI

2002-02-12 Thread Darren Gamble

Good day.

That's not a comment.  The #! at the start tells the shell to execute that
as the interpreter for the script.

Are you sure that you typed it in correctly?

Did you install the PHP standalone application?

Is it installed in that location?

Did you set the file as executable?

Did you try to run the script?

What error did you receive?


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


-Original Message-
From: Michael R @ Spy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 2:28 PM
To: Darren Gamble; php
Subject: RE: [PHP] PHP and CGI



I made some time to test, and no dice.  The comment doesn't seem to matter.
:(

Thanks,

-Mike


 -Original Message-
 From: Darren Gamble [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 12, 2002 3:26 PM
 To: 'hugh danaher'; [EMAIL PROTECTED]; php
 Subject: RE: [PHP] PHP and CGI


 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




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




RE: [PHP] PHP and CGI

2002-02-12 Thread Job Miller


You can not include php as the output of a perl cgi.

the server processes the cgi request, and spits out
its results.  if the result is php code, it isn't
reprocessed by the server.

javascript can be printed out, because it is the
browser that processes js.  php is not processed by
the browser.

in the cgi, use:

$output=`/usr/local/bin/php script.php';

print $output;

or something like that, where you call php directly
and than show the results of the call to php.

I don't recommend this, just think it might be a
temporary solution until you come up with another
approach.

Job
--- Michael R @ Spy [EMAIL PROTECTED]
wrote:
 
 I made some time to test, and no dice.  The comment
 doesn't seem to matter.
 :(
 
 Thanks,
 
 -Mike
 
 
  -Original Message-
  From: Darren Gamble [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 12, 2002 3:26 PM
  To: 'hugh danaher'; [EMAIL PROTECTED];
 php
  Subject: RE: [PHP] PHP and CGI
 
 
  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
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: [PHP] PHP vs CGI Search ?

2001-08-24 Thread Thomas Deliduka

On 8/24/2001 10:54 AM this was written:

 I know this question has been asked many times before so I am not asking
 again :-) What I am asking is how I can search the forum, is there a web
 based system that I can use to search???

Well, there's a Newgroup:

news.php.net

There is an archive on this list but I forget where it is. Perhaps the
support page on www.php.net will give it.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as CGI

2001-05-16 Thread scott [gts]

you need to:

./configure [whatever options]
make
make test
make install (as root)

then you need to edit Apache httpd.conf
appropriately and restart the daemon.

then, it should work

 -Original Message-
 From: Beech Rintoul [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 2:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php as CGI
 
 
 Hi,
 
 I'm new to pgp and I'm trying to configure it as an Apache cgi. What do I 
 need to put into the httpd.conf to enable it? I tried the example from the 
 manual, but it doesn't work. Also will php3 scripts work in php4?
 I'm using php4 and apache-1.3.19 with mysql.
 Any assistance would be appreciated.
 
 Beech
 -- 
 ---
  Beech Rintoul - IT Manager - Instructor - [EMAIL PROTECTED]
 /\   ASCII Ribbon Campaign  | Anchorage Gospel Rescue Mission
 \ / - NO HTML/RTF in e-mail  | P.O. Box 230510
  X  - NO Word docs in e-mail | Anchorage, AK 99523-0510
 / \ -
 
 
 
 
 
 
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php like cgi

2001-04-18 Thread Alexander Skwar

So sprach Dddogbruce (@home.com) am Mon, Apr 16, 2001 at 03:12:25PM -0700:
 ?
 $greeting = "Hello!"
 echo "$greeting"
 ?

Since I also have this problem, I tried your suggestion, and it didn't work. 
However, I expected this, because apache doesn't know which interpreter to
use to exec this script.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die gnstige Art an Linux Distributionen zu kommen
Uptime: 1 day 10 hours 24 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php like cgi

2001-04-17 Thread Christian Reiniger

On Monday 16 April 2001 22:40, you wrote:
 Hi..

   I'm tring to use a php-script like cgi, but the only thing i got is
 "Internal Server Error..."

  That's my test-script..
 ---
 #!/bin/php -q

Are you 100% sure that it's /bin/php ? That's a pretty unusual location 
for PHP to be installed in. /usr/bin/php or /usr/local/bin/php are the 
common ones



 ?php
  echo "Content-type: text/html\n\n";

unneccessary if you leave out the -q

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php like cgi

2001-04-17 Thread Ulysses Almeida


On Tue, 17 Apr 2001, Christian Reiniger wrote:
 Are you 100% sure that it's /bin/php ? That's a pretty unusual location 
 for PHP to be installed in. /usr/bin/php or /usr/local/bin/php are the 
 common ones

Yeah, my php interpreter is on /usr/bin/php, i just made a symlink on
/bin...,  but it's not the  problem, i tried with /usr/bin/php too!

 
 
 unneccessary if you leave out the -q
 
  I note this, i was just in test, 'cos without "q" dos not work too...

  I can execute the script on command line, and i get the expected output, 
but when i request it on my browser i get the Internal Server Error...

.~.  Ulysses Almeida
   / V \  [EMAIL PROTECTED]
 / (   ) \  Seja livre, use GNU/Linux!
   ^^-^^
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php like cgi

2001-04-16 Thread Dddogbruce \(@home.com\)

?
$greeting = "Hello!"
echo "$greeting"
?

g


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP/Perl/CGI Question

2001-03-20 Thread Clayton Dukes

I was afraid you were going to say that...
Anyone care to show me how to write that?

Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net

- Original Message -
From: "Andrew Rush" [EMAIL PROTECTED]
To: "Clayton Dukes" [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 2:33 PM
Subject: Re: [PHP] PHP/Perl/CGI Question


 on 3/20/01 02:21 PM, [EMAIL PROTECTED] splat open and thusly melted:

  What am I doing wrong? Why is it printing the php tags instead of
executing
  them?

 because the output of a CGI cannot then be run through the PHP parser. you
 could possibly write the PHP out to a new file (with the proper extension
 for the parser) and then send a location header() that sends the user to
 execute that page. i've never done this, so i can't vouch for it's
 workability, but there's nothing wrong with the idea in concept- at least
so
 far as i can see

 --
 :: Andrew Rush :: Lead Systems Developer :: MaineToday.com ::
 **
 "Crippled but free, blind all the time, i was learning to see"

 - J. Garcia / R. Hunter
 **

 The  views expressed herein are not necessarily those of my employer, but
 they let me have them anyway.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP as CGI

2001-02-19 Thread Richard Lynch

Hi, I've compiled PHP as CGI in /usr/local/php/ . Does anyone know what I
can write in httpd.conf file?

Tanks

I think it's:

AddType application/x-httpd-php .php
Action application/x-httpd-php /usr/local/php

A) I'm not sure you need the "." on ".php"
B) You can add more extensions: ...x-httpd-php .php .php3 .htm .html .phtml
C) Is there a php binary in a php directory? You'd want: /usr/local/php/php
   [Or did you just type that trailing / for fun?]

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP as CGI

2001-02-19 Thread Hrishi


 AddType application/x-httpd-php .php
 Action application/x-httpd-php /usr/local/php

 A) I'm not sure you need the "." on ".php"
 

i've tried both with and without the '.' , but the server always responds :

---
Not Found

The requested URL /usr/bin/php4/test.php was not found on this server.

Apache/1.3.3 Server at www.website.com Port 80

---

the installed CGI is php 4.0.3pl1,
it runs fine from the command line.

any ideas?

thanks,
Hrishi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP as CGI

2001-02-19 Thread ..s.c.o.t.t..

i had a very similar problem when i first setup PHP/Apache
on my linux box... i forgot to add a line to my httpd.conf
and got all sorts of "Cant find this" "Cant find that" type
of errors

my mistake was that i did not set ScriptAlias and Action
correctly, and thus apache was having all sorts of
problems executing my scripts becuase i put the physical
path to php after my Action directive, rather than alias it
via a ScriptAlias directive..  (silly me thought i could do
away with the ScriptAlias and just point to it directly)

make sure you have both of these (or something similar)
in your httpd.conf file:

ScriptAlias /php/ "/physical/path/to/php"
Action application/x-httpd-php "/php/php"

(and make sure to "killall -HUP httpd" after any changes to
the conf files, although you probably knew that already... :)

hope it helps.


 -Original Message-
 From: Hrishi [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 19, 2001 03:31
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP as CGI
 
 
 
  AddType application/x-httpd-php .php
  Action application/x-httpd-php /usr/local/php
 
  A) I'm not sure you need the "." on ".php"
  
 
 i've tried both with and without the '.' , but the server always responds :
 
 ---
 Not Found
 
 The requested URL /usr/bin/php4/test.php was not found on this server.
 
 Apache/1.3.3 Server at www.website.com Port 80
 
 ---
 
 the installed CGI is php 4.0.3pl1,
 it runs fine from the command line.
 
 any ideas?
 
 thanks,
 Hrishi
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]