php-windows Digest 13 Nov 2001 02:41:57 -0000 Issue 851

Topics (messages 10358 through 10368):

Re: PHP4 and IIS 5.1 Issues...
        10358 by: Phil Driscoll

Re: Instalation Problem
        10359 by: PHPGalaxy.com
        10360 by: Phil Driscoll
        10361 by: PHPGalaxy.com

Re: $PHP_AUTH_USER
        10362 by: morten
        10366 by: Ross Fleming

W2K SP2 MDAC 2.5
        10363 by: ckieninger

PHP 4.0.6 + Apache 1.3.22 + WinNT 4
        10364 by: Ouster
        10367 by: Ross Fleming

Include files seem sqiffy
        10365 by: user.domain.invalid

Changing the default user
        10368 by: Daniel Parsons

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 ---
I think you are just suffering from the usual php isapi module instability. 
Either switch to using php as a cgi or, if you must use php as a module, 
change from IIS to apache.

Cheers
-- 
Phil Driscoll
--- End Message ---
--- Begin Message ---
I use to get this too, from the EXE version of php. I've never used IIS, but see
if IIS can handle ISAPI extensions, and read up to figure out how to use the
ISAPI php instead (uses php4isapi.dll, as opposed to php.exe)

 - Tim

--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/


--- End Message ---
--- Begin Message ---
On Monday 12 November 2001 11:08 am, PHPGalaxy.com wrote:
> I use to get this too, from the EXE version of php. I've never used IIS,
> but see if IIS can handle ISAPI extensions, and read up to figure out how
> to use the ISAPI php instead (uses php4isapi.dll, as opposed to php.exe)

I wouldn't go down the ISAPI route. php.exe is super stable, php4isapi.dll is 
likely to be unreliable.
-- 
Phil Driscoll
--- End Message ---
--- Begin Message ---
Actually it is, for certain functions. I have it runnign on a Compaq on Win2k
with Sambar Server, any time phpinfo() is called, click! instantly shuts the
computer off. also happens with one older version of phpMyAdmin. But, if php.exe
absolutely won't work, and you *have* to get it running on Win2k, it's worth a
shot. Just be careful. =)

Phil Driscoll wrote:

> On Monday 12 November 2001 11:08 am, PHPGalaxy.com wrote:
> > I use to get this too, from the EXE version of php. I've never used IIS,
> > but see if IIS can handle ISAPI extensions, and read up to figure out how
> > to use the ISAPI php instead (uses php4isapi.dll, as opposed to php.exe)
>
> I wouldn't go down the ISAPI route. php.exe is super stable, php4isapi.dll is
> likely to be unreliable.
> --
> Phil Driscoll
>
> --
> PHP Windows 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]

--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/


--- End Message ---
--- Begin Message ---
Hi,

Yes the first one worked, but now I'm having trouble withe this one.
How come? All these headers and $ have been a bit buggy...

<?php
if ((!isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))) {
    header( 'WWW-Authenticate: Basic realm="Private"' );
    header( 'HTTP/1.0 401 Unauthorized' );
    echo 'Authorization Required.';
    exit;
} else {
    echo "You entered $PHP_AUTH_USER for a username.<BR>";
    echo "You entered $PHP_AUTH_PW for a password.<BR>";
}
?>

Morten

