Ask a Question related to PHP Bugs, Design and Development.
-
asbo at iserv dot net #1
#20260 [Com]: Cookies set on Remote Host but not on localhost
ID: 20260
Comment by: asbo at iserv dot net
Reported By: m_e_brown at hotmail dot com
Status: No Feedback
Bug Type: Session related
Operating System: Windows 2000 Professional
PHP Version: 4.2.1
New Comment:
I'm experiencing an similar issue, but it's conditional based on how I
access the server (WinXP, Apache v2.0.55, PHP 5.2.0 [module]).
When I connect to the server using an IP address (127.0.0.1,
192.168.0.*), cookies work fine. However, if I use a NetBIOS name
(asbo, localhost -- which should resolve cleanly into an IP address) it
doesn't seem that cookies are set properly. This has been tested in both
Firefox 1.5.0.8/2.0 and Internet Explorer 6.0 and all exhibit identical
behavior in testing.
Obviously this isn't a huge issue -- I get the expected behavior on my
internet server and using IP addresses as started above -- but as this
report hadn't even received feedback I thought I'd throw my two cents
in.
Previous Comments:
------------------------------------------------------------------------
[2002-11-21 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-11-05 09:58:43] [email]sander@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php4-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php4-win32-latest.zip[/url]
------------------------------------------------------------------------
[2002-11-05 09:55:11] m_e_brown at hotmail dot com
I installed php as a module on apache2 folllowing the standard set up.
I have a user logon screen which works on a remote server but not when
developing and testing on a stand alone machine that is a local server.
I hold the username and passwords on mysql and ask the user for their
username and password which gets sent to another .php page which first
of all sets the following cookies
setcookie("email",$email,time()+1800);
setcookie ("password",$password,time()+1800);
Then verifies this against the database and if succesfull redirects to
the 'members area' where the cookies are set again otherwise it
redirects to a logout page. [Which is where i get sent on the local
machine]
I have tried the following formats for the setcookie and all
combinations including setting the expiry time to 8000.
setcookie("email",$_POST["email"],time()+1800);
setcookie ("password",$_POST["password"],time()+1800);
setcookie("email",$email,"time()+1800");
setcookie ("password",$password,"time()+1800");
The database authentication is being succeful, it is just that the
cookies are not being set on the local machine, as when I hit the
members area I set the email value to another variable, set the cooies
as before, then alert() the old value [before the $email was reset by
the new setcookie() command.
I have the following lines set in my php.ini
register_globals = On
variables_order = "EGPCS"
Do you have any idea why my local machine is not setting the cookies???
Please help
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=20260&edit=1[/url]
asbo at iserv dot net Guest
-
Moving SQL Server database from localhost to remote?
Hello, I am doing my first project with MS SQL server 2000. Developing this with Access as a project has been fun.. but I am stumped now with how... -
Unknown MySQL Server Host 'localhost '
Hi, I'm rather new to both MySQL and PHP. I've been trying to use PHP to write to a MySQL database. I call mysql_pconnect to get a database... -
LOCALHOST webserver not behaving same as remote server
I'm developing a web site, which I test first on my PC (http://localhost/...) and then upload to the web site on the internet when ok. I have a... -
[PHP] cookies on localhost WinXP
> I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I HOW are you trying to set it? What browser are you using? How do you... -
cookies on localhost WinXP
I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I can write programs when not connected to the Internet (like when...



Reply With Quote

