From: Brian R. <bra...@vm...> - 2001-04-18 16:19:12
|
This is probably the same cookie problem that was noted in some previous emails. Certain newer versions of IE have issues with setting cookies. Since I am lazy, I am just cutting and pasting the fix from the previous email I sent out: ------------------------------------------------------------------------ ------------------------- I found the below code to be extremely helpful with the cookie bug that was noted in IE5.01+. However, after you make the below change, logging out no longer deletes the cookie, since cookies must be deleted in the same manner in which they were set. This means that once someone has logged in, you can login again from that same machine by simply clicking the submit button. Or, if someone else tries to login, the original person is still the one they log in as. To fix this, make the following modifications to includes/logout.inc.php: logout.inc.php: <?php //Logout script created by Seek3r //Modified by Brian Razzaque (raz...@vm...) $time =3D mktime(); $date =3D date("l, d-M-y H:i:s", ($time)); setcookie("status", "", $date, $g_base_path, $g_domain);=20 setcookie("user", "", $date, $g_base_path, $g_domain); setcookie("group", "", $date, $g_base_path, $g_domain); setcookie("authentication", "", $date, $g_base_path, $g_domain); setcookie("laston", "", $date, $g_base_path, $g_domain); setcookie("logout", "", $date, $g_base_path, $g_domain); unset($status); unset($user); unset($group); unset($authentication); unset($laston); unset($logout); ?> Just make sure that you use it with the code listed below by Jay Kramer. Hope this helps some of you, Brian Razzaque Vision Multimedia Technologies, LLC www.vmtllc.com raz...@vm... --------------------------------------- At 09:31 AM 5/3/01, Are Westby found time to write: >I'd suggest you update php/apache. Or as an intermediary solution, you could >always run Netscape. Never had any problems there. In case you aren't able to update these, I found a fix at the sourceforge=20 website. Change the files includes/cookie.inc.php and config/general.conf.php to=20 read as follows: cookie.inc.php: <?php // SET COOKIE INFO // cookie.inc.php -- modified by Jay Kramer (ja...@mo...) if (isset($authentication)) { $time =3D mktime()+g_cookietimeout; $date =3D date("l, d-M-y H:i:s", ($time)); // Make a IE5.01compatible=20 date/time.. setcookie("status", $status, $date, $g_base_path, $g_domain); // IE5.01=20 is picky about the base path nad domain, if they are missing, there is a good chance the cookie will not get set.. setcookie("user", $user, $date, $g_base_path, $g_domain); // setcookie("txtUsername", $txtUsername, $date, $g_base_path, $g_domain); setcookie("group", $group, $date, $g_base_path, $g_domain); setcookie("authentication", $authentication, $date, $g_base_path,=20 $g_domain); setcookie("laston", $laston, $date, $g_base_path, $g_domain); } else { $time =3D mktime()+g_cookietimeout; $date =3D date("l, d-M-y H:i:s", ($time)); setcookie("status", "Logged In", $date,$g_base_path, $g_domain); setcookie("user", $txtUsername, $date, $g_base_path, $g_domain); // setcookie("txtusername", $txtUsername, $date, $g_base_path, $g_domain); setcookie("group", $row[4], $date, $g_base_path, $g_domain); setcookie("authentication", "YES", $date, $g_base_path, $g_domain); setcookie("laston", $row[6], $date, $g_base_path, $g_domain); } ?> general.conf.php: <?php //general configuration $version =3D ".04.4"; //Version Number $g_title =3D "PHP Help Desk"; //Title of your=20 helpdesk $g_helpdesk_email =3D "web...@yo..."; //Email of your=20 helpdesk $g_mailservername =3D "mail.yourcompanys.smtpserver.com"; //SMTP Mail server $g_cookietimeout =3D "1200"; //Timeout for cookies $g_refreshtime =3D "600"; //Refresh time for=20 viewall // If you are using http://someaddress.com/phphelpdesk, then you must set the // base url to "http://someaddress.com/phphelpdesk/" Notice the '/' at the end // you must put that in there. If you are using a virtual host such as // http://phphelpdesk.somecompany.com, then you can just leave it empty with // the quotes touching ""; $g_base_url =3D "http://someaddress.com/phphelpdesk/"; //base url=20 location // you HAVE to set your domain name here, with no HTTP: // or / at the end or anything... $g_domain =3D "someaddress.com"; // this is the path from the last part of the $g_base_url // parameter. If there is no path, set this to "/"; NOTICE // THE BEGINNING AND ENDING /'s!! $g_base_path =3D "/phphelpdesk/"; ?> Thanks to Jay Kramer and someone who didn't leave their name. It now works=20 for me using IE5. HTH Brian com...@cl... -----Original Message----- From: Dustin Clark [mailto:Dus...@se...] Sent: Wednesday, April 18, 2001 12:13 PM To: 'php...@li...' Subject: [Phphelpdesk-help] Wont work with IE I have a wierd problem. I am using the latest version of PHP helpdesk and the stable version of mysql. Everything has been working fine until just recently I havent been able to access some pages through IE. I can log in with IE and when I try to click on something liek "add user" or "view jobs" it just takes me back to the login page. However, I can get anywhere just fine with netscape. =20 I am not a guru at web programming and I believe this is probably an easy fix. Any help would be greatly appreciated. Thanks,=20 Dusty=20 |