"Morten" <[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Ross,
>
> Thanks a LOT. It worked when I shifted to the LoadModule script.
>
> In all the danish sites where they wrote about php/apache they use the old
> script. How come if it is not working with headers?
>
> Morten
>
> "Ross Fleming" <[EMAIL PROTECTED]> skrev i en meddelelse
> news:[EMAIL PROTECTED]...
> > You haven't installed it as an apache module.  I double checked.  To see
> if
> > I'm right, just create a php script with this in it:
> > <?
> > getallheaders();
> > ?>
> >
> > If it says "call to undefined function" when u view it in explorer then
do
> > the following.
> >
> > Copy php4ts.dll to windows/system or winnt/system32 or whatever one is
> > applicable.
> >
> > Edit your httpd.conf and delete:
> >    ScriptAlias /php/ "c:/php/"
> >    AddType application/x-httpd-php .php
> >    Action application/x-httpd-php "/php/php.exe"
> > wherever it might be and type this in its place:
> >
> >    LoadModule php4_module c:/php/sapi/php4apache.dll
> >    AddType application/x-httpd-php .php
> >
> > making sure of course, that c:/php is where you've got php installed.
> >
> > Restart apache and hey presto..
> >
> > Ross
> >
> > -----Original Message-----
> > From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > Sent: 11 November 2001 22:14
> > To: Morten [Achtung]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > OK, having run the same script, I'm getting a 500 as well, still not
sure
> > why, but I know the cause.  Take out
> >     header("HTTP/1.0 401 Unauthorized");
> > and it works.  I really don't know why this doesn't work though, so
> anyone,
> > know why
> >
> > header("HTTP/1.0 401 Unauthorised");  causes an internal server error?..
> >
> >
> > Ross
> >
> > -----Original Message-----
> > From: Morten [Achtung] [mailto:[EMAIL PROTECTED]]
> > Sent: 11 November 2001 17:35
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: SV: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > I am not running it as a CGI script.
> > It's install on my computer together with Apache.
> >
> > I tried several script's but the don't work. Do I have to work
> > with the php.ini file or?
> >
> > Morten
> >
> > -----Oprindelig meddelelse-----
> > Fra: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > Sendt: 11. november 2001 17:24
> > Til: morten; [EMAIL PROTECTED]
> > Emne: RE: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > How are you using PHP with the webserver?  If you're running it as a CGI
> > script then you can't access those variables
> >
> > Ross
> >
> > -----Original Message-----
> > From: morten [mailto:[EMAIL PROTECTED]]
> > Sent: 11 November 2001 14:55
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > Hi,
> >
> > I am trying to find out how to use $PHP_AUTH_USER. The problem is
> > that I don't progress because of an 'Internal Server Error'. I tried
> > this
> > script
> > from php.net:
> >
> > <?php
> >   if(!isset($PHP_AUTH_USER)) {
> >     header("WWW-Authenticate: Basic realm=\"My Realm\"");
> >     header("HTTP/1.0 401 Unauthorized");
> >     echo "Text to send if user hits Cancel button\n";
> >     exit;
> >   } else {
> >     echo "<p>Hello $PHP_AUTH_USER.</p>";
> >     echo "<p>You entered $PHP_AUTH_PW as your password.</p>";
> >   }
> > ?>
> >
> > But the only answer is this: Internal Server Error. Is it the php.ini
> > file
> > that's not
> > configured well, or..?
> >
> > Morten
> >
> >
> >
> > --
> > PHP Windows 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 Windows 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]
> >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
<?php
if (empty($PHP_AUTH_USER) || empty($PHP_AUTH_PW)) {
    header( 'WWW-Authenticate: Basic realm="Private"' );
    header( 'HTTP/1.0 401 Unauthorized' );
    echo 'Authorization Required.';
    exit;
} else {
    echo "You entered $PHP_AUTH_USER for a username.<BR>";
    echo "You entered $PHP_AUTH_PW for a password.<BR>";
}
?>

-----Original Message-----
From: morten [mailto:[EMAIL PROTECTED]]
Sent: 12 November 2001 17:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] $PHP_AUTH_USER


Hi,

Yes the first one worked, but now I'm having trouble withe this one.
How come? All these headers and $ have been a bit buggy...

<?php
if ((!isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))) {
    header( 'WWW-Authenticate: Basic realm="Private"' );
    header( 'HTTP/1.0 401 Unauthorized' );
    echo 'Authorization Required.';
    exit;
} else {
    echo "You entered $PHP_AUTH_USER for a username.<BR>";
    echo "You entered $PHP_AUTH_PW for a password.<BR>";
}
?>

Morten

