Re: [PHP] CGI PHP vs. FastCGI vs. mod_php vs. application server?

2011-10-12 Thread Richard Quadling
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 : apparently, the interpreter is loaded at boot time; the
 application itself might also be compiled and loaded once
 - mod_php : same as FastCGI?
 - application server : the application is compiled and loaded once;
 the application can either have its own web server, or use a web
 server as front end, and only handle its own part

 Any tips much appreciated, thank you.


Each of the SAPIs operate in different environments (though I suppose
CGI and FastCGI are going to nearly be swappable).

CGI - As you rightly say, is loaded on a per-request basis. There is
an overhead for every request to get PHP up and running prior to
processing the PHP script.

Fast-CGI - This requires some cooperation from the server. The server
will create a set of PHP instances (separate executable, not running
in the same memory space as the server) ready to receive the script.
This reduces the overhead that exists with CGI from request loading to
server startup/loading.

mod_php - I'm on Windows and have not used Apache. But I have used
ISAPI. I believe these operate in a similar fashion. In this instance,
the PHP interpreter is loaded as a module of the server, just like any
other module the server loads. Each PHP script is handled by a
separate PHP thread. These threads are NOT separate instances of PHP,
and are running within the same address space as the web server. As a
consequence, several features/issues exist. Chiefly for me was the
persistent database connections. As the same module of code is running
all the scripts, a script can (by the use of the appropriate
functions) get the database connection remembered between each script.
This allows faster connection to the DB for each script. There are
issues though. The connection is to the SERVER and not to the DB. The
remembered connection is based upon the server, the username and
password. If you use multiple databases on the same connection AND use
the selectDB functionality, the single remembered DB connection will
change DB. If this happens midscript, you could end up in a very
strange place. But, if you use qualified naming
(database_name.owner.table_name for an MS SQL example), then you will
be fine. Just remember select DB is just a shortcut for the connection
to use. It isn't part of the connection.

Application Server - Don't know.

You also have ...

CLI - Command line PHP scripting. You must manually invoke PHP with
the script name for it to run, though Windows has some useful features
to allow you to run a PHP script without having to declare the PHP
executable every time. I think the #! line is the Unix equivalent of
this feature, but isn't as complete as the Windows mechanism (IMHO) -
See http://docs.php.net/manual/en/install.windows.commandline.php for
additional details on this.

And as of 5.4, there is CLI Server. This is using PHP to run as a
listener on the HTTP port and passes requests to a simple, userland,
PHP-based routing script which will allow you to respond to PHP
requests. See http://docs.php.net/manual/en/features.commandline.webserver.php
for more details.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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



Re: [PHP] CGI PHP vs. FastCGI vs. mod_php vs. application server?

2011-10-12 Thread Mike Mackintosh
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



Re: [PHP] cgi vs php

2009-02-06 Thread Thodoris



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


 

[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






  


First of all try not to top post this is what we usually do here.

Well CGI is a standard protocol implemented by many programming 
languages. You may start googling to find about it but this is a start:


http://en.wikipedia.org/wiki/Common_Gateway_Interface

Both Perl and PHP can work with CGI but working with Perl-CGI is not 
something that we should discuss in this list since this is a *PHP* 
list.


IMHO you should start reading some aspects of web development to make 
some things clear before start asking questions in the lsit. This 
will improve your understanding and it help us to make suggestions.




I admire your calmness.
Such a descriptive reply for someone who doesn't think before asking.



After smashing a ton of keyboards and yell at my screen when people 
started looking me with a weird expression in their faces I understood that:


1) I am paying a lot of money for keyboards
2) My screen will never answer my threats
3) People will start to think that I come from outer space
4) Everybody needs help

:-)

--
Thodoris


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



RE: [PHP] cgi vs php

