|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-27 08:21 UTC] calin dot brandabur at mobilesolutions dot ro
Description: ------------ i installed apache 2.0.46 and php 4.3.2 and the cookies are no longer working... at all see http://test.mobilesolutions.ro (win2k3 server) and http://new.v2r.ag/cookie (linux server with older version of php/apache) Reproduce code: --------------- <? if(!$username) { $username = "user"; $password = "pass"; $cookie_expire = "01/01/2099"; setcookie ("username", $username, $cookie_expire); setcookie ("password", $password, $cookie_expire); echo "<b>cookie set</b><br><br>"; } else { echo "<b>cookie found</b><br><br>"; } echo "<b>cookie info</b><br>username:{$username}<br>password:{$password}"; ?> Expected result: ---------------- First run: cookie set cookie info username:user password:pass Second run: cookie set cookie info username:user password:pass Actual result: -------------- Every run: cookie set cookie info username:user password:pass PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 19:00:01 2025 UTC |
This is odd because when i installed php i modified php.ini and changed register_globals to on... This code is not working either: <? if(!isset($_COOKIE['username'])) { $username = "user"; $password = "pass"; $cookie_expire = "01/01/2099"; setcookie ("username", $username, $cookie_expire); setcookie ("password", $password, $cookie_expire); echo "<b>cookie set</b><br><br>"; } else { echo "<b>cookie found</b><br><br>"; } echo "<b>cookie info</b><br>username:".$_COOKIE['username']."<br>password:".$_COOKIE['password']; ?>