[PHP-WIN] Microsoft Access prepared statement with parameters problem

2001-03-03 Thread Chris Poirier

Hi there,

I'm attempting to execute prepared statements with parameters against an
Access 97 database, and am having some trouble.  I'm sure I'm missing
something really obvious, but I just can't see it, and I'm hoping someone
out there can help.

In the following code, assume that $connection holds a valid and otherwise
working connection to a database in which there exists a table named
System.  Column A is a text column.

$statement = odbc_prepare( $connection, "select * from System where A=?" );
if( odbc_execute( $statement, array( "MachineID" )))
{
  odbc_fetch_row( $statement );
  print odbc_result( $statement, "A" ) . "";
}


I have tried many variations on this code, and if there are any ? marks in
the query, regardless what I pass as the second parameter to
odbc_execute(), odbc_execute() always dies with the following message:

Warning:  SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT field
incorrect , SQL state 07001 in SQLExecute in ...


Can anyone tell me what I'm doing wrong?

Thanks, Chris.



-- 
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-WIN] Fwd: Req: Cash Offer!!

2001-03-03 Thread hollyjacobsemail77


hi there,
please take a moment to check out the newest cash offer.
cash is waiting for you!  Click Below 
Or copy the link and paste it in your browser

http://www.geocities.com/omega99/

-- 
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-WIN] Fwd: Req: Cash Offer!!

2001-03-03 Thread jannetfreebish67


Hey...Janet Here... We Haven't Talked In So Long!!  
How Have You Been?  Thought I would Forward you this email!

I usually delete these but I opened this one, like what I saw, 
and thought you would like to see this.

http://www.geocities.com/rush009900/

IF THE LINK IS NOT HIGHLIGHTED OR YOU CANNOT CLICK ON IT.
COPY AND PASTE IT IN YOUR BROWSER.









-- 
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-WIN] $PHP_SELF not producing the goods.

2001-03-03 Thread Jess Perez

Hi,
I am using
PHP4.0.4pl1 in cgi mode
Apache 1.3.14
WIN2000


I point my browser at www.domain.com/phpinfo.php  and the $PHP_SELF variable
to contains "/php/php.exe/phpinfo.php" instead of just "phpinfo.php".

Anyone know what is causing this and how to correct it?  The manual says it
is supposed to contain only "phpinfo.php"


--
Regards
Jess Perez




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




Re: [PHP-WIN] Microsoft Access prepared statement with parameters problem

2001-03-03 Thread Gonzalo Vera

Some possibilities:

> $statement = odbc_prepare( $connection, "select * from System where A=?" );

Probably you would be better off using single quotes in the condition,
since you are tryng to match strings, like:

$statement=odbc_prepare($connection,"select * from System where A='?'");
 here-^ ^

Also, I'm not sure that wildcards are allowed for string matching
unless you use "like":