2009-02-05 Thread Jay Blanchard
[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



Re: [PHP] cgi vs php

2009-02-05 Thread Vikas Sharma
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 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




-- 
vikas sharma


Re: [PHP] cgi vs php

2009-02-05 Thread Thodoris



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






  


First of all try not to top post this is what we usually do here.

Well CGI is a standard protocol implemented by many programming 
languages. You may start googling to find about it but this is a start:


http://en.wikipedia.org/wiki/Common_Gateway_Interface

Both Perl and PHP can work with CGI but working with Perl-CGI is not 
something that we should discuss in this list since this is a *PHP* list.


IMHO you should start reading some aspects of web development to make 
some things clear before start asking questions in the lsit. This will 
improve your understanding and it help us to make suggestions.


--
Thodoris



Re: [PHP] cgi vs php

2009-02-05 Thread Martin Zvarík

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


 

[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






  


First of all try not to top post this is what we usually do here.

Well CGI is a standard protocol implemented by many programming 
languages. You may start googling to find about it but this is a start:


http://en.wikipedia.org/wiki/Common_Gateway_Interface

Both Perl and PHP can work with CGI but working with Perl-CGI is not 
something that we should discuss in this list since this is a *PHP* list.


IMHO you should start reading some aspects of web development to make 
some things clear before start asking questions in the lsit. This will 
improve your understanding and it help us to make suggestions.




I admire your calmness.
Such a descriptive reply for someone who doesn't think before asking.

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



Re: [PHP] cgi vs php

2009-02-05 Thread Vikas Sharma
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 5, 2009 at 9:33 PM, Martin Zvarík mzva...@gmail.com wrote:

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



 [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









 First of all try not to top post this is what we usually do here.

 Well CGI is a standard protocol implemented by many programming languages.
 You may start googling to find about it but this is a start:

 http://en.wikipedia.org/wiki/Common_Gateway_Interface

 Both Perl and PHP can work with CGI but working with Perl-CGI is not
 something that we should discuss in this list since this is a *PHP* list.

 IMHO you should start reading some aspects of web development to make some
 things clear before start asking questions in the lsit. This will improve
 your understanding and it help us to make suggestions.


 I admire your calmness.
 Such a descriptive reply for someone who doesn't think before asking.

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




-- 
vikas sharma


[PHP] Re: php-cgi limitations

2006-03-09 Thread El Bekko

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 I can 
run just that app under php 4 cgi until the vendor updates to support 
php 5.  Google is unusually laconic on this, but perhaps I just offended 
it with too many daft queries on the subject... :)



Are you sure that app won't work under PHP5?

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



Re: [PHP] Re: php-cgi limitations

2006-03-09 Thread Max Schwanekamp

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

Are you sure that app won't work under PHP5?

Thanks for the reply.  The app in question is FogBugz, and they state 
emphatically that it does not yet work under PHP5.  I guess there's only 
one way to find out, really - test test test.


--
Max Schwanekamp
http://www.neptunewebworks.com/

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



Re: [PHP] cgi chmod problem

2005-09-25 Thread Mikey

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

My cgi file works OK if I call directly in my cgi-bin directory.  e.g.,


$file= '/EditPage/test2.php';
$perms= 0746;



if(!file_exists($pfile)) echo div style=\color:red; 
font-weight:bold\$pfile does not exist./div;

chmod($pfile, $perms);


echo New file permissions for $pfile:  . substr(sprintf('%o', 
fileperms($pfile)), -3);



But, I can't get the cgi file to execute when using include 
/path/perm.cgi. in the php test function.


I guess it is because the cgi assumes it is running in the directory 
with the php that called it.


Linux php3.9.11 virtual host

Anyone have a suggestion. 


My guess would be that your webserver isn't running as the same user as 
your shell account - for details on how to fix this, please have go at STFA,


Mikey

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



Re: [PHP] cgi chmod problem

2005-09-25 Thread Al

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 script as needed.

My cgi file works OK if I call directly in my cgi-bin directory.  e.g.,


$file= '/EditPage/test2.php';
$perms= 0746;




if(!file_exists($pfile)) echo div style=\color:red; 
font-weight:bold\$pfile does not exist./div;

chmod($pfile, $perms);

echo New file permissions for $pfile:  . substr(sprintf('%o', 
fileperms($pfile)), -3);




But, I can't get the cgi file to execute when using include 
/path/perm.cgi. in the php test function.


I guess it is because the cgi assumes it is running in the directory 
with the php that called it.


Linux php3.9.11 virtual host

Anyone have a suggestion. 



My guess would be that your webserver isn't running as the same user as 
your shell account - for details on how to fix this, please have go at 
STFA,


Mikey

They are the same.

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



Re: [PHP] CGI vs Apache module

2004-12-14 Thread Greg Donald
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 the CGI
 version, which seems to run, but Apache (2.0) doesn't recognize it.
 phpinfo() still reports 4.3.2.

Did you restart Apache?

 Any ideas accepted on making 4.3.9 the default version!

What was your ./configure command?


-- 
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] CGI vs Apache module

2004-12-14 Thread Richard Lynch
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 reports 4.3.2.

 Any ideas accepted on making 4.3.9 the default version!

Unless you actually *WANT* PHP as CGI, go back and re-compile as Module.

Right before you do make install you'll need to RPM un-install PHP, so
you don't confuse things.

You'll need to re-start Apache for sure, and if that doesn't work, you may
need to change the httpd.conf settings by hand.

I don't know where RPM-makers hide your httpd.conf file, but you should be
able to find it and edit it to find the PHP parts and fix them up.

-- 
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] cgi error --- please help

2004-01-28 Thread Len Borowski
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 posts asking the
same question.

-Len



On Wed, 2004-01-28 at 15:17, Dale Hersh 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 loads just fine. Any ideas???
 
 Thanks,
 Dale
 
 RUNNING IIS 6.0  MSSQL 2000

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



RE: [PHP] cgi error --- please help

2004-01-28 Thread Gryffyn, Trevor
Odd that it would work after you hit REFRESH, though.  If it was the CLI
version, wouldn't youg et the bad headers error every time you refreshed
the browser?

Could always try manually initiating the headers using the header()
command.  That may be your own course of action if, for some reason, you
don't have access to the web server and the installation of PHP there to
upgrade it to the proper version..  Or if you just can't figure out why
it's giving you this error, header() might be a workaround.

-TG


 -Original Message-
 From: Len Borowski [mailto:[EMAIL PROTECTED] 
 Sent: 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 file.  You 
 should look
 at getting the right php binary.
 
 Also, if you have a question, you don't make 2 seperate posts 
 asking the
 same question.
 
 -Len
 
 
 
 On Wed, 2004-01-28 at 15:17, Dale Hersh 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 loads just fine. 
 Any ideas???
  
  Thanks,
  Dale
  
  RUNNING IIS 6.0  MSSQL 2000
 
 -- 
 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] CGI ERROR

2004-01-27 Thread - Edwin -
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 loads
 just fine. Any ideas???

A bug on your server? A bug on your browser? A bug on your
script? ...

--

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: [PHP] CGI error when loading iFRAME

2003-11-15 Thread Marek Kilimajer
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 it did return are:
###Additional:
PHP Version 4.3.3 is running on Windows 2000 server
This is a common problem with php on iis, google for the error string to 
get possible solutions.

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


Re: [PHP] CGI Error, IIS

2003-09-14 Thread Curt Zirzow
* 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.

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



Re: [PHP] CGI Error, IIS

2003-09-14 Thread John W. Holmes
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: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP] CGI timeout problem

2003-07-29 Thread John W. Holmes
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 time limit instead of a PHP one. 
Usually the PHP error is different (but I use ISAPI instead of CGI).

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





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


[PHP] Re: php cgi question - solved

