php-windows Digest 2 May 2002 10:01:29 -0000 Issue 1123
Topics (messages 13465 through 13481):
Running PHP as CGI
13465 by: Matt Babineau
13466 by: Christoph Grottolo
13468 by: Shane Caraveo
13470 by: Robin Bolton
13471 by: Shane Caraveo
Re: Php on windows - Linux and Windows Editors
13467 by: Scott Hurring
Re: Question installing and running php
13469 by: Scott Hurring
again little problem
13472 by: Erik
Re: php won't "process" forms anymore
13473 by: Rubén Gutiérrez
13474 by: Matt Parlane
13480 by: toby z
printer_set_option
13475 by: James Earl
Re: php and apache 2.0 on windows installed ok?
13476 by: Matt Waite
13477 by: Alan Popow
Re: Cant get PHP to run on Win 98
13478 by: Steve Yates
PHP and Java
13479 by: Opere, James
troublesome exec
13481 by: Michael Langford
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
For stability reasons I am running PHP as a CGI on my production server
win2k/IIS5. v4.2 of PHP. How bad is the performance hit running PHP as a
CGI and not ISAPI? Will it bog down my server with a light traffic load?
How much worse can running php with the .exe be?
Matt Babineau
Freelance Internet Developer
e: <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]
p: 603.943.4237
w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
--- End Message ---
--- Begin Message ---
"Matt Babineau" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
009f01c1f149$f2d0a070$fca86389@developerx">news:009f01c1f149$f2d0a070$fca86389@developerx...
> For stability reasons I am running PHP as a CGI on my production server
> win2k/IIS5. v4.2 of PHP. How bad is the performance hit running PHP as a
> CGI and not ISAPI? Will it bog down my server with a light traffic load?
> How much worse can running php with the .exe be?
We're running a quite big website with intensive use of php as cgi on
iis5/w2k. We've never had notable performance problems.
If you want to know exactly - install both and run some load tests...
Christoph
--- End Message ---
--- Begin Message ---
*Significant* difference between CGI and ISAPI. But you can get a
4x-10x performance increase over CGI by using fastcgi, while maintaining
stability and gaining persistent resources (db connections). I have to
make a 4.2 fastcgi binary available, but info is at www.caraveo.com/fastcgi/
Shane
Matt Babineau wrote:
> For stability reasons I am running PHP as a CGI on my production server
> win2k/IIS5. v4.2 of PHP. How bad is the performance hit running PHP as a
> CGI and not ISAPI? Will it bog down my server with a light traffic load?
> How much worse can running php with the .exe be?
>
> Matt Babineau
> Freelance Internet Developer
> e: <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]
> p: 603.943.4237
> w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
>
>
>
--- End Message ---
--- Begin Message ---
Am I correct in assuming that there is no PHP fastcgi implementation for
Apache?
-----Original Message-----
From: Shane Caraveo [mailto:[EMAIL PROTECTED]]
Sent: May 1, 2002 14:15
To: 'Php-Win (E-mail)'
Subject: Re: [PHP-WIN] Running PHP as CGI
*Significant* difference between CGI and ISAPI. But you can get a
4x-10x performance increase over CGI by using fastcgi, while maintaining
stability and gaining persistent resources (db connections). I have to
make a 4.2 fastcgi binary available, but info is at www.caraveo.com/fastcgi/
Shane
Matt Babineau wrote:
> For stability reasons I am running PHP as a CGI on my production server
> win2k/IIS5. v4.2 of PHP. How bad is the performance hit running PHP as a
> CGI and not ISAPI? Will it bog down my server with a light traffic load?
> How much worse can running php with the .exe be?
>
> Matt Babineau
> Freelance Internet Developer
> e: <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]
> p: 603.943.4237
> w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
No, there is. You get mod_fastcgi from fastcgi.com, get phpfcgi.exe
from my site, and they should work together fine.
Robin Bolton wrote:
> Am I correct in assuming that there is no PHP fastcgi implementation for
> Apache?
>
>
> -----Original Message-----
> From: Shane Caraveo [mailto:[EMAIL PROTECTED]]
> Sent: May 1, 2002 14:15
> To: 'Php-Win (E-mail)'
> Subject: Re: [PHP-WIN] Running PHP as CGI
>
>
> *Significant* difference between CGI and ISAPI. But you can get a
> 4x-10x performance increase over CGI by using fastcgi, while maintaining
> stability and gaining persistent resources (db connections). I have to
> make a 4.2 fastcgi binary available, but info is at www.caraveo.com/fastcgi/
> Shane
>
> Matt Babineau wrote:
>
>>For stability reasons I am running PHP as a CGI on my production server
>>win2k/IIS5. v4.2 of PHP. How bad is the performance hit running PHP as a
>>CGI and not ISAPI? Will it bog down my server with a light traffic load?
>>How much worse can running php with the .exe be?
>>
>>Matt Babineau
>>Freelance Internet Developer
>>e: <mailto:[EMAIL PROTECTED]>
>>[EMAIL PROTECTED]
>>p: 603.943.4237
>>w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
>>
>>
>>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Sukhwinder Singh [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 6:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Php on windows - Linux and Windows Editors
>
>
> Hello,
> I don't know why people don't reply to questions related
> to compiling php on windows. If we want that php should run
> on every (including windows) platform we must help people who
> try to achieve that. We cannot depend on windows binary
> download provided at php.net because many of the extensions
> like ldap and imap are missing in that download(php 4.20).
> Every time a new windows download is available they decide to
> include a new extension and remove some other. Even if they
> include each extension I think developing on Linux is not as
> easy as on windows.
Have you installed Cygwin and tried compiling PHP with gcc?
> I haven't found a really good Editor for Linux which is as
> good as Editplus (http://www.editplus.com). Editor like
> editplus enables to compile any language source code with
> just a click of a button, enables context-sensitive help and
> syntax highlighting for any available language.
Try jEdit (v4.0) http://www.jedit.com/, it's the best
free editor i've ever found for any platform.
Since it's java, you might think that it is resource
hungry... but on my 600Mhz linux machine it runs
perfectly smooth. (On my 800Mhz windows, it drags,
go figure)
And i would also suggest Emacs, but if you're averse
to twisted keyboard shortcuts, stay far away ;-)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
--- End Message ---
--- Begin Message ---
httpd.conf does not have to be in the system dir,
and neither does php.ini.
my config has httpd.conf in C:\apache\conf\
and php.ini in C:\php-4.1.2\
works like a charm.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
> -----Original Message-----
> From: Steve Bradwell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 8:32 AM
> To: 'theN'; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: Question installing and running php
>
>
> I am fairly new to php to, when I did my first install, I had
> to learn how
> to set up the httpd.conf file and the php.ini file, also
> httpd.conf has to
> be in windows system dir. And after I finally figured that
> out, I realized
> that I had my php file named test.php.txt. HA!
>
> If this doesn't help then what do you have php running as,
> cgi or module?
>
> -Steve
>
> -----Original Message-----
> From: theN [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 8:09 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: Question installing and running php
>
>
> [EMAIL PROTECTED] (James Ku-Ok Chung) wrote in
> news:[EMAIL PROTECTED]:
>
> > hello,
> > I am having trouble with the php.
> >
> > on a apache 1.3.12 and php4 (also tried php3)
> >
> > and followed all the directions of .ini and stuff...
> >
> > when I run the sample php on the web browser.. I don't get
> what I want
> > but it appears <? phpinfo() ?> the script itself...
> >
> > meaning it doesn't run the script but it just shows me the
> script code
> > on the
> > browser.
> >
> > any hints of what I have done wrong?
> >
> > james
> > [EMAIL PROTECTED]
> >
> >
>
> I guess apache is not set up to parse PHP scripts. I would
> suggest that you
>
> please take a look at Apache's httpd.conf again.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
hi,
i run on my website a toplist build with php ther is an admin section but it
is not password protected so i wrote a user authentication script like this
<?php
$user = 'username';
$pass = 'pass';
$ip = getenv("REMOTE_ADDR");
if(!isset($PHP_AUTH_USER)){
Header("WWW-Authenticate:Basic realm=\"DelphiVillage\"");
Header("HTTP/1.0 401 Unauthorized");
echo "hi $ip do not hit the cancel button please.";
exit;
}else{
if(($PHP_AUTH_USER == 'username')&&
($PHP_AUTH_PW == 'pass'))
Header("Location:index.php");
else
print "he $ip what are you trying to do ?.";
}
?>
the scritpt works fine the password box pops up i fill in the correct values
click ok and then internet explorer 6 keeps on saying "website found waiting
for reply" it should redirect to "index.php" in the index.php files is
<?php
require("login.php");
?>
the rest is html coding
i think this is a bug in internet explorer i'll try netscape to see what
happens ..........
it keeps on saying website found waiting for reply ?
regards
Erik
--- End Message ---
--- Begin Message ---
On Wed, 1 May 2002 09:19:27 +0200
"Erik" <[EMAIL PROTECTED]> wrote:
> hi,
>
> when i have a page tht handles forms with php it doesn't work i don't get
> any error message it just shows me the same page over and over again i even
> added
> error_reporting(15); at the top of the script no luck windows always shows
> me the same page i may click submit a douzend of times it always show the
> same
>
> any solution for this issue ?
Are you, by any chance, using Internet Explorer 6?
Because I had a similar problem. I spent a whole day trying to figure
why some people was telling me that my forms wouldn't work with IE when
the site worked perfectly for me in Opera 6 and IE 5.0 (the one that
comes with Win2k). Then, I realized they all were using Windows XP,
which comes with IE 6. So I tried my site with IE 6 and the problem was
there... it seems that IE 6 caches pages a little too much (to make you
believe it is faster maybe?). I tried adding some headers to make sure
the browser didn't store the page in the cache, but it didn't work as
expected.
Then I tried something else:
Since the script with the form was the same script that processed the
form, it was calling itself with the ACTION parameter of the FORM tag,
so, I randomly added a number at the end of the script name in the FORM
tag, preceded by a question mark "?". So it would look like this:
<FORM action="myscript.php?498676" method="POST">
That way, you can fool IE into thinking it is a different page so it
actually sends the request to the server.
I know it's not the best solution, but it works.
Just a little note: this "problem" doesn't seem to exist in IE6 when you
use ASP pages.... was it a simple error/mistake? I think not....
Rubén Gutiérrez
--- End Message ---
--- Begin Message ---
http://www.php.net/release_4_2_0.php
Is this the problem you're experiencing?
"Erik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> when i have a page tht handles forms with php it doesn't work i don't get
> any error message it just shows me the same page over and over again i
even
> added
> error_reporting(15); at the top of the script no luck windows always shows
> me the same page i may click submit a douzend of times it always show the
> same
>
> any solution for this issue ?
>
> thanks
> Erik
>
>
--- End Message ---
--- Begin Message ---
hi
im having the same problem ....
i have even tried re-writting all the tags .... but it
still doesnt work ....
secondly .... i have to save the inputs from the form
fields in a ".xml" file .... i did that in asp ... i
dont know how to get about it in php .... the book
only talks bout writting a string to a file ... while
i have multiple stingz to b saved ....
will somebody help pleez ....
--- Erik <[EMAIL PROTECTED]> wrote: > hi,
>
> when i have a page tht handles forms with php it
> doesn't work i don't get
> any error message it just shows me the same page
> over and over again i even
> added
> error_reporting(15); at the top of the script no
> luck windows always shows
> me the same page i may click submit a douzend of
> times it always show the
> same
>
> any solution for this issue ?
>
> thanks
> Erik
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,
I've been working with the printer extension lately... for work, not for fun! I'm
running PHP
4.2.0, and Apache 1.3.24 on Windows 98.
I've been having problems exclusively with the printer_set_option function. It
doesn't seem to
have any effect on the printers settings.
$handle = printer_open();
printer_start_doc($handle, "My Document");
printer_start_page($handle);
if ($labelSize == "mail") {
printer_set_option($handle, PRINTER_PAPER_FORMAT, PRINTER_FORMAT_CUSTOM);
printer_set_option($handle, PRINTER_PAPER_LENGTH, ????);
printer_set_option($handle, PRINTER_PAPER_LENGTH, ???);
} elseif ($labelSize == "ship") {
printer_set_option($handle, PRINTER_PAPER_FORMAT, PRINTER_FORMAT_CUSTOM);
printer_set_option($handle, PRINTER_PAPER_LENGTH, ????);
printer_set_option($handle, PRINTER_PAPER_LENGTH, ???);
}
// Print stuff here...
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
This is basically what I'm trying to do. I know it get's into the if and elseif, then
it prints
using the settings that are set in the windows printer settings.
Any suggestions?
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
--- End Message ---
--- Begin Message ---
"Alan Popow" <[EMAIL PROTECTED]> wrote in message
>On Fri, 26 Apr 2002 16:35:30 -0400, you wrote:
>>Has anyone done this?
>>I just tried installing apache 2.0 (latest on their site) and the latest
php as a module for apache (not cgi), and found it doesnt seem to work.
>>
>>When apache starts, it says module not found.
>>
>>I know php is installed right, because the same php folder works under
apache vers 1.
>>
>>Anyone else had this problem?
>
>Are you loading the php4_module from the apache2filter dll in the
>'experimental' folder, or are you still pointing to the php4apache dll in
>the 'sapi' folder?
>
>If you're not using the apache2filter dll, change the loadmodule line in
>your httpd.conf file.
>
Thanks Alan. That worked a treat for me...!
The line I added was...
LoadModule php4_module C:/php/experimental/apache2filter.dll
Already included were...
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
and I also added index.php to the list of Directory indexes...
DirectoryIndex index.html index.html.var index.php
--- End Message ---
--- Begin Message ---
On Thu, 2 May 2002 09:59:21 +1000, you wrote:
>
>"Alan Popow" <[EMAIL PROTECTED]> wrote in message
>>On Fri, 26 Apr 2002 16:35:30 -0400, you wrote:
>
>>>Has anyone done this?
>>>I just tried installing apache 2.0 (latest on their site) and the latest
>php as a module for apache (not cgi), and found it doesnt seem to work.
>>>
>>>When apache starts, it says module not found.
>>>
>>>I know php is installed right, because the same php folder works under
>apache vers 1.
>>>
>>>Anyone else had this problem?
>>
>>Are you loading the php4_module from the apache2filter dll in the
>>'experimental' folder, or are you still pointing to the php4apache dll in
>>the 'sapi' folder?
>>
>>If you're not using the apache2filter dll, change the loadmodule line in
>>your httpd.conf file.
>>
>
>Thanks Alan. That worked a treat for me...!
>
>The line I added was...
>
>LoadModule php4_module C:/php/experimental/apache2filter.dll
>
>Already included were...
>AddType application/x-httpd-php .php
>AddType application/x-httpd-php-source .phps
>
>and I also added index.php to the list of Directory indexes...
>
>DirectoryIndex index.html index.html.var index.php
Great! I'm always gratified (and a little surprised) when it turns out I
actually got something right. ;)
Alan
--- End Message ---
--- Begin Message ---
Or alternatively
extract($HTTP_GET_VARS); // creates all GET vars, no others
echo $C;
- Steve Yates
- Omit needless, redundant, unnecessary, repetitive words.
/ Taglines by Taglinator - www.srtware.com /
--- End Message ---
--- Begin Message ---
I have downloaded JDK1.1.8 and installed on a windows platform.The problem
is that when i copy a script, paste and try to run as a .php which has some
java in it, i get an error i.e
Fatal error: Cannot instantiate non-existent class: java in
c:\phpdev\www\phpjava.php on line 5
The script is as below:
<?php
// Create an instance of the System object
// using PHP's Java class
$system = new Java("java.lang.System");
// Get the Java version
$version = $system->getProperty("java.version");
// Write it to the screen
echo("Java Version: $version");
?>
Can anybody help me out there how i should do my configuration so that this
can run? I tried making changes in php.ini but i still get the same error.Do
i need to install anothere java? If not, how then should i go about it?
--- End Message ---
--- Begin Message ---
I'm trying to run a program using exec but no matter what I do I keep
receiving a persistent unable to fork error.
I currently have:
exec("command.exe", $misspells);
which gives me an error, so tried
exec("cmd /c command.exe", $misspells); and even
exec("C:\WINNT\system32\cmd.exe /c command.exe", $misspells);
I tried setting execute permissions on the system32 folder and also have
execute permissions on the command.exe file. I am running PHP v2.1.0,
recently upgrading coz i heard there were unable to fork problems with
4.0.6. Can anyone help???
many thanks in advance
Mike
--- End Message ---