simonChen Posted September 22, 2009 Posted September 22, 2009 Hi, I am very new here, and just started to pick up osCommerce. I installed the app. and found that whenever I browsing through the pages. the session info could not be remembered by the system. For example, as I already created a user in system, and I can login as the user, that is fine. but the system still display msg "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?". I knew I login because the customers_info table was updated. Check the code, I found almost all php page call includes/application_top.php, and this application_top.php almost always call session_start(), and one this session_start() called, the session info will be lost?? right? I am totally lost, could someone please help. Simon.
Xpajun Posted September 22, 2009 Posted September 22, 2009 Where is your site? Are you using an on-line host or do you have it on your computer using xampp or something similar? My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
simonChen Posted September 22, 2009 Author Posted September 22, 2009 Where is your site? Are you using an on-line host or do you have it on your computer using xampp or something similar? yes, It's on my PC. I installed apche / wamp. I use http://localhost to test out. Zheng.
simonChen Posted September 22, 2009 Author Posted September 22, 2009 These are the two php I have for test. in a.php I have: <html> <body> Result : <?php require('includes/application_top.php'); tep_session_start(); session_register('mytest'); if (session_is_registered('mytest') == true) { echo "Registered "; } else { echo "NoNo "; } tep_session_start(); if (session_is_registered('mytest') == true) { echo "Registered2 "; } else { echo "NoNo2 "; } ?> <a href="http://localhost/oscommerce/catalog/b.php" > <u> click here </u> </a> </body> </html> b.php <html> <body> Result B : <?php require('includes/application_top.php'); if (session_is_registered('mytest') == true) { echo "Registered "; } else { echo "NoNo "; } ?> </body> </html> a.php results fine, it shows : "Result : Registered Registered2 click here ." but b.php is not fine. after I click "Click here". I got "Result B : NoNo " Why the system does not keep session_register('mytest'), when loading b.php?? Thanks in advance. Simon.
Xpajun Posted September 22, 2009 Posted September 22, 2009 It seems to be a problem with computer based test site - I am having the same problem although I did not get it prior to my upgrade to php5.3.0 As yet I haven't found an answer :( My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
simonChen Posted September 22, 2009 Author Posted September 22, 2009 This problem really drive me nuts. How can it be possible?? I have done another test with the following script: <html> <body> <?php require('includes/application_top.php'); session_start(); print "\n Session id = ".session_id()."\n <br>"; ?> </body> </html> The session_id changed everytime I do a screen refresh!! this is wrong! But if I comment out require() function. //require('includes/application_top.php'); the session_id did not change anymore when I refresh screen. Somewhere in includes/application_top.php file, the default session functions have been overwritten, and screwed up the app. Or maybe some switch somewhere in the system was wrongly set. Could anyone please help. Thanks. Simon.
simonChen Posted September 24, 2009 Author Posted September 24, 2009 Actuall some other discussion group alreay provided the solution: http://www.oscommerce.com/forums/index.php?sho...&hl=session. Changing the Cookie Domains and Cookie Paths to blank in the catalog\includes\configure.php file
Recommended Posts
Archived
This topic is now archived and is closed to further replies.