2002-10-16 Thread David Cook

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 Marco (even if it did end up being a umm bit O/T as
far as php went... sorry :(

Regards

David Cook
David Cook [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 Got a question regarding using php scripts as cgi's.

 What I am trying to do is this. (ya may need a bit of background, it gets
a
 little complicated... well for me its complicated)

 Im building a web based email system using php (duh) as the front end and
 glue for everything, part of it is using a program called getmail to
 retreive remote pop accounts to the virtual accounts on the server (its
all
 virtual using qmail/vpopmail and courier-imap). The various setttings for
 this are in a file called getmailrc, in the virtual users home dir, (this
 will also be theoretically relevant when I try and do the same thing with
a
 server side filtering program called maildrop.. but one at a time I reckon
 :))

 ie. /home/vpopmail/domains/some.email.domain/someuser/.getmail/getmailrc

 This file is owned specifically by a user/group otherwise getmail wont
work

 ie: -rw-r--r--1 vpopmail vchkpw585 Sep 29 07:16 getmailrc

 any permissions other than this will tweak getmails internal security and
 stop it.

 I decided to minimise security problems and use mysql as an intermidiary
 storage for any rules created for getmail, which works fine. :) (yay me..
 lol)

 NOW comes the problem, I need to write (overwrite) that getmailrc file
after
 the user has finished messing with their settings, to do this I decided
that
 since the file can only be read/written to by the vpopmail/vchkpw
 user/group, that I would knock up a php script to run as a cgi, that would
 do only one thing: Upon a button being pressed to 'finish edit' the new
 rules would be written to the mysql table, then the cgi would be invoked
 with a particular identifier so that it could then look up the mysql table
 (using that identifier so it gets the right rows), and following some
rules
 inbuilt, write out the getmailrc file with that restrictive permissions
set.

 I wrote up a script that was just for POC, that would get the data for
where
 that file was supposed to be (the /home/vpopmail/etc...etc) and read it,
 then break out the various details and display it, basically just showing
me
 what was already in the file. (using the shebang method, as my php cgi
 interpreter is OUTSIDE the web tree, but thats another story of getting
the
 damn thing to work at all... damn RPM'S sometimes...
 that --enable-force-redirect had me stuck for a few days)

 When I tested it out from the shell, using ./getmailtest.cgi as root, it
 worked, in that it did what it was sposed to.. display the contents of the
 getmailrc file. This cgi php script is owned by vpopmail/vchkpw which
should
 allow reading the file as said above

 Great, thought I, and proceeded to attempt linking to it from within the
 editing script, using both an attempt with a 'submit' button and a click
 through link.

 Now comes the prob, it fails, with an error of being unable to either open
 the file, or that the file doesnt exist (depending on what I fiddle with
in
 the script).

 Would anyone have any ideas as to what may be going wrong here? I havent
 tried doing this before, using php as a cgi to do stuff to files on the
 system, so I am at quite a loss, and any help would be appreciated.

 Regards

 David Cook










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




Re: [PHP] Re: php cgi question

2002-10-14 Thread David Cook

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
of permissions only the owner (vpopmail) can list read and write to any of
the directories leading down to the
~vpopmail/domains/some.email.domain/some.user/ etc.. etc... no group
permissions at ALL.

I have asked on the vpopmail list what the effect may be of re-setting group
list access (at least) to the structure may be as I dont want to break
anything on a running server... lol... so yep.. permissions it was indeed
(apparantly anyways), I reckon this is a proven case now, just got to work
out the solution as I can't setuid for a web enabled cgi to the vpopmail
user without getting stuck in suEXEC etc...

I dont know why the heck I hadnt tried just cat'ing the file.. lack of sleep
perhaps.. lol

Will let you know how it goes (if you are interested)

Regards, and thanks for all the help
David Cook

Marco Tabini [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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, at this point, I think that's exactly where the problem
 is), that it should just be a matter of trying a few things out.




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




[PHP] Re: php cgi question

2002-10-13 Thread David Cook

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 the button to try the cgi as a redirect this waybr);
print(input type=submit value=\try it\);

(that was because I was messing round with differing locations of the cgi,
different extensions etc.. made it easier to set the actual cgi as a
variable, thats all)

Eventually if I can get this to work, it will have to accept a variable as
well being passed (the identifier), something like
getmailtest.cgi?id=$identifier

Thanks again

Hope someone can help

David Cook





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




[PHP] Re: php cgi question

2002-10-13 Thread David Cook

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 setting
that group read/write on the getmailrc file (in theory now, apache should
have read/write permissions to the file via the group), and did a bit more
testing.

Results,

Executing the cgi script from command line still works (in that it displays
results, whereas from the web the cgi STIL says that the file doesnt exist
(this is via a quick if(file_exists($getmailfile)) etc.. etc..(least I didnt
break anything else) :)

I find this interesting, as the file definately DOES exist, and further,
theoretically the web server should have access via the group permissions.

I was a little curious if this may be a bahaviour of the apache php module,
in that it is incapable of working with files outside docroot? this should
not be the case though, as with a number of the other modules I am using,
and have written, files get written to temp (while they are being uploaded)
and other files are written outside docroot for other purposes, without any
real problems so far, this is getting curiouser and curiouser as Alice said

Any suggestions or thoughts anyone?

Puzzled.

David Cook



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




Re: [PHP] Re: php cgi question

2002-10-13 Thread Marco Tabini

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 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 setting
 that group read/write on the getmailrc file (in theory now, apache should
 have read/write permissions to the file via the group), and did a bit more
 testing.
 
 Results,
 
 Executing the cgi script from command line still works (in that it displays
 results, whereas from the web the cgi STIL says that the file doesnt exist
 (this is via a quick if(file_exists($getmailfile)) etc.. etc..(least I didnt
 break anything else) :)
 
 I find this interesting, as the file definately DOES exist, and further,
 theoretically the web server should have access via the group permissions.
 
 I was a little curious if this may be a bahaviour of the apache php module,
 in that it is incapable of working with files outside docroot? this should
 not be the case though, as with a number of the other modules I am using,
 and have written, files get written to temp (while they are being uploaded)
 and other files are written outside docroot for other purposes, without any
 real problems so far, this is getting curiouser and curiouser as Alice said
 
 Any suggestions or thoughts anyone?
 
 Puzzled.
 
 David Cook
 
 
 
 -- 
 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] Re: php cgi question

2002-10-13 Thread David Cook

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.. lol) as if I ran it off the web (file does not exist),
this still seems to tie into permissions perhaps, but I am having trouble
nailing enough data down so far to point to specifics.

I didnt make this server from scratch, it came pre-installed with a lot of
the items on it as part of a co-lo deal, the next few I build however will
be from the ground up even if it takes longer... and probably without using
RPM's for a lot of it... I've learned a fair bit the last 9 months or so
about the shortcomings as well as the benefits of using RPM's.

Thanks again for the thoughts, will test out some more stuff (this is just
plain getting me determined to work it out... stubborn I spose)

Regards

David



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




Re: [PHP] Re: php cgi question

2002-10-13 Thread Marco Tabini

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, at this point, I think that's exactly where the problem
is), that it should just be a matter of trying a few things out.


On Sun, 2002-10-13 at 23:23, David Cook wrote:
 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.. lol) as if I ran it off the web (file does not exist),
 this still seems to tie into permissions perhaps, but I am having trouble
 nailing enough data down so far to point to specifics.
 
 I didnt make this server from scratch, it came pre-installed with a lot of
 the items on it as part of a co-lo deal, the next few I build however will
 be from the ground up even if it takes longer... and probably without using
 RPM's for a lot of it... I've learned a fair bit the last 9 months or so
 about the shortcomings as well as the benefits of using RPM's.
 
 Thanks again for the thoughts, will test out some more stuff (this is just
 plain getting me determined to work it out... stubborn I spose)
 
 Regards
 
 David
 
 
 
 -- 
 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] Re: PHP CGI cannot be accessed directly

