I am setting up an e-commerce store, and it is misbehaving. I am using osCommerce which is supposed to work if a user has their browser cookies disabled. Without cookies the user is tracked by a session id that is passed on through the URL. However for some reason, when I have the cookies disabled, a new session is started with every click of the mouse at every link and every submit button. These sessions are stored in the store tmp directory or the mysql db depending on my configuration. They pile up fast while I get nowhere. I have had osCommerce people go over my configuration files ( over 100 have viewed my query ) and they seem to be fine. I downloaded a fresh, virgin catalog to make sure that the one I had had not been corrupted. I got the same results. So far nobody in the osCommerce forum can figure it out and they seem to have run out of ideas. It seems the problem does not reside with the osCommerce code. It is the same code everyone else uses without a problem. So my question is, could this be an Apache issue? Is there any configuration setting that I need to set? Is there a module I need? When cookies are enabled the sessions seem to work fine. The site domain is localhost. I am using; Apache 2.2, PHP 5.3, MySQL 5, Linux 2.6.31.12-0.2-default x86_64. Thank you in advance for any help.
This could be an apache/mysql/php configuration problem with how it deals with sessions. Is this a dedicated server or just a shared host? I assume localhost is your test environment? If so try and place this in a live environment and see if the problem persists.
I have been developing a marketing concept on my home computer. The osCommerce catalog that I noticed the glitch on is slightly modified. That is why I downloaded and installed a new OSC catalog; just to experience the same results. The only environment I have run anything on is my personal computer. I had been wondering if things would be different in a live environment. Could anyone hazard a guess as to the configuration parameters that could affect sessions? Being on my personal computer I am free to change anything.
Well the cookies could be wrong. And does your Apache use localhost or an IP? Did you build the php yourself? But sessions require a number of things to be working right in the backend. http://www.php.net/manual/en/book.session.ph Try doing a print_r($_SESSION) on the OSC pages while your cookies are disabled and see what they do page to page.
Just to make sure this is not a osCommerce problem I wrote a little test script. It is as simple as it gets. You can see the results. The server is the default installation that comes with Suse. About the only thing I changed is setting register_globals to off. I don't have a great knowledge of Apache, so I have no idea what settings might affect this. test.php <?php session_start(); echo session_id(); //n27kncejcd4rt246037989eqn1jui6bj $_SESSION[id]=session_id(); echo "<br />"; var_dump($_SESSION[id]); //string(32) "n27kncejcd4rt246037989eqn1jui6bj" ?> <br /> <a href="test_two.php" >Test</a> test_two.php <?php session_start(); echo session_id(); //m9oh3l865ovrgvb2ue6tdlmnrflpevhb echo "<br />"; var_dump($_SESSION[id]); //NULL ?> As you can see, in test_two.php the session_id is reset and $_SESSION[id] is killed. When cookies are enabled everything has the same value as it should. Why? Is this a PHP or a sever problem? The domain is localhost on my personal computer. Linux 2.6.31.12-0.2-default x86_64 Apache2.2 PHP 5.3 Tested on Firefox, Konqueror and Opera.