On 12 October 2011 09:19, saeed ahmed saeed@gmail.com wrote:
greeting all,
As far as I know, there are different ways to write a PHP application:
- CGI, ie. the usual way : some PHP code in web pages, and the PHP
interpreter is loaded each time a PHP page is called
- FastCGI :
Nice write up Richard
On Oct 12, 2011, at 7:06, Richard Quadling rquadl...@gmail.com wrote:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thodoris napsal(a):
Y
In cgi i can use perl ,c etc
suppose i use perl
now how efficiency differs?
How cgi written in perl and php is differ in working in context of web
service?
other difference?.
but their differ.
On Thu, Feb 5, 2009 at 6:45 PM, Jay Blanchard
jblanch...@pocket.com
[snip]
can anybody tell me the benefits of php over cgi or vice versa?
i need to compare both?
[/snip]
CGI is a gateway to be used by languages
PHP is a language
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Y
In cgi i can use perl ,c etc
suppose i use perl
now how efficiency differs?
How cgi written in perl and php is differ in working in context of web
service?
other difference?.
but their differ.
On Thu, Feb 5, 2009 at 6:45 PM, Jay Blanchard jblanch...@pocket.com wrote:
[snip]
can anybody
Y
In cgi i can use perl ,c etc
suppose i use perl
now how efficiency differs?
How cgi written in perl and php is differ in working in context of web
service?
other difference?.
but their differ.
On Thu, Feb 5, 2009 at 6:45 PM, Jay Blanchard jblanch...@pocket.com wrote:
[snip]
can
Thodoris napsal(a):
Y
In cgi i can use perl ,c etc
suppose i use perl
now how efficiency differs?
How cgi written in perl and php is differ in working in context of web
service?
other difference?.
but their differ.
On Thu, Feb 5, 2009 at 6:45 PM, Jay Blanchard jblanch...@pocket.com
Thanx for your reply Thodoris
i really new to this.
i will follow your suggestions.
and i admit tht my query was silly its b'zoz i know less .
but
wht the hell reply by the Martin Zvarík. has he done all this in womb.
MZ u also need to think before commenting such.
On Thu, Feb
Max Schwanekamp wrote:
Can anyone offer or point me to a summary of differences between running
php as an Apache module vs as a cgi executable? Specifically, I'm
wanting to upgrade our servers to php 5 but there is one crucial
third-party app we're using that still needs php 4, so I'm hoping
El Bekko wrote:
Max Schwanekamp wrote:
Can anyone offer or point me to a summary of differences between
running php as an Apache module vs as a cgi executable? Specifically,
I'm wanting to upgrade our servers to php 5 but there is one crucial
third-party app we're using that still needs php
Al wrote:
I've got a php script that checks certain file permissions and if not
OK for writing, chmods as required.
I can use ftp_site(); but, prefer not to because the code is not
readily transportable. Requires ftp login.
I'd like a simple cgi file that can be called by my script as
Mikey wrote:
Al wrote:
I've got a php script that checks certain file permissions and if not
OK for writing, chmods as required.
I can use ftp_site(); but, prefer not to because the code is not
readily transportable. Requires ftp login.
I'd like a simple cgi file that can be called by my
On Tue, 14 Dec 2004 15:09:21 -0600, Sandy Keathley
[EMAIL PROTECTED] wrote:
We have a Redhat server, which only allows PHP 4.3.2 to be
installed by RPM. I manually compiled and installed 4.3.9 using
the configure params as the RPM install.
Did you remove the PHP rpm(s) first?
It compiled
Sandy Keathley wrote:
We have a Redhat server, which only allows PHP 4.3.2 to be
installed by RPM. I manually compiled and installed 4.3.9 using
the configure params as the RPM install. It compiled the CGI
version, which seems to run, but Apache (2.0) doesn't recognize it.
phpinfo() still
I recently had this error. Turns out that my php binary was the
CLI(command line interface only) version, not the cgi version and so it
wasn't sending the headers before parsing the php file. You should look
at getting the right php binary.
Also, if you have a question, you don't make 2 seperate
: Wednesday, January 28, 2004 4:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cgi error --- please help
I recently had this error. Turns out that my php binary was the
CLI(command line interface only) version, not the cgi version
and so it
wasn't sending the headers before parsing the php
On Tue, 27 Jan 2004 18:41:39 -0800
Dale Hersh [EMAIL PROTECTED] wrote:
CGI Error
The specified CGI application misbehaved by not returning a
complete set of HTTP headers.
I am getting this error and I can't figure out what is causing
the problem. If I hit refresh on the broswer, the page
Miroslav I. wrote:
Hi, people
#The problem:
There is an error message that stops proper loading of one iFRAME, I
couldn't understand what is the problem.
Complete error message issued:
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers
* Thus wrote nabil ([EMAIL PROTECTED]):
Why this happen with me with IIS
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
check your IIS logs.
Curt
--
I used to think I was indecisive, but now I'm not so sure.
nabil wrote:
Why this happen with me with IIS
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Although it's not a bug, read this:
http://bugs.php.net/bug.php?id=12061
--
---John Holmes...
Amazon Wishlist:
imran wrote:
CGI Timeout
The specified CGI application exceeded the allowed time for processing.
The server has deleted the process.
does it mean that I have to use set_time_limit so the script doesn't time out ? I don't really understand why I should do that.
You may be reaching an IIS imposed
Well I sorted out the permissions on that directory structure, and the web
based cgi performed as the command line one did, I havent had too long to
find out if any weird things are going to start happening with the mail
apps, but I'm hopeful that this was the solution...
Thanks for all the help
Okies, FINALLY I think I have the reason (though not the solution as yet)
Marco, you were spot on, which I hadn't pursued properly, only looking at
the immediate parent directory permissions. In fact the whole ~vpopmail
structure down to the individual users directory has a VERY restrictive set
Just a quick addition, both the submit/link were very basic, they both
worked like this
$location = /cgi-bin/getmailtest.cgi;
// $location = getmail.php;
echo $locationbr;
print(a href=$locationClick here to test the cgi/abr\n);
print(form name=form1 method=post action=$location);
print(press
Hi again all
Just a bit more info, trying to track some more things down.
I made a few changes, changed getmail so that it would allow the getmailrc
file to be group writable, made a few changes to the user/group structure
(including making apache a member of a specific new group, and then
I think you might be unable to access documents outside the root if
you're in safe mode.
Just out of curiosity--have you tried su-ing to the Apache user and
executing your script as that user?
On Sun, 2002-10-13 at 21:36, David Cook wrote:
Hi again all
Just a bit more info, trying to track
hmmm safe mode is disabled - for the apache module version
from phpinfo()
safe_mode Off Off
Just out of curiosity--have you tried su-ing to the Apache user and
executing your script as that user?
yep, same result (although I had to change the apache user for a few minutes
so it had a shell..
Ok, that's a big step forward then. It's possible that your user does
not have access to the directory tree where the file resides? Have you
tried listing that directory and or opening the file (for example with
cat) while using that file? If you can narrow it down to a permission
problem (and,
I got the problem! php.ini is not saved in c:\winnt by default! Make sure
your php.ini is in c:\winnt and NOT in your profile as saved by the
installer!
Mindhunter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Yes I have set cgi.force_redirect=0 in my
Hey,
I tried to open a php file on my server that dosn't exist and php gave me a
404 error.
I am running w2k, apache, php 4.1.2 as a module.
Try having them run the php as a mod. with apache (if possible).
-Donald
www.magentica.com
--
PHP General Mailing List (http://www.php.net/)
To
in index.php, you can do:
?
if (action==cgi) header(Location: cgi-bin/cgiscripts/.$scripts);
?
or
?
if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`;
?
Op dinsdag 26 februari 2002 15:30, schreef u:
Hey
I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory
How can i
Maybe I'm misunderstanding the question, but you should be able to make an alias in
your httpd.conf file that points /cgi-bin/cgiscripts to /usr/lib/xxx/cgi-bin/ . Then
in your scripts variable you would need something like this:
scripts=/cgi-bin/cgiscripts/xxx.cgi Someone please correct me
Please note that plain this:
or
?
if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`;
?
is not a good idea, because it allows a visitor to run arbitrary
commands on your server.
bvr.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
bvr wrote:
Please note that plain this:
or
?
if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`;
?
is not a good idea, because it allows a visitor to run arbitrary
commands on your server.
bvr.
If you still want to use that method have a look at these two functions
which can be
Subject: Re: [PHP] CGI
bvr wrote:
Please note that plain this:
or
?
if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`;
?
is not a good idea, because it allows a visitor to run arbitrary
commands on your server.
bvr.
If you still want to use that method have a look at these two
Well, okay. It was an example.
Then do:
if (action==cgi file_exists($script))
Op dinsdag 26 februari 2002 16:00, schreef bvr:
Please note that plain this:
or
?
if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`;
?
is not a good idea, because it allows a visitor to run arbitrary
bvr wrote:
Still this wouldn't prevent a visitor from passing something like :
../../../../bin/cat /etc/passwd
bvr.
Erk good point - I should have mentioned that it's a very good idea to
run basename() on user input as well as this will knock off any
directory paths they may have attempted
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 04. 2002 21:26]:
Is there any work around for using HTTP Authentication and PHP installed as
CGI? I know how to make the detection, I'm hoping (probably in vain) that
there is some way to make the two work. Thanks.
AFAIK, no, unless you use
Thanks :). I thought I had figured out a way to determine if it was a CGI
or module. But it didn't work. Is there a reliable way?
--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/
Brian Clark [EMAIL
Just for curiosity, can HTTP Authentication be disabled in any other way, if
PHP is installed as a module? In other words, is there any other reason why
the authentication might not work (under *nix), not IIS?
--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 00:22]:
Thanks :). I thought I had figured out a way to determine if it was a CGI
or module. But it didn't work. Is there a reliable way?
Yes, stick ?php phpinfo(); ? into a .php file and load it into your
browser. Beside Server API it'll
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 00:27]:
Just for curiosity, can HTTP Authentication be disabled in any other way, if
PHP is installed as a module? In other words, is there any other reason why
the authentication might not work (under *nix), not IIS?
If this is Apache, HTTP
But is there a PHP variable that holds the Server API?
--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/
Brian Clark [EMAIL PROTECTED] wrote in message
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 01:36]:
But is there a PHP variable that holds the Server API?
How about a function that returns a string?
php_sapi_name()
PHP 4.x
--
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB
Hi,
You're right Dave
But nobody had already used PHP with CGI and with Apache ???
I searched on the net, but I've found no documentation on this problem
Bye
Philippe
Dave Goodrich writes:
Nope it fails when he removes the line. It fails on me as well, I tried
it. Also note I did say
Hi,
Thanks Stefan for your answer
First, I'll explain why I want to use php in cgi
I'ts a simple reason, some users want to use php without safemode (which is
required with Apache due to safety problems). So I want to use php in cgi
mode with suexec.
I've tryed your solution, it works in
Hi,
My file end in .cgi, it's in 777
It isn't handled by Apache because it don't work if I don't put
#!/usr/local/bin/php
It's in cgi-bin directory, and yes others cgi languages work well (I've
already tested perl)
Philippe
Curt A. Gilman writes:
Philippe,
Does the file name end in
Hi,
A small update, the file is in 755
(otherwise Suexec don't let the script work)
Philippe
Philippe writes:
Hi,
My file end in .cgi, it's in 777
It isn't handled by Apache because it don't work if I don't put
#!/usr/local/bin/php
It's in cgi-bin directory, and yes others cgi
Philippe,
Does the file name end in .php or something similar? If so, it is probably
being handled by the Apache PHP module, since you have it installed, and not
by the CGI. You could try changing the name to .cgi or something else and
see what happens.
Also, have you remembered to put the file
On Fri, 5 Oct 2001 15:15, James Peter Gregory wrote:
hi all,
I've been asked to do some work on some servers where php can only run
as cgi. Unfortunately it seems that php has a bug which means that
#!/usr/local/bin/php
gets printed out at the top of each page if I do this.
Are there
On Fri, 5 Oct 2001, David Robley wrote:
On Fri, 5 Oct 2001 15:15, James Peter Gregory wrote:
hi all,
I've been asked to do some work on some servers where php can only run
as cgi. Unfortunately it seems that php has a bug which means that
#!/usr/local/bin/php
gets printed out
If you are getting #!/usr/local/bin/php output to the screen, then the
cgi scripts do no need the line in them to execute properly. Do you have
access to the scripts? Try removing this line altogether. What happens?
- Devon
In article
[EMAIL PROTECTED],
[EMAIL PROTECTED] (James Peter
I haven't had to use IIS5 yet, but you might want to check in the IIS
setting for a max cgi execution time.
- Erik
-Original Message-
From: Raymond Siow [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] cgi timeout
Hi:
I am
ummm I tried look at the IIS setting... but couldn't find anything related
to CGI execution time do you know how to change that if I were to do it?
Ray
Erik H. Mathy wrote:
I haven't had to use IIS5 yet, but you might want to check in the IIS
setting for a max cgi execution time.
-
Seems like I've just found it if you look at how to config cgi setting in the
IIS help file... it will tell you about it...
yours,
Ray
Raymond Siow wrote:
ummm I tried look at the IIS setting... but couldn't find anything related
to CGI execution time do you know how to change
Is there any way to use the --with-apxs and make the cgi version in the
make?
Nope, you need to do two separate builds. One using --with-apxs and one
without.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On Thursday 09 August 2001 17:21, [EMAIL PROTECTED] wrote:
After install PHP when I try to open in a URL the address:
http://casa/IISSamples/Default/exemplo.php
I receive the following error:
Error 403 of HTTP
403.1 Forbided: forbided execution access
First experiment:
Put a file called
On Thursday 09 August 2001 07:47, karthik wrote:
Hi,
I am running PHP 4.06 on Windows 2000 with IIS 5. I am running PHP in CGI
mode.
I seem to be getting CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
: Phil Driscoll [EMAIL PROTECTED]
To: karthik [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 1:50 PM
Subject: Re: [PHP] CGI error
On Thursday 09 August 2001 07:47, karthik wrote:
Hi,
I am running PHP 4.06 on Windows 2000 with IIS 5. I am running PHP in
CGI
mode.
I
On Thursday 09 August 2001 09:46, karthik wrote:
Hi,
In install.txt there seems to be settings on how to install under various
web servers.
Well what about this bit:
You have installed PHP, but when try to access a php script file via your
browser, you get the error:
cgi error:
i tend to get this error when the page being called doesn't exist.
check the link and the file name
Steve
Phil Driscoll [EMAIL PROTECTED] wrote in message
01080909463405.04245@linux">news:01080909463405.04245@linux...
On Thursday 09 August 2001 09:46, karthik wrote:
Hi,
In install.txt
Along with help from Josh Hoover, (*thanks again Josh*), I was able to find
a fix for this problem. There must be some sort of bug with IIS and PHP.
Everything was set up correctly and I was pointing to the correct the
correct path for the cgi .exe file. However it didn't start working for me
On Tuesday 24 July 2001 20:44, Phil Spitler wrote:
There must be some sort of bug with IIS and PHP.
Everything was set up correctly and I was pointing to the correct the
correct path for the cgi .exe file. However it didn't start working for me
until checking Check that file exists in the
.
Phil
-Original Message-
From: Phil Driscoll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 4:06 PM
To: Phil Spitler; [EMAIL PROTECTED]
Subject: Re: [PHP] CGI error
On Tuesday 24 July 2001 20:44, Phil Spitler wrote:
There must be some sort of bug with IIS and PHP
On Tuesday 24 July 2001 21:34, Phil Spitler wrote:
I hear what you are saying. I just don't understand why if php.exe is
where I was telling it and permissions were all set up correctly, why it
started working after that was checked. I did nothing else but check it
and if I understand what
We've got the same problem.
Did you find a resolution?
Thanks, MarkMirco
seth [EMAIL PROTECTED] wrote in message
9ej8pq$i1n$[EMAIL PROTECTED]">news:9ej8pq$i1n$[EMAIL PROTECTED]...
Hi,
I'm really new to PHP and i'm not too smart!..., I pulled some from code
out of scripts.com for processing
On Tuesday 17 April 2001 07:10, you wrote:
RE: PHP as a CGI or Module
This has been discussed some but I am interested to see if one is more
popular then the other. My experience has been most people run PHP as
a apache module but is there a specific benefit to run it as a cgi
program?
The only reason I am aware of to use PHP as a CGI is on Windows. Both apache
and the php module for windows apache is considered "beta quality", so most
people don't want to install beta software on their production machine.
But just on my local system I've never had a problem with PHP as CGI. I
If someone wants to run PHP scripts for other purposes then dynamic web
content, say to act like shell scripts, then you'll want to have it be
compiled as a CGI...so, its more than just the windows thing...
-jack
Plutarck wrote:
The only reason I am aware of to use PHP as a CGI is on
Previously, Franklin Hays said:
RE: PHP as a CGI or Module
Generally people will almost always use the module because it's faster and
simpler, and gives you some IPC kind of advantages that the CGI doesn't
have ("internal" cross-talk with Apache).
Reasons to use the CGI:
1. Windows servers
For anyone interested. I found that the Zend Optimizer is the culprit,
disabling removes the output.
I'm currently working on removing the optimizer for my CGI version but
keeping it for my Apache install. I didn't want to maintain two .ini files
but I guess I have to.
On 4/4/2001 4:56 PM
This has been true since CGI began in the NSCA days. Any program that can
take input from STDIN and output to STDOUT works as a CGI program.
Languages I have actually used in the CGI bin include, C, C++, AWK, Sh, PHP
and of course Perl.
The C program simply has to deal with the CGI variables
Cool, Hrishi.
Can you make it work if you use a different url? For example, for SSL
connections like:
https://www.secure-website.net/~mydomain
I'm thinking of using something like this:
$spos=strpos($SCRIPT_FILENAME, "/public_html"); // or whatever the name of the
public root dir
$firstpath
hey,
don't go bald yet :)
my web host (communitech.net) has the same setup... is that where you're
hosted ?
i have a script called 'php4.cgi' in my /cgi-bin which contains:
#!/bin/sh
#echo -e "Content-type: text/plain\n\n";
#set
Compensate For A Lack Of Skill By Doubling Your Efforts, There's No
End To What You Can't Do.
- Original Message -
From: "Hrishi" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, February 21, 2001 4:01 AM
Subject: Re: [PHP] CGI BIN PHP
hey,
don't go bald
I've read through the archives and still must be missing something. I
need to execute a cgi script from php. This seems fairly trivial, but I
can't get it to work.
the cgi script is clean -- executes from the command line without issue
and is 755
from php the follwing is used:
Do you know what PHP is? Your question sounds like "How does MS SQL Server
compare to a relational database".
Anyway, you can do almost everything with PHP, and that includes handling
flat files. No problem.
""phpLover"" [EMAIL PROTECTED] a écrit dans le message news:
95hl5r$1su$[EMAIL
nt: Sunday, February 04, 2001 12:34 AM
Subject: Re: [PHP] CGI vs PHP
Do you know what PHP is? Your question sounds like "How does MS SQL Server
compare to a relational database".
Anyway, you can do almost everything with PHP, and that includes handling
flat files. No problem.
"phpLover" [EMAIL PROTECTED] wrote:
I am sorry if my question is confusing. What I mean is that CGI is
excellent
in handling flat file data base, reading and writing files line by line,
word by wor. So is PHP equally strong?
I assume you mean Perl CGI - there are many programming languages
One of exec, system or backtick (ie. `) functions will do it for you.
- John
On Fri, Jan 26, 2001 at 12:14:47PM +1300, Dave Stewart wrote:
Hi,
I have this line in my shtml pages...
!--#exec cgi=\"../../cgi-bin/ads.cgi" --
How do I write this as a function to include in my .php
80 matches
Mail list logo