2002-06-06 Thread MindHunter

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 php.ini file.  I have trippled
 checked this!  I am running PHP 4.2.0 on Win2K IIS5 as CGI.  What am I
 missing?  Any known bugs?

 Tx
 MH





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




[PHP] Re: PHP-CGI and script files not found

2002-03-27 Thread Donald

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 unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] CGI

2002-02-26 Thread Bas Jobsen

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 make them a part of my php meaning that in the current situation
 the url is something like this
 http://x.x.xxx/cgi-bin/cgiscripts/.cgi
 and i want it to be something like this
 http://../index.php?action=cgiscripts=xxx.cgi

 Maybe a stupid question but 


 Kind regards
 Sven
Op dinsdag 26 februari 2002 15:30, schreef Sven Jacobs:
 Hey

 I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory
 How can i make them a part of my php meaning that in the current situation
 the url is something like this
 http://x.x.xxx/cgi-bin/cgiscripts/.cgi
 and i want it to be something like this
 http://../index.php?action=cgiscripts=xxx.cgi

 Maybe a stupid question but 


 Kind regards
 Sven

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




RE: [PHP] CGI

2002-02-26 Thread Brian Drexler

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 if I'm wrong.  Hope 
this helps.

-Original Message-
From: Sven Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 9:31 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] CGI 


Hey

I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory
How can i make them a part of my php meaning that in the current situation
the url is something like this
http://x.x.xxx/cgi-bin/cgiscripts/.cgi
and i want it to be something like this
http://../index.php?action=cgiscripts=xxx.cgi

Maybe a stupid question but 


Kind regards
Sven



Re: [PHP] CGI

2002-02-26 Thread 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
commands on your server.

bvr.




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




Re: [PHP] CGI

2002-02-26 Thread Simon Willison

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 used to make user input safe for use on a command line:

http://www.php.net/manual/en/function.escapeshellarg.php
http://www.php.net/manual/en/function.escapeshellcmd.php

Simon


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




RE: [PHP] CGI

2002-02-26 Thread Demitrious S. Kelly


Also, make sure that if you run the script with user input that you
validate the input...

Input like 'username; cat /etc/passwd' would be no fun at all