$statement = odbc_prepare( $connection, "select * from System where A
like '?'" );

Inside access, wildcards are * and ?, but when invoked through ODBC, *
turns to %, and I think ? turns to _, but I'm not sure. Try the manual
on that.

And last, to eliminate possibilities, enclose any table or field names
that might by far chance be a reserved word, in sqare brackets. I
don't think that "A" is a reserved word, and am not sure about
"System", but just to make sure... and end your statement with a
semicolon. The final result would be:

$statement = odbc_prepare( $connection, "select * from [System] where
[A] like '?';" );

That, for syntax. But going further, "?" (or "_") is the single
character matching wildcard. Why would your comparison use only a
single character? If "A" is a single char field, use "like '%'", it
would be safer and probably faster. But, there might be the chance
that you're NOT trying to do a wildcard comparison, but are trying to
search for the literal "?". Then you would use your actual syntax, but
adding a backslash to escape the special char: "[A]='\?'".

Some wild shots... hope it works.
Gonzalo.



-- 
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 Digest 3 Mar 2001 15:49:14 -0000 Issue 472

2001-03-03 Thread php-windows-digest-help


php-windows Digest 3 Mar 2001 15:49:14 - Issue 472

Topics (messages 5801 through 5805):

Microsoft Access prepared statement with parameters problem
5801 by: Chris Poirier
5805 by: Gonzalo Vera

Re: Cash Offer!!
5802 by: hollyjacobsemail77.excelonline.com
5803 by: jannetfreebish67.juno.com

$PHP_SELF not producing the goods.
5804 by: Jess Perez

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]


--



Hi there,

I'm attempting to execute prepared statements with parameters against an
Access 97 database, and am having some trouble.  I'm sure I'm missing
something really obvious, but I just can't see it, and I'm hoping someone
out there can help.

In the following code, assume that $connection holds a valid and otherwise
working connection to a database in which there exists a table named
System.  Column A is a text column.

$statement = odbc_prepare( $connection, "select * from System where A=?" );
if( odbc_execute( $statement, array( "MachineID" )))
{
  odbc_fetch_row( $statement );
  print odbc_result( $statement, "A" ) . "";
}


I have tried many variations on this code, and if there are any ? marks in
the query, regardless what I pass as the second parameter to
odbc_execute(), odbc_execute() always dies with the following message:

Warning:  SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT field
incorrect , SQL state 07001 in SQLExecute in ...


Can anyone tell me what I'm doing wrong?

Thanks, Chris.






Some possibilities:

> $statement = odbc_prepare( $connection, "select * from System where A=?" );

Probably you would be better off using single quotes in the condition,
since you are tryng to match strings, like:

$statement=odbc_prepare($connection,"select * from System where A='?'");
 here-^ ^

Also, I'm not sure that wildcards are allowed for string matching
unless you use "like":

$statement = odbc_prepare( $connection, "select * from System where A
like '?'" );

Inside access, wildcards are * and ?, but when invoked through ODBC, *
turns to %, and I think ? turns to _, but I'm not sure. Try the manual
on that.

And last, to eliminate possibilities, enclose any table or field names
that might by far chance be a reserved word, in sqare brackets. I
don't think that "A" is a reserved word, and am not sure about
"System", but just to make sure... and end your statement with a
semicolon. The final result would be:

$statement = odbc_prepare( $connection, "select * from [System] where
[A] like '?';" );

That, for syntax. But going further, "?" (or "_") is the single
character matching wildcard. Why would your comparison use only a
single character? If "A" is a single char field, use "like '%'", it
would be safer and probably faster. But, there might be the chance
that you're NOT trying to do a wildcard comparison, but are trying to
search for the literal "?". Then you would use your actual syntax, but
adding a backslash to escape the special char: "[A]='\?'".

Some wild shots... hope it works.
Gonzalo.







hi there,
please take a moment to check out the newest cash offer.
cash is waiting for you!  Click Below 
Or copy the link and paste it in your browser

http://www.geocities.com/omega99/





Hey...Janet Here... We Haven't Talked In So Long!!  
How Have You Been?  Thought I would Forward you this email!

I usually delete these but I opened this one, like what I saw, 
and thought you would like to see this.

http://www.geocities.com/rush009900/

IF THE LINK IS NOT HIGHLIGHTED OR YOU CANNOT CLICK ON IT.
COPY AND PASTE IT IN YOUR BROWSER.












Hi,
I am using
PHP4.0.4pl1 in cgi mode
Apache 1.3.14
WIN2000


I point my browser at www.domain.com/phpinfo.php  and the $PHP_SELF variable
to contains "/php/php.exe/phpinfo.php" instead of just "phpinfo.php".

Anyone know what is causing this and how to correct it?  The manual says it
is supposed to contain only "phpinfo.php"


--
Regards
Jess Perez







RE: [PHP-WIN] expat

2001-03-03 Thread alain samoun

With Apache it works for me...
For instructions, try the example of this article:
http://www.phpbuilder.com/columns/justin2428.php3
There is an error at the end of the xml file,  should be 
after this correction, everything works.

 Message from Alain Samoun
[EMAIL PROTECTED]

-Original Message-
From: Rohan Amin [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 7:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] expat


Has anyone been able to get expat working on Windows using Personal Web
Server?  I can't find good instructions anywhere...

Thanks,

Rohan Amin



--
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-WIN] pulling arrays from nested arrays?

2001-03-03 Thread Doug Brewer

Hello, looking for some insight on the behavior of arrays.

I've got an array. One of the elements of that array is another array.

If I refer to it this way, I can get at it:

while(list($this, $that) = each($first_array["second array"])) {
# it works!
}

But let's say I want to alter the items in the second array, removing
items or sorting differently, so to preserve the original I want to
create a new array equivalent to the second array:

$new_array = $first_array["second array"]; # what's wrong with this?

while(list($this, $that) = each($new_array)) {
# doesn't work!
}

Any ideas or pointers? I've tried:

$new_array = array ($first_array["second array"]);

but no go.

TIA,

Doug


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




Re: [PHP-WIN] pulling arrays from nested arrays?

2001-03-03 Thread Ernest E Vogelsinger

At 01:21 04.03.2001, Doug Brewer said:
[snip]
>$new_array = $first_array["second array"]; # what's wrong with this?

this is a copy of $first_array["second array"].

>while(list($this, $that) = each($new_array)) {
>   # doesn't work!
>}

this modifies the copy!

After applying the modifications, do
   $first_array["second array"] = $new_array;
to replace the original with the modified contents.

Usually you would use references to arrays to handle this, but I haven't
found a way yet to get list() to return references instead of copies...


 ...ebird

   >O Ernest E. Vogelsinger
   (\)http://www.1-at-web.at/
^ ICQ#   13394035


-- 
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-WIN] IE 5.5,authentication,PHP sessions: IE never stops running?

2001-03-03 Thread Ken

I'm experiencing strange behavior with my user authentication scheme in my PHP app, 
with users using IE 5.5.

I am using browser authentication (WWW-Authenticate and 401 headers), "no cache" 
headers, and PHP 4 sessions.

I am finding that even when the user totally quits IE, if he then restarts IE, one or 
both (haven't isolated for sure yet) of the following happen:

- The browser still knows the user and password, and so will send it to the server 
upon an authentication request under the same realm, without prompting the user.  (The 
user does NOT have "save this password" checked on the user/password prompt when it 
first comes up.)
- The session is still active.  A call to session_start() returns the pre-existing 
session, instead of getting a new one.

If the user restarts his machine, IE no longer remembers his user and password, and so 
a prompt is displayed upon authentication headers being sent.  And I presume (not 100% 
certain) that a new session gets created.

Both of these are behaving like IE is still running.  Is this a known issue with IE 
5.5?  Does it just stay running?  These symptoms make it sound like this, and less 
like a logic problem in my PHP app.  (I have verified that the username and password 
are sent when the user gets an authentication prompt, without the user typing 
anything.  I'm assuming there's no possible way that a PHP session can retain this 
information; I am reading $PHP_AUTH_USER and $PHP_AUTH_PW...there's no way these can 
be set unless the browser were already running and the user had previously entered 
them into their prompts, right?)

Has anyone else run into this?  My application works perfectly under Netscape 4, IE 4, 
and Opera 5.

Thanks,
Ken 

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




Re: [PHP-WIN] IE 5.5,authentication,PHP sessions: IE never stops running?

2001-03-03 Thread John Henckel

I, too, am using PHP with authentication and IE 5.  However I am using 
.htaccess to generate the headers instead of PHP.  I found this text...

a quote from PHP manual.
>Both Netscape and Internet Explorer will clear the local browser window's 
>authentication cache for the realm upon receiving a server response of 
>401. This can effectively "log out" a user, forcing them to re-enter their 
>username and password. Some people use this to "time out" logins, or 
>provide a "log-out" button.

This doesn't answer Ken's question, but at least perhaps you can use it to 
provide a "log-out" button.  Let me know if it works or not.

At 09:57 PM 3/3/01 -0500, kenzo wrote:
>I'm experiencing strange behavior with my user authentication scheme in my 
>PHP app, with users using IE 5.5.
>
>I am using browser authentication (WWW-Authenticate and 401 headers), "no 
>cache" headers, and PHP 4 sessions.
>
>I am finding that even when the user totally quits IE, if he then restarts 
>IE, one or both (haven't isolated for sure yet) of the following happen:
>
>- The browser still knows the user and password, and so will send it to 
>the server upon an authentication request under the same realm, without 
>prompting the user.  (The user does NOT have "save this password" checked 
>on the user/password prompt when it first comes up.)
>- The session is still active.  A call to session_start() returns the 
>pre-existing session, instead of getting a new one.
>
>If the user restarts his machine, IE no longer remembers his user and 
>password, and so a prompt is displayed upon authentication headers being 
>sent.  And I presume (not 100% certain) that a new session gets created.
>
>Both of these are behaving like IE is still running.  Is this a known 
>issue with IE 5.5?  Does it just stay running?  These symptoms make it 
>sound like this, and less like a logic problem in my PHP app.  (I have 
>verified that the username and password are sent when the user gets an 
>authentication prompt, without the user typing anything.  I'm assuming 
>there's no possible way that a PHP session can retain this information; I 
>am reading $PHP_AUTH_USER and $PHP_AUTH_PW...there's no way these can be 
>set unless the browser were already running and the user had previously 
>entered them into their prompts, right?)
>
>Has anyone else run into this?  My application works perfectly under 
>Netscape 4, IE 4, and Opera 5.
>
>Thanks,
>Ken


John Henckel  alt. mailto:[EMAIL PROTECTED]
Zumbro Falls, Minnesota, USA   (507) 753-2216

http://geocities.com/jdhenckel/


-- 
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-WIN] Re: IE 5.5,authentication,PHP sessions: IE never stops running?

2001-03-03 Thread Ken

Thanks for the idea, John.

I know about the auth logout.  Unfortunately, that means that when a user clicks 
"logout", he gets a "log in" prompt!  And, in IE, he has to deliberately blank out the 
password field, THEN hit enter, THEN the prompt will come again, and he has to hit 
escape.

There's another possible path than the above, but it, too, involves a prompt coming up 
when they hit logout, and they have to clear the password field.

If, when they click "logout", and they get the first confusing "log in" prompt, they 
click "cancel", then they won't be logged out.  The browser will continue to remember 
and report their username and password.

Try explaining how to follow these instructions to an inexperienced user!

The point of my system was to use, among other things, the session cookie to determine 
whether the user is in a new session or the same one as before.  The logout button 
sets a flag in the database.  In short, then I know, when the user's browser tries to 
log in again, if he's in the SAME session, and he had previously hit logout, then I 
will have to send an auth header, with a new realm.  But if he's in a NEW session, 
then I can assume his browser no longer remembers his user/pass, so the actual user 
must've typed it, so here I will let the user proceed without sending an auth header.

If IE 5.5 refuses to clear the user/password field, and refuses to clear the session 
cookie, then I can't think of any way of him getting to log out without making him go 
through an annoying second "enter your username and password" prompt...which is most 
disappointing.

It's sounding like, thanks to this terrible behavior of IE 5.5, I may have to switch 
to not using browser authentication at all, and instead deal with the nuisance or 
security risk of passing along authentication information in the session, and 
requiring the user to click "logout" when it's time to logout (forcing a destruction 
of the information stored in the session).

Any suggestions?

- Ken

At 09:45 PM 3/3/01 -0600, John Henckel wrote:
>I, too, am using PHP with authentication and IE 5.  However I am using .htaccess to 
>generate the headers instead of PHP.  I found this text...
>
>a quote from PHP manual.
>>Both Netscape and Internet Explorer will clear the local browser window's 
>authentication cache for the realm upon receiving a server response of 401. This can 
>effectively "log out" a user, forcing them to re-enter their username and password. 
>Some people use this to "time out" logins, or provide a "log-out" button.
>
>This doesn't answer Ken's question, but at least perhaps you can use it to provide a 
>"log-out" button.  Let me know if it works or not.
>
>At 09:57 PM 3/3/01 -0500, kenzo wrote:
>>I'm experiencing strange behavior with my user authentication scheme in my PHP app, 
>with users using IE 5.5.
>>
>>I am using browser authentication (WWW-Authenticate and 401 headers), "no cache" 
>headers, and PHP 4 sessions.
>>
>>I am finding that even when the user totally quits IE, if he then restarts IE, one 
>or both (haven't isolated for sure yet) of the following happen:
>>
>>- The browser still knows the user and password, and so will send it to the server 
>upon an authentication request under the same realm, without prompting the user.  
>(The user does NOT have "save this password" checked on the user/password prompt when 
>it first comes up.)
>>- The session is still active.  A call to session_start() returns the pre-existing 
>session, instead of getting a new one.
>>
>>If the user restarts his machine, IE no longer remembers his user and password, and 
>so a prompt is displayed upon authentication headers being sent.  And I presume (not 
>100% certain) that a new session gets created.
>>
>>Both of these are behaving like IE is still running.  Is this a known issue with IE 
>5.5?  Does it just stay running?  These symptoms make it sound like this, and less 
>like a logic problem in my PHP app.  (I have verified that the username and password 
>are sent when the user gets an authentication prompt, without the user typing 
>anything.  I'm assuming there's no possible way that a PHP session can retain this 
>information; I am reading $PHP_AUTH_USER and $PHP_AUTH_PW...there's no way these can 
>be set unless the browser were already running and the user had previously entered 
>them into their prompts, right?)
>>
>>Has anyone else run into this?  My application works perfectly under Netscape 4, IE 
>4, and Opera 5.
>>
>>Thanks,
>>Ken


-- 
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 Digest 4 Mar 2001 04:02:49 -0000 Issue 473

2001-03-03 Thread php-windows-digest-help


php-windows Digest 4 Mar 2001 04:02:49 - Issue 473

Topics (messages 5806 through 5811):

Re: expat
5806 by: alain samoun

pulling arrays from nested arrays?
5807 by: Doug Brewer
5808 by: Ernest E Vogelsinger

IE 5.5,authentication,PHP sessions: IE never stops running?
5809 by: Ken
5810 by: John Henckel
5811 by: Ken

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]


--



With Apache it works for me...
For instructions, try the example of this article:
http://www.phpbuilder.com/columns/justin2428.php3
There is an error at the end of the xml file,  should be 
after this correction, everything works.

 Message from Alain Samoun
[EMAIL PROTECTED]

-Original Message-
From: Rohan Amin [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 7:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] expat


Has anyone been able to get expat working on Windows using Personal Web
Server?  I can't find good instructions anywhere...

Thanks,

Rohan Amin



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





Hello, looking for some insight on the behavior of arrays.

I've got an array. One of the elements of that array is another array.

If I refer to it this way, I can get at it:

while(list($this, $that) = each($first_array["second array"])) {
# it works!
}

But let's say I want to alter the items in the second array, removing
items or sorting differently, so to preserve the original I want to
create a new array equivalent to the second array:

$new_array = $first_array["second array"]; # what's wrong with this?

while(list($this, $that) = each($new_array)) {
# doesn't work!
}

Any ideas or pointers? I've tried:

$new_array = array ($first_array["second array"]);

but no go.

TIA,

Doug





At 01:21 04.03.2001, Doug Brewer said:
[snip]
>$new_array = $first_array["second array"]; # what's wrong with this?

this is a copy of $first_array["second array"].

>while(list($this, $that) = each($new_array)) {
>   # doesn't work!
>}

this modifies the copy!

After applying the modifications, do
   $first_array["second array"] = $new_array;
to replace the original with the modified contents.

Usually you would use references to arrays to handle this, but I haven't
found a way yet to get list() to return references instead of copies...


 ...ebird

   >O Ernest E. Vogelsinger
   (\)http://www.1-at-web.at/
^ ICQ#   13394035





I'm experiencing strange behavior with my user authentication scheme in my PHP app, 
with users using IE 5.5.

I am using browser authentication (WWW-Authenticate and 401 headers), "no cache" 
headers, and PHP 4 sessions.

I am finding that even when the user totally quits IE, if he then restarts IE, one or 
both (haven't isolated for sure yet) of the following happen:

- The browser still knows the user and password, and so will send it to the server 
upon an authentication request under the same realm, without prompting the user.  (The 
user does NOT have "save this password" checked on the user/password prompt when it 
first comes up.)
- The session is still active.  A call to session_start() returns the pre-existing 
session, instead of getting a new one.

If the user restarts his machine, IE no longer remembers his user and password, and so 
a prompt is displayed upon authentication headers being sent.  And I presume (not 100% 
certain) that a new session gets created.

Both of these are behaving like IE is still running.  Is this a known issue with IE 
5.5?  Does it just stay running?  These symptoms make it sound like this, and less 
like a logic problem in my PHP app.  (I have verified that the username and password 
are sent when the user gets an authentication prompt, without the user typing 
anything.  I'm assuming there's no possible way that a PHP session can retain this 
information; I am reading $PHP_AUTH_USER and $PHP_AUTH_PW...there's no way these can 
be set unless the browser were already running and the user had previously entered 
them into their prompts, right?)

Has anyone else run into this?  My application works perfectly under Netscape 4, IE 4, 
and Opera 5.

Thanks,
Ken 




I, too, am using PHP with authentication and IE 5.  However I am using 
.htaccess to generate the headers instead of PHP.  I found this text...

a quote from PHP manual.
>Both Netscape and Internet Explorer will clear the local browser window's 
>authentication cache for the realm upon receiving a server response of 
>401. This can effectively "log out" a user, forcing them to re-enter their 
>use

RE: [PHP-WIN] pulling arrays from nested arrays?

2001-03-03 Thread Doug Brewer

Perhaps I was unclear...I actually _want_ to modify the copy, that's
why I made a copy, to preserve the original. My point was that this
doesn't seem to create a valid copy of the original array:

$new_array = $first_array["second array"];

Operations on $new_array seem to fail, because it isn't an array.
Using a reference would modify the original, and I don't want to do
that.

Doug

| -Original Message-
| From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]]
| Sent: Saturday, March 03, 2001 7:17 PM
| To: Doug Brewer
| Cc: [EMAIL PROTECTED]
| Subject: Re: [PHP-WIN] pulling arrays from nested arrays?
|
|
| At 01:21 04.03.2001, Doug Brewer said:
| [snip]
| >$new_array = $first_array["second array"]; # what's wrong
| with this?
|
| this is a copy of $first_array["second array"].
|
| >while(list($this, $that) = each($new_array)) {
| >   # doesn't work!
| >}
|
| this modifies the copy!
|
| After applying the modifications, do
|$first_array["second array"] = $new_array;
| to replace the original with the modified contents.
|
| Usually you would use references to arrays to handle this,
| but I haven't
| found a way yet to get list() to return references instead
| of copies...
|
|
|  ...ebird
|
|>O Ernest E. Vogelsinger
|(\)http://www.1-at-web.at/
| ^ ICQ#   13394035
|
|
| --
| 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]




Re: [PHP-WIN] Re: IE 5.5,authentication,PHP sessions: IE never stops running?

2001-03-03 Thread John Henckel

Ken, I didn't believe you that IE was so stupidly implemented until I tried 
it myself.  You are right, IE 5 rememebers the password even though I hit 
CANCEL on the re-authenticate prompt.  And it remembers the password even 
when I close all browser windows.

If you decide to store authentication in the session, a good way to 
generate a 32 character "token" is md5(uniqid(rand())).  You store a copy 
of this token in your database (with some expiration time) and give a copy 
of it to the user (either in the session or in a plain old cookie).

For me to implement log-out is not so easy because I am using .htaccess.  I 
guess I'll just require the crypt() of the PW to be in a cookie.  Logout 
will just put garbage into the cookie.  Hopefully no one will discover that 
they can hijack someone elses login by just deleting the cookie.  :-(

John Henckel  alt. mailto:[EMAIL PROTECTED]
Zumbro Falls, Minnesota, USA   (507) 753-2216

http://geocities.com/jdhenckel/


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