php-windows Digest 14 Nov 2001 10:53:09 -0000 Issue 853

Topics (messages 10383 through 10392):

Re: PHP 4.0.6 + Apache 1.3.22 + WinNT 4
        10383 by: Ross Fleming

Re: Changing the default user
        10384 by: Erik H. Mathy
        10386 by: Alan Brown
        10387 by: Phil Driscoll

Re: $PHP_AUTH_USER
        10385 by: morten

getrusage() not supported
        10388 by: Daniel Berwig

FDF support
        10389 by: Mainolfi, Joe

FDF setup
        10390 by: Mainolfi, Joe

upload on win2k ->enctype="multipart/form-data" hides variables
        10391 by: DaNuPaPa

Hello again...THIS WILL HELP YOU!!!
        10392 by: this_really_works.l.com

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 ---
No.  Have you copied php4ts.dll to winnt/system32 as well?  It won't
work otherwise.  What error you getting?

R

Ermanno Iannacci wrote:
> 
> I did this, but do I have to load some .c file?
> 
> ----- Original Message -----
> From: "Ross Fleming" <[EMAIL PROTECTED]>
> To: "Ouster" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 11:40 PM
> Subject: RE: [PHP-WIN] PHP 4.0.6 + Apache 1.3.22 + WinNT 4
> 
> >     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]
> >
> >
> >
> >
> 
> _________________________________________________________
> 
> Do You Yahoo!?
> 
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> --
> 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 ---
Hi Daniel!

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

I was looking into this recently myself. You'd think this would be an easy,
logical thing to do. Unfortunately, I could not find any solutions. I looked
in  the MSDN Library and everywhere I could on the 'net.

If I do find anything, I'll make sure to let you know.

- Erik



--- End Message ---
--- Begin Message ---
It is actually quite simple:

Solution 1) Put ACLs on the .php files and IIS will request authentication.
After authentication, the script runs as the authenticated user.

If this is not desirable:

Solution 2) Go into the configuration for the the site (or virtual
directory) and select the "Directory Security" tab, Edit the "Anonymous
access and authentication control" settings, and chnagethe anonymous user
name and supply a password. This solution requires some up front thought.
You may not want the entire site to use a privileged account - so perhaps
this needs to be on just a virtual subtree of the site.

Or a particularly bad solution:

Solution 3) There are ways to change users with tools such as "su" - but
this forces PHP to be in CGI mode and the need for clear text passwords in
an on disk file somewhere and that will almost certainly not be desirable.

Alan.

----- Original Message -----
From: "Erik H. Mathy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 10:45
Subject: RE: [PHP-WIN] Changing the default user


> Hi Daniel!
>
> > Can anyone tell me how to run php.exe as a user other than
> > IUSR_<server>?
>
> I was looking into this recently myself. You'd think this would be an
easy,
> logical thing to do. Unfortunately, I could not find any solutions. I
looked
> in  the MSDN Library and everywhere I could on the 'net.
>
> If I do find anything, I'll make sure to let you know.
>
> - Erik
>
>
>
>
> --
> 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 ---
On Tuesday 13 November 2001 5:36 pm, Alan Brown wrote:
> It is actually quite simple:
>
> Solution 1) Put ACLs on the .php files and IIS will request authentication.
> After authentication, the script runs as the authenticated user.
>
Note that you'll have to tick the 'check file exists' box in the script 
mapping dialog for this to work.

Cheers
-- 
Phil Driscoll
--- End Message ---
--- Begin Message ---
"Ross Fleming" <[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well it seemed to me that the $PHP_ variables were always set, just
> sometimes blank.  Yes it's possible at php.net, it's where I got most of
> the answer for.  I just used a bit of logic and searched for "empty" in
> the function list, and it came up with that function.  The best way to
> do it, I would say, is to download the pdf version of the manual (quite
> a hefty download, but worth it) and search it for terms you think will
> help u.  (ie searching for empty cos I knew I was looking for a function
> that would tell me if a variable was empty or not)

Thank's for the advise. I will follow it. Sometimes it's a bit dificult to
use the logic if one is not used to the programming language, but this
could be a sted futher...

> As to your script, it looks to me as if that will allow you to have a
> blank password, haven't tried it yet though, just at a first glance
> that's my opinion.  I'd also use a database lookup instead of a text
> file to hold the usernames and passwords.  a) more secure and b) easier
> to control users.

It's true. The script allows a blank password. I will have to work more
with the script. In the end I planned to do the database lookup.

Morten