-Original Message-
From: Simon Willison [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 26, 2002 7:14 AM
To: bvr
Cc: php-general
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 functions 
which can be used to make user input safe for use on a command line:

http://www.php.net/manual/en/function.escapeshellarg.php
http://www.php.net/manual/en/function.escapeshellcmd.php

Simon


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

2002-02-26 Thread Bas Jobsen

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
 commands on your server.

 bvr.

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




Re: [PHP] CGI

2002-02-26 Thread Simon Willison

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 to add. Alternatively run a 
regular expression so ensure their input consists only of harmless 
characters (for example[a-zA-Z0-9] )

http://www.php.net/basename

if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`;

If you still want to use that method have a look at these two functions 
which can be used to make user input safe for use on a command line:

http://www.php.net/manual/en/function.escapeshellarg.php
http://www.php.net/manual/en/function.escapeshellcmd.php

Simon









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




Re: [PHP] CGI and HTTP Authentication

2002-01-04 Thread Brian Clark

* 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 .htaccess based stuff. You may be able to use
an admin page to add users and write out the .htaccess file(s). Might be
possible..

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
(E)ight (M)egabytes (A)nd (C)ontinually (S)wapping.


-- 
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] CGI and HTTP Authentication

2002-01-04 Thread Gaylen Fraley

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 PROTECTED] wrote in message
20020105042749.GK17616@ganymede">news:20020105042749.GK17616@ganymede...
 * 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 .htaccess based stuff. You may be able to use
 an admin page to add users and write out the .htaccess file(s). Might be
 possible..

 --
 Brian Clark | Avoiding the general public since 1805!
 Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
 (E)ight (M)egabytes (A)nd (C)ontinually (S)wapping.




-- 
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] CGI and HTTP Authentication

2002-01-04 Thread Gaylen Fraley

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 Guest Book http://www.gaylenandmargie.com/phpwebsite/

Gaylen Fraley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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 PROTECTED] wrote in message
 20020105042749.GK17616@ganymede">news:20020105042749.GK17616@ganymede...
  * 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 .htaccess based stuff. You may be able to use
  an admin page to add users and write out the .htaccess file(s). Might be
  possible..
 
  --
  Brian Clark | Avoiding the general public since 1805!
  Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
  (E)ight (M)egabytes (A)nd (C)ontinually (S)wapping.
 





-- 
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] CGI and HTTP Authentication

2002-01-04 Thread Brian Clark

* 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 either say Apache or CGI.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
This page intentionally left unblank.


-- 
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] CGI and HTTP Authentication

2002-01-04 Thread Brian Clark

* 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 Auth probably wouldn't be there if the server
doesn't use mod_auth, but on a default Apache install, it's going to be
there.. I couldn't imagine someone removing it purposely.

If you have shell access to the server you can do this to see if it's
available:

/path/to/httpd -l | grep mod_auth

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Backup not found: (A)bort, (R)etry, (P)ee your pants.


-- 
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] CGI and HTTP Authentication

2002-01-04 Thread Gaylen Fraley

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
20020105061814.GL17616@ganymede">news:20020105061814.GL17616@ganymede...
 * 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 either say Apache or CGI.

 --
 Brian Clark | Avoiding the general public since 1805!
 Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
 This page intentionally left unblank.




-- 
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] CGI and HTTP Authentication

2002-01-04 Thread Brian Clark

* 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 E4D0 C7C8
Friends help you move. Real friends help you move bodies.


-- 
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] Re: PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-22 Thread Philippe

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 that the ouput of phpinfo() was correct. The
 output showed the page had been handled by the php cgi binary, not the
 module.  
 
 The module has a large config line and several extensions
 configured in, the cgi binary was compiled with nothing but ./configure
 and the info page confirms this. 
 
 So it seems Apache is handling everything correct, the page gets passed to
 the proper php binary, and the result is correctly served back to the
 client. 
 
 DAve 
 
 
 On Sun, Oct 21, 2001 at 12:18:07PM -0500, Brian Mauter wrote:
 Seems to me that the problems is that you have two instances of PHP going at
 the same time.  The first is the one compiled into Apache and the second is
 the cgi module.  My bet is that the PHP compiled into Apache is catching it
 first (maybe you told all .cgi files to be parsed by the PHP parser?).  In
 that case, the first line would be treated as HTML output, not PHP.  This
 would be the reason you get that line in all of your scripts.  Here's a
 test:  remove that line from your file and then try it.  If it continues to
 work, I would seriously suspect that the built-in Apache-PHP parser is
 handling your .cgi files. 
 
 -Brian 
 
 -Original Message-
 From: Dave Goodrich [mailto:[EMAIL PROTECTED]] 
 
  * snip
 info.cgi
 #!/usr/local/bin/php
 ?php
  phpinfo();
 ? 
 
 
 -- 
 My other computer is your Windows machine... 
 
  
 
 -- 
 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]




[PHP] Re: PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-21 Thread Philippe

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 all non-cgi directory
But it doesn't work in cgi directory with suexec or not 

If I put #/usr/local/bin/php in the script, the script work but we can see 
#/usr/local/bin/php at the top. 

If I don't put it, there is an 500 error (Internal Server Error)
In error_log, we can see these lines 

[Sun Oct 21 17:30:10 2001] [error] (8)Exec format error: exec of 
/home/webbourse/cgi-bin/php.cphp failed
[Sun Oct 21 17:30:10 2001] [error] [client 212.103.7.98] Premature end of 
script headers: /home/webbourse/cgi-bin/php.cphp 

Someone has an idea  

Thanks
Philippe 

Stefan Siefert writes: 

 Hi @all.. 
 
 I'm not sure if this can fix (or explain) your problem (cause I didn't tried
 it in lack of time) but theoretical it could be :). 
 
 I think you only need the #!/usr/local/bin/php if you would like to run
 scripts from the bash, or as a real cgi. But I think, there could be
 another solution .. compile your php as cgi like you did and add these lines
 in your httpd.conf 
 
 ScriptAlias /php/ /usr/local/bin/ 
 
 AddType application/x-httpd-php .php .phtml .cgi 
 
 Action application/x-httpd-php /php/php 
 
 This should also launch the cgi - version of php, but doesn't requires the
 #! line in the scripts. I'm not sure, but it should work. 
 
 Hope this helps you, 
 
 Stefan Siefert 
 
  
 
 - Original Message -
 From: Dave Goodrich [EMAIL PROTECTED]
 To: Philippe [EMAIL PROTECTED]
 Cc: php-general [EMAIL PROTECTED]; php-install
 [EMAIL PROTECTED]
 Sent: Saturday, October 20, 2001 6:05 PM
 Subject: [PHP-INST] Re: [PHP] PHP/CGI problem: #!/path/php at top of CGI
 script appears in output 
 
 
 It's not you. I just built a bare cgi version of php, nothing but
 './configure' and got the same result. 

 I used this simple script to be sure I was in fact running the cgi binary
 and it showed I was. 

 info.cgi
 #!/usr/local/bin/php
 ?php
 phpinfo();
 ? 

 I got the correct info page, but with the #!/usr/local/bin/php at the top
 as you stated. Odd, but I've never used the cgi version so other than
 confirming your problem I am afraid I'm no help. 

 DAve 

 On Sat, Oct 20, 2001 at 03:31:06PM +, Philippe wrote:
  Hi,
  I'll synthetize the problem with the response I have givven to Curt.
 
  I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
  I've installed PHP in Apache, it works very well
  I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think
 it's
 
  the problem) but I've a problem.
 
  In CGI mode, the path of PHP is always written at the top of the result
 
  I'll take for example this script which is in the cgi-bin with the
 execute
  mod (755), the extension is .cgi :
 
  
  #!/usr/local/bin/php
  ?
  print Hello World;
  ?
  
 
  When the file is called by the browser, the result is :
  
  #!/usr/local/bin/php
  Hello World
  
 
  Does someone know the problem and the solution ?
  Have I forgotten something ?
 
  I think that's a misconfiguration in PHP
 
  Thanks for your help
 
  Philippe
 
 
  --
  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]
  

 --
 My other computer is your Windows machine... 

 

 --
 PHP Install 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]




[PHP] Re: PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-19 Thread Philippe

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 .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 in executable mode with chmod? 
 
 for example:chmod a+x foo.bar 
 
 Is it in a cgi-bin folder or similar folder where scripts will be executed?
 Do other CGI scripts in the same folder work? 
 
 __
 Curt A. Gilman
 Richmond, Virginia, USA
 [EMAIL PROTECTED] 
 
 Philippe [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
 I've installed PHP in Apache, it works very well
 I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think
 it's
 the problem) but I've a problem.
 In CGI mode, the path of PHP is always written at the top of the result 

 I'll take for example this script :
  
 #!/usr/local/bin/php
 ?
 print Hello World;
 ?
   

 When the file is called by the browser, the result is :
  
 #!/usr/local/bin/php
 Hello World
   

 Does someone know the problem and the solution ?
 Have I forgotten something ? 

 Thanks for your help 

 Philippe 

  
 
 

-- 
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] Re: PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-19 Thread Philippe

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 languages work well (I've 
 already tested perl)  
 
 Philippe  
 
 Curt A. Gilman writes:  
 
 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 in executable mode with chmod?  
 
 for example:chmod a+x foo.bar  
 
 Is it in a cgi-bin folder or similar folder where scripts will be 
 executed?
 Do other CGI scripts in the same folder work?  
 
 __
 Curt A. Gilman
 Richmond, Virginia, USA
 [EMAIL PROTECTED]  
 
 Philippe [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
 I've installed PHP in Apache, it works very well
 I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think
 it's
 the problem) but I've a problem.
 In CGI mode, the path of PHP is always written at the top of the result  
 
 I'll take for example this script :
  
 #!/usr/local/bin/php
 ?
 print Hello World;
 ?
    
 
 When the file is called by the browser, the result is :
  
 #!/usr/local/bin/php
 Hello World
    
 
 Does someone know the problem and the solution ?
 Have I forgotten something ?  
 
 Thanks for your help  
 
 Philippe  
 
   
 
  
 
 -- 
 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]




[PHP] Re: PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-19 Thread Curt A. Gilman

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 in executable mode with chmod?

for example:chmod a+x foo.bar

Is it in a cgi-bin folder or similar folder where scripts will be executed?
Do other CGI scripts in the same folder work?

__
Curt A. Gilman
Richmond, Virginia, USA
[EMAIL PROTECTED]

Pour Mailings Lists - Pass Huitre [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
 I've installed PHP in Apache, it works very well
 I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think
it's
 the problem) but I've a problem.
 In CGI mode, the path of PHP is always written at the top of the result

 I'll take for example this script :
  
 #!/usr/local/bin/php
 ?
 print Hello World;
 ?
  

 When the file is called by the browser, the result is :
  
 #!/usr/local/bin/php
 Hello World
  

 Does someone know the problem and the solution ?
 Have I forgotten something ?

 Thanks for your help

 Philippe




-- 
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] cgi bug workaround

2001-10-05 Thread David Robley

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 any workarounds for this? Is it fixed in the cvs versions?

 thanks,

 James.

You should only need the #! construct if you are running that file as a 
php script from the shell/cron/whatever. If you are only serving pages 
via a web server (eg using WN or somesush) you use the server method to 
define those scripts as to be parsed by php and you don't need the #!

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Would I ask you a rhetorical question?

-- 
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] cgi bug workaround

2001-10-05 Thread James Peter Gregory

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 at the top of each page if I do this.
 
  Are there any workarounds for this? Is it fixed in the cvs versions?
 
  thanks,
 
  James.

 You should only need the #! construct if you are running that file as a
 php script from the shell/cron/whatever. If you are only serving pages
 via a web server (eg using WN or somesush) you use the server method to
 define those scripts as to be parsed by php and you don't need the #!

I understand that. Unfortunately I'm not the one administrating this
computer so we're stuck with having to find a work around for the problem.
That is, I can't change the apache config at all. They'll only let us use
cgi.

but thanks all the same.

James.


 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

Would I ask you a rhetorical question?


-- 
I'm not vegetarian becuase I love animals; I'm vegetarian because I hate
 plants. - unknown.


-- 
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] cgi bug workaround

2001-10-05 Thread Devon Weller


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 Gregory) wrote:

 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 at the top of each page if I do this.
  
   Are there any workarounds for this? Is it fixed in the cvs versions?
  
   thanks,
  
   James.
 
  You should only need the #! construct if you are running that file as a
  php script from the shell/cron/whatever. If you are only serving pages
  via a web server (eg using WN or somesush) you use the server method to
  define those scripts as to be parsed by php and you don't need the #!
 
 I understand that. Unfortunately I'm not the one administrating this
 computer so we're stuck with having to find a work around for the problem.
 That is, I can't change the apache config at all. They'll only let us use
 cgi.
 
 but thanks all the same.
 
 James.
 
 
  --
  David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
  CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
 
 Would I ask you a rhetorical question?
 

-- 
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] cgi timeout

2001-08-17 Thread Erik H. Mathy

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 trying to run a script and it supposed to take a lot of time... so
 I set the max_execution_time in the config file to 0...  (i think that's
 wat it's for no time limit) but after exactly 5 mins it gives me a
 cgi error saying that the cgi application exceeded the allowed time for
 processing so i changed the number to 1800 it still gets killed
 in 5 mins I have my php installed on a win2k system with IIS 5 under
 the dir c:\php and the file php.ini has been edited and put into
 c:\winnt\  What am I supposed to do in order to allow my script to run
 more than 5 mins??

 yours,
 Ray


 --
 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] cgi timeout

2001-08-17 Thread Raymond Siow

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.

 - 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 trying to run a script and it supposed to take a lot of time... so
  I set the max_execution_time in the config file to 0...  (i think that's
  wat it's for no time limit) but after exactly 5 mins it gives me a
  cgi error saying that the cgi application exceeded the allowed time for
  processing so i changed the number to 1800 it still gets killed
  in 5 mins I have my php installed on a win2k system with IIS 5 under
  the dir c:\php and the file php.ini has been edited and put into
  c:\winnt\  What am I supposed to do in order to allow my script to run
  more than 5 mins??
 
  yours,
  Ray
 
 
  --
  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] cgi timeout

2001-08-17 Thread Raymond Siow

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 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.
 
  - 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 trying to run a script and it supposed to take a lot of time... so
   I set the max_execution_time in the config file to 0...  (i think that's
   wat it's for no time limit) but after exactly 5 mins it gives me a
   cgi error saying that the cgi application exceeded the allowed time for
   processing so i changed the number to 1800 it still gets killed
   in 5 mins I have my php installed on a win2k system with IIS 5 under
   the dir c:\php and the file php.ini has been edited and put into
   c:\winnt\  What am I supposed to do in order to allow my script to run
   more than 5 mins??
  
   yours,
   Ray
  
  
   --
   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] cgi and module?

2001-08-13 Thread Rasmus Lerdorf

 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, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] CGI error

2001-08-10 Thread Phil Driscoll

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 test.htm in the same directory which contains any old html.
Try to access that as http://casa/IISSamples/Default/test.htm

If that works OK, then the configuration of pws is wrong. I don't have PWS so 
I'm not sure of the user interface to configuring it, although if you 
installed php using the 'Installer' distribution, it will have configured PWS 
correctly.

Sometimes, PWS seems to get itself into a strage state where you can't get it 
to work no matter what you try. Some people have had success after 
reinstalling PWS. Others just dump it and use Xitami or Apache.

Cheers
-- 
Phil Driscoll

-- 
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] CGI error

2001-08-09 Thread Phil Driscoll

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: 


 Why is this error happening ?

Read, and follow the instructions on this matter as documented towards the 
end of the install.txt file which came with your distribution.

Cheers
-- 
Phil Driscoll

-- 
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] CGI error

2001-08-09 Thread karthik

Hi,

In install.txt there seems to be settings on how to install under various
web servers.

There is nothing on CGI errors etc.

And i have followed the procedure which was given in install.txt for
configuring PHP.

Still this problem occurs.

Help,
Karthik.

- Original Message -
From: 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 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: 
 
 
  Why is this error happening ?

 Read, and follow the instructions on this matter as documented towards the
 end of the install.txt file which came with your distribution.

 Cheers
 --
 Phil Driscoll

 --
 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] CGI error

2001-08-09 Thread Phil Driscoll

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:
   The specified CGI application misbehaved by not returning a complete set of
   HTTP headers. The headers it did return are:

   This error message means that php failed to output anything at all.
   From the command line hange to the directory containing php.exe. Run
   php.exe -i
   If php has any problems running, then a suitable
   error message will be displayed which will give you a clue as to what 
needs to
   be done next. If you get a screen full of html codes (the output of the
   phpinfo() function) then php is working ok.

   Once php is working at the command line, try accessing the php script via 
the browser again.
   If it still fails then it could be one of the following:

   file permissions on your php script, php.exe, php4ts.dll, php.ini or any 
php
   extensions you are trying to load are such that the anonymous internet user
   ISUR_machinename cannot access them.

   The script file does not exist (or possibly isn't where you think it is
   relative to your web root directory). Note that for IIS you can trap this 
error by ticking
   the 'check file exists' box when setting up the script mappings in the 
Internet Services
   Manager. If a script file does not exist then the server will return a 404 
error instead.
   There is also the additional benefit that IIS will do any authentication 
required for you
   based on the NTLanMan permissions on your script file.
-- 
Phil Driscoll

-- 
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] CGI error

2001-08-09 Thread Steve Brett

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 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:
The specified CGI application misbehaved by not returning a complete
set of
HTTP headers. The headers it did return are:

This error message means that php failed to output anything at all.
From the command line hange to the directory containing php.exe. Run
php.exe -i
If php has any problems running, then a suitable
error message will be displayed which will give you a clue as to what
 needs to
be done next. If you get a screen full of html codes (the output of the
phpinfo() function) then php is working ok.

Once php is working at the command line, try accessing the php script
via
 the browser again.
If it still fails then it could be one of the following:

file permissions on your php script, php.exe, php4ts.dll, php.ini or
any
 php
extensions you are trying to load are such that the anonymous internet
user
ISUR_machinename cannot access them.

The script file does not exist (or possibly isn't where you think it is
relative to your web root directory). Note that for IIS you can trap
this
 error by ticking
the 'check file exists' box when setting up the script mappings in the
 Internet Services
Manager. If a script file does not exist then the server will return a
404
 error instead.
There is also the additional benefit that IIS will do any
authentication
 required for you
based on the NTLanMan permissions on your script file.
 --
 Phil Driscoll



-- 
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] CGI error

2001-07-24 Thread Phil Spitler

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
until checking Check that file exists in the App Mappings.  This fixed
the problem after HOURS of troubleshooting.

Phil

 -Original Message-
 From: Phil Spitler [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 3:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] CGI error


 I am running PHP in CGI mode on win2k.  I keep getting an error when I try
 to load a PHP page.  I have 2 other servers set up exactly the same that
 work just fine.  Does anyone know what this could be?

 CGI Error
 The specified CGI application misbehaved by not returning a
 complete set of
 HTTP headers. The headers it did return are:

 Thanks!

 Phil


 --
 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] CGI error

2001-07-24 Thread Phil Driscoll

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 App Mappings.  This fixed
 the problem after HOURS of troubleshooting.

I don't think there's a bug here.
Ticking that box does two important things.
Firstly it stops the 'the specified CGI application misbehaved by not 
returning a complete set of headers' error message which is often caused by 
php not finding the script you specified because it is not there. IIS checks 
whether the script file exists, and if it doesn't, it sends a 404 error 
rather than running php.
Secondly, when it checks the file and finds that the web server does not have 
permission to read it, it sends authentication headers (or does all that NT 
authentication unpleasantness if you have it enabled) in order to attempt to 
get sufficient permission to read the file.

Basically, this is just the way IIS works. You'd get exactly the same results 
with any other cgi script interpreter.

Cheers
-- 
Phil Driscoll

-- 
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] CGI error

2001-07-24 Thread Phil Spitler

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 you are telling me, it should've given me a 404 error.

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.
  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 App Mappings.
 This fixed
  the problem after HOURS of troubleshooting.

 I don't think there's a bug here.
 Ticking that box does two important things.
 Firstly it stops the 'the specified CGI application misbehaved by not
 returning a complete set of headers' error message which is often
 caused by
 php not finding the script you specified because it is not there.
 IIS checks
 whether the script file exists, and if it doesn't, it sends a 404 error
 rather than running php.
 Secondly, when it checks the file and finds that the web server
 does not have
 permission to read it, it sends authentication headers (or does
 all that NT
 authentication unpleasantness if you have it enabled) in order to
 attempt to
 get sufficient permission to read the file.

 Basically, this is just the way IIS works. You'd get exactly the
 same results
 with any other cgi script interpreter.

 Cheers
 --
 Phil Driscoll

 --
 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] CGI error

2001-07-24 Thread Phil Driscoll

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 you are telling me, it should've given me a 404
 error.

No - if you didn't get a 404 error then the file was there, but maybe the 
browser did a secret handshake with IIS to give it permission to load the 
file.

Cheers
-- 
Phil Driscoll

-- 
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] CGI Error when processing form

2001-06-22 Thread Markus Kühni

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 forms just to test.

 this is on an IIS server 4.0 server

 this is the error I get after clicking on the tell us button...

 CGI Error
 The specified CGI application misbehaved by not returning a complete set
of
 HTTP headers. The headers it did return are:

 Any ideas

..



-- 
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] cgi vs. module

2001-04-17 Thread Christian Reiniger

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?  

Modules are *way* faster (I haven't done benchmarks myself, but heard of 
a 10x speed increase compared to CGIs)

-- 
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] cgi vs. module

2001-04-17 Thread Plutarck

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
honestly thought I had PHP as a module until I re-read my phpinfo, lol. And
I assumed that NuSphere would install it as a module...;)


--
Plutarck
Should be working on something...
...but forgot what it was.


"Franklin Hays" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 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?  What about very large servers such as web hosts?  I am currently
 wrestling with some issues (apaches global variables) that aren't working
 with php -cgi and wonder if this is a common occurance with php-cgi or
 just a misconfiguration on the hosts end.  Does one version serve the
 pages faster or provide less overhead on the server?

 I have read a few FAQ's on this but interested to see what is happening in
 the real world.  Is one form more popular then the other?

 //frank


 --
 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] cgi vs. module

2001-04-17 Thread Jack Dempsey

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 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
 honestly thought I had PHP as a module until I re-read my phpinfo, lol. And
 I assumed that NuSphere would install it as a module...;)
 
 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.
 
 "Franklin Hays" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
  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?  What about very large servers such as web hosts?  I am currently
  wrestling with some issues (apaches global variables) that aren't working
  with php -cgi and wonder if this is a common occurance with php-cgi or
  just a misconfiguration on the hosts end.  Does one version serve the
  pages faster or provide less overhead on the server?
 
  I have read a few FAQ's on this but interested to see what is happening in
  the real world.  Is one form more popular then the other?
 
  //frank
 
 
  --
  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]

-- 
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] cgi vs. module

2001-04-17 Thread Dan Lowe

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 must use CGI form

2. If you want to use command-line PHP scripts you need the CGI form

3. If you want suExec support I believe you need to use the CGI form

 -dan

-- 
If you try to fail, and succeed, which have you done?  -George Carlin

-- 
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] CGI ver. showing exec line

2001-04-05 Thread Thomas Deliduka

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 was written:

 Please forgive if this was posted before.
 
 I don't know what the line really is called but recently when I upgraded to
 PHP 4 Um.. The latest and I used the exact same compile parameters as I
 did before. But now the first line of every script is displayed (the
 execution line)
 
 I.e. The file looks like this:
 
 #!/usr/local/php4/bin/php -q
 ?
 
 Code.
 ?
 
 And the first line is displayed to the screen when the script is ran. Why is
 that and does anyone know how to stop that?

-- 

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] CGI Question?

2001-03-14 Thread John Huggins

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 coming in on STDIN.
There are probably many C libraries available to help parse this out into an
array or something.

This is actually a very good method if you want the fastest speed possible
form a web application.  Compile the C program statically for the best
speed.

John

 -Original Message-
 From: Dan Pupek [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 14, 2001 7:40 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] CGI Question?


 On the latest version of Apache I have heard you can run Compiled
 C binaries
 from the CGI bin. Is this true? If so how does it work?

 --
 Dan Pupek

 On the Web:
 http://www.sunnet.net/dnkp/dan

 Email:
 [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]



-- 
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] CGI BIN PHP

2001-02-22 Thread bill

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 = substr($SCRIPT_FILENAME,0,$spos);
$fullpath = $firstpath . SCRIPT_NAME;

Not sure, but I think it's close.

kind regards,

bill

Hrishi wrote:

 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
 SCRIPT_NAME=$REDIRECT_URL;export SCRIPT_NAME;
 SCRIPT_FILENAME=$PATH_TRANSLATED;export SCRIPT_FILENAME;
 /bin/php4;
 #set
 the #ed out commands are for debugging you may not need them.
 my .htaccess in the documentroot contains :

 Action application/x-php4-script "/cgi-bin/php4.cgi"
 AddHandler application/x-php4-script php

 i hope you can use this.
 if you have any other problems, reply to the list because i'm sure more
 people can use this 'technique'. its still under testing, (i made it 2 days
 ago) so if there are any changes i need to make, i'll post it here.

 cheers,
 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]




Re: [PHP] CGI BIN PHP

2001-02-21 Thread Hrishi

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
SCRIPT_NAME=$REDIRECT_URL;export SCRIPT_NAME;
SCRIPT_FILENAME=$PATH_TRANSLATED;export SCRIPT_FILENAME;
/bin/php4;
#set
the #ed out commands are for debugging you may not need them.
my .htaccess in the documentroot contains :

Action application/x-php4-script "/cgi-bin/php4.cgi"
AddHandler application/x-php4-script php



i hope you can use this. 
if you have any other problems, reply to the list because i'm sure more 
people can use this 'technique'. its still under testing, (i made it 2 days 
ago) so if there are any changes i need to make, i'll post it here.

cheers,
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] CGI BIN PHP

2001-02-21 Thread Chad Guilette

hehehehe...exact same hostill try that out tonight...as a side note have
you been experiencing some problems lately with responsiveness from the
server...i dont know if u r on the same one as me (ZEUS) but I was just
curious...ive noticed some "issues" as of later..


When You 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 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
 SCRIPT_NAME=$REDIRECT_URL;export SCRIPT_NAME;
 SCRIPT_FILENAME=$PATH_TRANSLATED;export SCRIPT_FILENAME;
 /bin/php4;
 #set
 the #ed out commands are for debugging you may not need them.
 my .htaccess in the documentroot contains :

 Action application/x-php4-script "/cgi-bin/php4.cgi"
 AddHandler application/x-php4-script php



 i hope you can use this.
 if you have any other problems, reply to the list because i'm sure more
 people can use this 'technique'. its still under testing, (i made it 2
days
 ago) so if there are any changes i need to make, i'll post it here.

 cheers,
 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]




Re: [PHP] cgi execution w/php failing

2001-02-15 Thread Richard Lynch

 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:


 chdir("../../cgibin");
 if(is_executable("some.cgi"))
 virtual("some.cgi");
 else
 echo "Not executable";

 some.cgi is found and is executable but the following occurs when
 attemping to execute via virtual():

 Warning: Unable to include 'some.cgi' - request execution failed in
 [path to php page]

1. Are you running PHP as a Module?  If not, and PHP is itself running as a
CGI, virtual() simply cannot be used.  Solution: Use exec() (or system()
or...)

2. Path issues:  Try providing the full path to your CGI from the machine's
root file-system and/or from DOCUMENT_ROOT.  I'm not sure if virtual() uses
the include path, the current directory, or what, but you can never go wrong
with an absolute full pathname.  Well, until you try to move from one server
to another.  But you can get it to work for now, and then try variations on
altering include_path and suchlike later.

--
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] CGI vs PHP

2001-02-03 Thread Alain Fontaine

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 PROTECTED]
 Can anyone tell how good is PHP when compared to CGI in handling flat file
 database. Can we handle flat files on PHP?

 Thanks



 --
 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] CGI vs PHP

2001-02-03 Thread phpLover

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?

- Original Message -
From: "Alain Fontaine" [EMAIL PROTECTED]
Newsgroups: php.general
Sent: 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] a écrit dans le message news:
 95hl5r$1su$[EMAIL PROTECTED]
  Can anyone tell how good is PHP when compared to CGI in handling flat
file
  database. Can we handle flat files on PHP?
 
  Thanks
 
 
 
  --
  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]


"Alain Fontaine" [EMAIL PROTECTED] wrote in message
95hmg3$est$[EMAIL PROTECTED]">news:95hmg3$est$[EMAIL PROTECTED]...
 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 PROTECTED]
  Can anyone tell how good is PHP when compared to CGI in handling flat
file
  database. Can we handle flat files on PHP?
 
  Thanks
 
 
 
  --
  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]




-- 
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] CGI vs PHP

2001-02-03 Thread Steve Werby

"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 that can
run as a CGI.  PHP installed as an Apache module will in general run scripts
faster than a Perl CGI or PHP CGI.  PHP works great for file handling
scripts, though as your files grow you'll probably want to consider using
databases instead of flat files.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.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] CGI and PHP

2001-01-25 Thread John Meredith

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 files.
 
 (I've looked up virtual () in the manual but can't make head nor tail
 of it).
 
 Many thanks,
 
 Dave Stewart
 
 
 -- 
 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]

-- 
John "Neutiquam erro" Meredith [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]