php-windows Digest 25 Feb 2005 16:32:54 -0000 Issue 2590

Topics (messages 25666 through 25670):

Re: Cookie Problems on Localhost
        25666 by: trlists.clayst.com
        25670 by: Joseph L. Mueller

Re: not so php related
        25667 by: Unknown W. Brackets

Re: IIS PHP 301 Redirect
        25668 by: Unknown W. Brackets

Reading MS Access database
        25669 by: Florin C.

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 ---
On 23 Feb 2005 M. Sokolewicz wrote:

> both 'localhost' and any ip are not accepted as valid
> domain-identifiers in cookies (as per RFC). This simply means you're
> best off leaving them empty. 

As far as I can tell this is incorrect.  I think the relevant RFCs are 
2109 and 2695.  Both strongly discourage the use of IP addresses for 
the cookie domain when a fully qualified name is available but both 
also explicitly state that either domain name or IP is allowed.  There 
is no restriction stated on localhost.

I did find some online mentions that MSIE under WinXP will not store a 
cookie for any domain pointing to 127.0.0.1 (localhost) regardless of 
the name.  But this appears to be a bug, not a feature.

--
Tom

--- End Message ---
--- Begin Message ---
Luis Moreira wrote:

You can always try to set a cookie, but wether the browser allows it or not, it's a whole different ball game.
I believe your problem lies here.


Anyway, the two scripts I attach, I have just tried, and the cookie was set by the first, WITH A MESSAGE FROM THE BROWSER ASKING IF I ALLOWED IT.
The second script read the cookie, no problem.



Hope this helps.

Luis

Mikey wrote:

That still leaves the problem of how to test cookies and sessions on a local system.


Don't know if this will work, but have you tried setting an entry in your
hosts file (C:\WINDOWS or C:\WINNT\system32\drivers\etc) for your machine
name that points to 127.0.0.1?


Eg:
127.0.0.1    mymachine

HTH,

Mikey



Luis,
Thanks for sending the script to my e-mail account. I tried them but no cookie was set. All I got rom the r_print was "Array {}".


--
Joseph L. Mueller

--- End Message ---
--- Begin Message ---
Jocke,

Well, some things you can do with the "iisfunc" PECL extension.  See:

http://www.php.net/ref.iisfunc

However, modifying the DNS isn't part of that. It sounds like you want dnscmd.exe from the Windows Support Tools, found here:

http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/tools_howto.asp

Type dnscmd /? in a prompt for more information; you can pipe this was exec, popen, system, and similar functions in PHP.

-[Unknown]

-------- Original Message --------

Hi,



Is there a way to add hosts in IIS6 and alias in DNS hosts from php or
cmd. It would help me alot when I register a new customer.



I know its not php related but if someone know please share.

--- End Message ---
--- Begin Message ---
Jack Sen,

Order may matter (depending on PHP version) - try sending the Status after the Location.

Are you sure PHP is outputting the right headers? The easiest way to find out is to use the cgi version of PHP (php-cgi.exe or php.exe depending on your version of PHP) so you can see the outputted headers.

You may also try naming the file "nph-filename.php" and then accessing it as such. If you are using CGI, this tells IIS to leave the headers alone and send them as they should be.

If you are currently using CGI, you may also wish to look into switching to ISAPI if at all possible, as it is more efficient.

Regardless, it seems to work fine for me using PHP 5 and Apache.

-[Unknown]

-------- Original Message --------

Hi,
I am having problem with PHP header location with IIS 6.0. Even after i sent
the

header("HTTP/1.1 301 Moved Permanently");

the

header (Location: url);

always return 302 redirect.


any solution to this problem?

Thanks.

Jack Sen

--- End Message ---
--- Begin Message ---
Hy,

i want to read a ms access databese with php, but without odbc, is
there a solution or i must use odbc.

thanks in advanced.
-- 
Florin C.

--- End Message ---

Reply via email to