"Morten" <[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Ross,
>
> Thanks a LOT. It worked when I shifted to the LoadModule script.
>
> In all the danish sites where they wrote about php/apache they use the old
> script. How come if it is not working with headers?
>
> Morten
>
> "Ross Fleming" <[EMAIL PROTECTED]> skrev i en meddelelse
> news:[EMAIL PROTECTED]...
> > You haven't installed it as an apache module.  I double checked.  To see
> if
> > I'm right, just create a php script with this in it:
> > <?
> > getallheaders();
> > ?>
> >
> > If it says "call to undefined function" when u view it in explorer then
do
> > the following.
> >
> > Copy php4ts.dll to windows/system or winnt/system32 or whatever one is
> > applicable.
> >
> > Edit your httpd.conf and delete:
> >    ScriptAlias /php/ "c:/php/"
> >    AddType application/x-httpd-php .php
> >    Action application/x-httpd-php "/php/php.exe"
> > wherever it might be and type this in its place:
> >
> >    LoadModule php4_module c:/php/sapi/php4apache.dll
> >    AddType application/x-httpd-php .php
> >
> > making sure of course, that c:/php is where you've got php installed.
> >
> > Restart apache and hey presto..
> >
> > Ross
> >
> > -----Original Message-----
> > From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > Sent: 11 November 2001 22:14
> > To: Morten [Achtung]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > OK, having run the same script, I'm getting a 500 as well, still not
sure
> > why, but I know the cause.  Take out
> >     header("HTTP/1.0 401 Unauthorized");
> > and it works.  I really don't know why this doesn't work though, so
> anyone,
> > know why
> >
> > header("HTTP/1.0 401 Unauthorised");  causes an internal server error?..
> >
> >
> > Ross
> >
> > -----Original Message-----
> > From: Morten [Achtung] [mailto:[EMAIL PROTECTED]]
> > Sent: 11 November 2001 17:35
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: SV: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > I am not running it as a CGI script.
> > It's install on my computer together with Apache.
> >
> > I tried several script's but the don't work. Do I have to work
> > with the php.ini file or?
> >
> > Morten
> >
> > -----Oprindelig meddelelse-----
> > Fra: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > Sendt: 11. november 2001 17:24
> > Til: morten; [EMAIL PROTECTED]
> > Emne: RE: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > How are you using PHP with the webserver?  If you're running it as a CGI
> > script then you can't access those variables
> >
> > Ross
> >
> > -----Original Message-----
> > From: morten [mailto:[EMAIL PROTECTED]]
> > Sent: 11 November 2001 14:55
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] $PHP_AUTH_USER
> >
> >
> > Hi,
> >
> > I am trying to find out how to use $PHP_AUTH_USER. The problem is
> > that I don't progress because of an 'Internal Server Error'. I tried
> > this
> > script
> > from php.net:
> >
> > <?php
> >   if(!isset($PHP_AUTH_USER)) {
> >     header("WWW-Authenticate: Basic realm=\"My Realm\"");
> >     header("HTTP/1.0 401 Unauthorized");
> >     echo "Text to send if user hits Cancel button\n";
> >     exit;
> >   } else {
> >     echo "<p>Hello $PHP_AUTH_USER.</p>";
> >     echo "<p>You entered $PHP_AUTH_PW as your password.</p>";
> >   }
> > ?>
> >
> > But the only answer is this: Internal Server Error. Is it the php.ini
> > file
> > that's not
> > configured well, or..?
> >
> > Morten
> >
> >
> >
> > --
> > PHP Windows 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 Windows 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 Windows 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]



--- End Message ---
--- Begin Message ---
hey,

does anybody knows why database modules are not loadable with W2K SP2 MDAC
2.5?

Christian

[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Do I need all the lines that load .c files?
Is it not enough to load only .so files?
I receive an error, after I wrote LoadModule php4, because there is a 
ClearModuleList instruction that (I think) removes what I loaded.

Thanks

--- End Message ---
--- Begin Message ---
    LoadModule php4_module c:/php/sapi/php4apache.dll
    AddType application/x-httpd-php .php

not php4.

-----Original Message-----
From: Ouster [mailto:[EMAIL PROTECTED]]
Sent: 12 November 2001 21:49
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP 4.0.6 + Apache 1.3.22 + WinNT 4


Do I need all the lines that load .c files?
Is it not enough to load only .so files?
I receive an error, after I wrote LoadModule php4, because there is a 
ClearModuleList instruction that (I think) removes what I loaded.

Thanks


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



--- End Message ---
--- Begin Message ---
I am trying to install a php/mysql board but get warnings about 
Undefined variable: .
It appears to be linked to the use of include files. Are these somewhat 
different under Doze? I'm a bit of a newbie with php but it does appear 
  some php code needs tweaking to work in windows.
Any pointers greatfully accepted!

--- End Message ---
--- Begin Message ---
Can anyone tell me how to run php.exe as a user other than
IUSR_<server>?

I want to write a script that displays a partial (filtered) directory
listing to any user that arrives at the site but we also need to have
IIS authenticated access to the whole directory so I can't give the
anonymous Internet user read permissions on the directory (or else
anyone can just come along and read everything) and the script won't run
properly without them.

Thanks,
D.

---
Daniel Parsons
IML Network Ltd.
L1 93-95 Cambridge Tce
PO Box 4076, Christchurch
New Zealand
+64 3 366 9936
+64 21 432 402 (Mobile)
+64 3 377 3578 (Fax)
[EMAIL PROTECTED]


--- End Message ---

Reply via email to