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
Hi all,
ok, I have come up with an architecture to offer PHP to customers as a
CGI, and want to get some opinions to make sure I'm not missing any
glaring holes...
I've decided to use suPHP to fork off PHP CGI scripts as the user and
group. It seems to work pretty well, and I have tweaked su
Hi all,
ok, I want to re-post this so that more people might see it, cause there
has to be an answer somewhere...
When using the GCI version of PHP with apache, I need to be able to set
some of the php_admin_values that normally get set in the php.ini file
on the fly...
Since I am not usin
Jared wrote:
foo.php, I get "No input file specified." Instead of the standard 404
error. Is there a way to customize this?
Easy with Apache [1,2], with en ErrorDocument [1] directive.
Ex with this in a .htaccess (the FileInfo Override [3] is required)
containing this line:
ErrorDocument 404 /Lame
I'm running PHP as CGI instead of as an apache module because my hosting
1) suggests it and 2) this way I can compile my own PHP with whatever
options I want, including a custom php.ini.
Works great except when I load a page that doesn't exist, such as
foo.php, I get "No input file specified."
urt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 3:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP cgi
* Thus wrote Steve Douville:
> There used to be a way that stripped something from a PHP binary that
> drastically reduced the size of the cgi file. For the life of me, I
* Thus wrote Steve Douville:
> There used to be a way that stripped something from a PHP binary that
> drastically reduced the size of the cgi file. For the life of me, I can't
> remember and can't find it on google anywhere. Anyone know what it is?
You're looking for the 'strip' command
Curt
--
There used to be a way that stripped something from a PHP binary that
drastically reduced the size of the cgi file. For the life of me, I can't
remember and can't find it on google anywhere. Anyone know what it is?
TIA,
Steve
Hi there
we need to run php under another user account as we are setting up a
link with it to Qmail. Our plan is to use:
php-cgi+suexec for this. fastcgi may be an alternative and we are just
php-cgi+wondering if there is anything bad about using fastcgi for this?
Any help appreciated
Thanks
Hi there
we need to run php under another user account as we are setting up a
link with it to Qmail. Our plan is to use:
php-cgi+suexec for this. fastcgi may be an alternative and we are just
wondering if there is anything bad about using fastcgi for this?
Any help appreciated
Thanks
Ade
--
Hi,
I am having a lot of problems with any PHP routines that have to access
the filesystem - things like exec(), shell_exec(), system(), backticked
shell commands, copy(), move_uploaded_file() and so on.
I have a non-standard setup with CLI, CGI and mod_php all installed.
These scripts are usin
Hi,
I have here a problem for having the php-cgi binary in linux. I compiled php
with php-cli and php-cgi but after installation i can't find the php-cgi
binary, i only have the php-cli under /usr/local/bin/.
Any idea why? Please help..
here's what i've did:
'./configure' '--with-mysql' '--with
* Thus wrote Andrew Warner ([EMAIL PROTECTED]):
> I've never used php cgi version, and all the httacces configuration
> I've tried to map .phpc files to the php cgi binary hasn't worked
> right. I need an example htacces file or an example of a script
> header line with php location.
With cgi
My ISP hosted website uses the php apache module version, but I'm
trying to use php cgi version for the part of my site edit
application that actually creates and edits files on the site. This
will avoid all the permision and chmod hassle when php tries to
create and edit files. My ISP has plac
That worked like a charm. Thanks Chris. I've added this to my snippet
collection. :)
At 12:02 AM 7/24/2003, Chris Shiflett wrote:
--- CDitty <[EMAIL PROTECTED]> wrote:
> Thanks man. That got rid of the error, however it is not using the
> variable in the script.
You have to read them in. I th
--- CDitty <[EMAIL PROTECTED]> wrote:
> Thanks man. That got rid of the error, however it is not using the
> variable in the script.
You have to read them in. I think you can just loop through $argv, so something
like this will show you what PHP is receiving:
Hope that helps.
Chris
=
Be
Thanks man. That got rid of the error, however it is not using the
variable in the script. I can't run this via wget or the browser since
the importing files are rather large.
Any other ideas?
Chris
At 11:33 PM 7/23/2003, Chris Shiflett wrote:
--- CDitty <[EMAIL PROTECTED]> wrote:
> I have
--- CDitty <[EMAIL PROTECTED]> wrote:
> I have written a script that runs fine when I run it via the
> command line. However, when I tack on variables to the command
> line, I get an error.
>
> This works.
> php -q ./import.php
>
> This doesn't
> php -q ./import.php?feed=eastwood
I might be
I have written a script that runs fine when I run it via the command
line. However, when I tack on variables to the command line, I get an error.
This works.
php -q ./import.php
This doesn't
php -q ./import.php?feed=eastwood
This is the error that it returns - Could not open input file:
./i
Hi David--
If that is the issue then I would suggest looking into the suexec module
for Apache...as long as you're very careful with the permissions, you
should be fine!
Also, my reference to the code was more a "caveat" than anything else.
In your case, if the script was working from the sell,
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 i
Hi Marco
Thanks for the tips, they were what I was thinking was the problem, that
even when the php cgi was owned by the correct user, that if it was being
called via another web based script, that it would be executed as apache (in
this case) rather than the actual owner of the cgiscript (vpopma
Without seeing your code... only one guess: what are the permissions on
the file like? When you're running the script from the web server,
you're running it as the user under which the web server is running
(usually nobody or apache if you're using Apache on Linux), and this
causes problem if that
>We have some cases where we run PHP as a standalone executable for scripting
>certain processes that can be called from CRON, and we also have PHP for
>Apache. Does the php.ini affect both? Specifically script times?
Only if you compiled it with the exact same settings for that one --xxx-dir
I c
Hi,
I have a RH 7.2 server with php 4.1.2 installed as a CGI.
I'm trying to run this script
#!/usr/local/phpcgi/bin/php -q
I get this as output:
[root@dev bin]# ./test.php
Error in argument 1, char 3: option not found
Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s [-
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
Can someone confirm the following that was sent to me by my hosting provider. If have
php script file that can not be found throwing 500 errors instead of 404 errors.
~~
Because PHP-CGI is a little strange, you (as far as I know) apparently
can't set up any so
On Sunday, March 17, 2002, at 10:07 PM, David Duong wrote:
> Can PHP be considered CGI?
>
> Would PHP replace Perl as the main language of CGI?
Unless you are specifically referring to Common Gateway Interface, the
term "CGI" should be deprecated in favor of the term "server-side
scripting l
> Who knows? It might. Its use is growing rapidly, and it's much easier to
> learn. A few years ago the prospect would have been unthinkable, due to
> the vastly greater supply of Perl CGI web apps and free libraries in
> circulation. These days the advantage is not so strong. And PHP is far
>
On Sun, 17 Mar 2002, David Duong wrote:
> I mean any time you hear the word CGI it is rarely referring to PHP, always
> Perl (My most comfortable Web language). You'd think that CGI only refers
> to Perl.
Back in the day, CGI repositories had a greater representation of programs
written in C an
arch 18, 2002 3:47 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP CGI
I mean any time you hear the word CGI it is rarely referring to PHP, always
Perl (My most comfortable Web language). You'd think that CGI only refers
to Perl.
If you goto a site and download scripts under category CG
I mean any time you hear the word CGI it is rarely referring to PHP, always
Perl (My most comfortable Web language). You'd think that CGI only refers
to Perl.
If you goto a site and download scripts under category CGI you would be
downloading Perl scripts, PHP has its own category.
Should CGI s
On Sun, 17 Mar 2002, David Duong wrote:
> Can PHP be considered CGI?
Sometimes.
CGI is a standardized interface between web servers and backend
applications. PHP can communicate with web servers using that mechanism,
but it doesn't have to (depends on the web server in use).
I think the probl
where still using
it.
-Original Message-
From: David Duong [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP CGI
Can PHP be considered CGI?
Would PHP replace Perl as the main language of CGI?
--
PHP General Mailing List (http://www.php.
Hi All,
Just need a bit of help on an issue i currently have. I have a php
script that is being called like a cgi and am trying to read stdin so that
i can get the raw http data that is being passed to apache. My problem is
that it all works fine outside the web environment but as soon as
At 03:54 PM 11/21/2001 +, Caspar Kennerdale wrote:
>I have a script that when I execute via a browser retrieves information.
>
>Ultimately I want this automated. There has been mention on these lists
>about compliling php as cgi, which I think may help
I saw the following somewhere and saved
Brian Clark wrote:
> way you'd configure a cgi-bin for perl-cgi scripts, but I don't know
> if running php as an apache module AND as a cgi is going to fly.
PHP as both CGI and Module on the same box works just fine.
In fact, using multiple mime types and file extensions, you can have as
many
Thanks I'll give it a go
-Original Message-
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 16:26
To: PHP is not a drug.
Subject: Re: [PHP] php- cgi
Hi Caspar,
@ 11:11:25 AM on 11/21/01, Caspar Kennerdale wrote:
> yes ideally with cron- I know
Hi Caspar,
@ 11:11:25 AM on 11/21/01, Caspar Kennerdale wrote:
> yes ideally with cron- I know nothing about it really other than a
> little bit i've read- but my isp says they can execute a perl file
> and not a php file via cron.
ISP's can be strange about that stuff, but it's understandable
automation issue
thanks
-Original Message-
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 16:04
To: PHP is not a drug.
Subject: Re: [PHP] php- cgi
Hi Caspar,
@ 10:54:13 AM on 11/21/01, Caspar Kennerdale wrote:
> I have a script that when I execute
Hi Caspar,
@ 10:54:13 AM on 11/21/01, Caspar Kennerdale wrote:
> I have a script that when I execute via a browser retrieves information.
> Ultimately I want this automated. There has been mention on these lists
> about compliling php as cgi, which I think may help
By automated do you mean wi
I have a script that when I execute via a browser retrieves information.
Ultimately I want this automated. There has been mention on these lists
about compliling php as cgi, which I think may help
This also may help out with some timeout issues that arise.
can anyone point me in the right dire
i have .htaccess on root of my web:
ErrorDocument 400 /e.php
ErrorDocument 401 /e.php
ErrorDocument 403 /e.php
ErrorDocument 404 /e.php
ErrorDocument 500 /e.php
When i try get via http an nonexisten html document : noneasdfaasd.html i
got result of e.php script.
When i try to get nonexisten dfsd
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
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
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
I got the correct info page, but with the #!/usr/local/bin/php a
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
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 exampl
php4 "php excicution file location"
> AddType application/x-httpd-php4 .php
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> > Of Maroufski
> > Sent: Thursday, March 22, 2001 5:41 PM
> > To: [EMAIL PROTECTED]
Of Maroufski
> Sent: Thursday, March 22, 2001 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP/CGI Help
>
>
> Hi all,
> This is a tough one, wasn't able to find a solution so far. But
> I hope that someone can help me out
> or point me in the right directio
do .php files work anywhere else?
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Maroufski
> Sent: Thursday, March 22, 2001 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP/CGI Help
>
>
> Hi all,
> This
Hi all,
This is a tough one, wasn't able to find a solution so far. But
I hope that someone can help me out
or point me in the right direction.
Here is what I got:
/src contains a bunch of cgi scripts that require apache to have an
entry like this
ScriptAlias /src "/home/src/"
When I try t
e Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Sent: Friday, February 23, 2001 1:18 PM
> Subject: [PHP] php (cgi version) with Apache
IF you dont specify --with-apache or --with-apxs configure options you will build the
CGI !
- Frank
>Ok, I give up... how do I build PHP as a CGI-Binary? I've spent two days
>searching the configure file for this.
>
>Julia
>
>--
>[ Julia Anne Case ] [Ships are safe inside the harb
Ok, I give up... how do I build PHP as a CGI-Binary? I've spent two days
searching the configure file for this.
Julia
--
[ Julia Anne Case ] [Ships are safe inside the harbor, ]
[Programmer at large] [ but is that what ships are really for.]
[ Admining Linux ] [
c.com/volunteer.htm
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Friday, February 23, 2001 1:18 PM
Subject: [PHP] php (cgi version) with Apache and suexec - help
>
> I've been trying to get the cgi version of php working with Apache and
>
I've been trying to get the cgi version of php working with Apache and
suexec but so far I have not had much success. I've installed the Apache
module version of php and it seems to work fine. I then installed the
cgi version of php and it too seems to work fine as long as it
doesn't run throug
The solution ended up being the need to re-compile php with the
"--enable-discard-path" configure option. This removed the
"#!/usr/local/bin/php" line from the top of the file.
Thanks for the feedback.
Tim
Tim Livers wrote:
> I have installed the CGI version of PHP and customized Apache's
> h
I have installed the CGI version of PHP and customized Apache's
httpd.conf. (Had to use CGI for this instance).
Since I only need (and want) a few php scripts to be available on this
server, I added the following line to httpd.conf in order to get my
script to work.
ScriptAlias /myfile.php /loca
59 matches
Mail list logo