> Ross
>
> morten wrote:
> >
> > Hi again,
> >
> > Cool, where do you find out those things. (emty instead of !isset). Is
it
> > possible at php.net?
> > Meantime I also find som exsamples at webmonkey.org. They turn out to
> > be good. And they - use 'isset'
> >
> > <?php
> > // File Name: auth03.php
> > // Check to see if $PHP_AUTH_USER already contains info
> > if (!isset($PHP_AUTH_USER)) {
> >   // If empty, send header causing dialog box to appear
> >   header('WWW-Authenticate: Basic realm="My Private Stuff"');
> >   header('HTTP/1.0 401 Unauthorized');
> >   exit;
> > } else if (isset($PHP_AUTH_USER)) {
> >   // If non-empty, open file containing valid user info
> >   $filename = "text.txt";
> >   $fp = fopen($filename, "r");
> >   $file_contents = fread($fp, filesize($filename));
> >   fclose($fp);
> >   // Place each line in user info file into an array
> >   $line = explode("\n", $file_contents);
> >   // For as long as $i is <= the size of the $line array,
> >   // explode each array element into a username and password pair
> >   $i = 0;
> >   while($i <= sizeof($line)) {
> >     $data_pair = explode(":", $line[$i]);
> >     if (($data_pair[0] == "$PHP_AUTH_USER") && ($data_pair[1] ==
> > "$PHP_AUTH_PW")) {
> >       $auth = 1;
> >       break;
> >     } else {
> >       $auth = 0;
> >     }
> >     $i++;
> >   }
> >   if ($auth == "1") {
> >     echo "<P>You're authorized!</p>";
> >     exit;
> >   } else {
> >     header('WWW-Authenticate: Basic realm="My Private Stuff"');
> >     header('HTTP/1.0 401 Unauthorized');
> >     echo 'Authorization Required.';
> >     exit;
> >   }
> > }
> > ?>
> >
> > Morten


--- End Message ---
--- Begin Message ---
I'm trying to run a script in my server (IIS 5) that uses the function
getrusage(), but it returns the following warning:

Warning: getrusage() is not supported in this PHP build in file_name.php on
line 377

Does anyone know how I can solve this problem?

Thanks in advance.


--- End Message ---
--- Begin Message ---
I have a PDF form with a submit button to send it to a url where my php
script is supposed to take the fdf data and parse it , but my script is
erroring i get this : 
 Warning: Could not open fdf document: test.fdf in
c:\inetpub\wwwroot\fdf\index.php on line 12

Can anyone help?
__________________________________________________   
Joseph D. Mainolfi Jr.
IT Specialist
American Bridge Company
1000 American Bridge Way
Coraopolis, PA 15108
(412) 631-1018 phone
(412) 631-2000 fax
[EMAIL PROTECTED]
http://www.americanbridge.net

--- End Message ---
--- Begin Message ---
I am using FDF and it isn't recognizing any of the functions for it the
errors I get are as follows:

Warning: Could not open fdf document: test.fdf in
c:\inetpub\wwwroot\fdf\index.php on line 12

Warning: Supplied argument is not a valid fdf resource in
c:\inetpub\wwwroot\fdf\index.php on line 13
The name field has the value ''

Warning: Could not open fdf document: test.fdf in
c:\inetpub\wwwroot\fdf\index.php on line 16

Warning: Supplied argument is not a valid fdf resource in
c:\inetpub\wwwroot\fdf\index.php on line 17
The date field has the value ''

Warning: Supplied argument is not a valid fdf resource in
c:\inetpub\wwwroot\fdf\index.php on line 20

is this a config problem or am i doing something wrong in my code......can
provide code iif needed

help, please
__________________________________________________   
Joseph D. Mainolfi Jr.
IT Specialist
American Bridge Company
1000 American Bridge Way
Coraopolis, PA 15108
(412) 631-1018 phone
(412) 631-2000 fax
[EMAIL PROTECTED]
http://www.americanbridge.net

--- End Message ---
--- Begin Message ---
I'm trying the upload snippets of code found at php.net such as:

<form enctype="multipart/form-data"  method="post" action="upload.php" >
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>

followed by a php doc with this in it:

<?PHP
echo "Values submitted via POST method:<br>";
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
    echo "$key => $val<br>";
}
?>

The problem is that I can't get a value for $userfile whenever I use
enctype="multipart/form-data" in the form tag.  I have track vars on but
cannot get any variables to pass to the php doc once that enctype value is
put in the form tag.

Any suggestions?

Mike
TWD


--- End Message ---
--- Begin Message ---

GUESS WHAT....?

I MAKE $1000 or more EVERYDAY!
What's the secret you ask...?

FRESH LEADS 100% PRE-QUALIFIED SPECIFICALLY FOR YOUR COMPANY AND EXCLUSIVE TO YOU! 
NO Bull SHIT!

GUARANTEED RESULTS OVERNIGHT!!! AND WE PAY YOU $100 CASH PER REFERRAL!!!

CALL 512-267-9798 TODAY! AND WE WILL DOUBLE YOUR ORDER FREE!!!
OPEN 10:00 AM to 6:00 PM CST Monday-Friday
--- End Message ---

Reply via email to