This is a discussion on Sessions do not seem to work on W2K /Apache/ PHP4.2 within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; I have two identical 'vanilla' installs of the MS2.2 versions. One on a provider that uses a Linux server with ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I have two identical 'vanilla' installs of the MS2.2 versions. One on a provider that uses a Linux server with PHP 4.2.0, one on Localhost on my Win2K machine, where I used EasyPHP, a packaged install that sets up Apache 1.3.24, PHP 4.2.0, and MySql 3.23.49-max-nt, and tools to stop and start the Apache/Mysql servers. On the hosted version, everything works fine. However, on my localhost install, the session information is lost when I try to go shopping. I see this in the address line because the session id is lost, then a new session id created. Has anyone encountered this before? I'm not much of a Linux expert, so I'd really like to keep using Windows and my localhost, but this makes it impossible. I've browsed quite a few of the forum subjects, and I'm not even sure where to post this, but installation seems like the least inappropriate place. Thanks for any help anyone can extend (are there any Windows users out there?) oben |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| Most likely, you need to set you sessions directory path on the windows machine. The dir structure on windows is different than linux and the standard /tmp is usually not on the windows machine. Set you sessions dir to a directory you know exists, like c:\windows\temp and make sure that the dir has write access (not set to read only). I have an install on WinXP/Apache that works just fine. I bet this is your trouble...
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| First of all, thank you for your prompt reply. The PHP sessions save directory (I actually spent time looking inside OSC for the directory name when it's part of the PHP parms - shows how little I know!) is set to D:\easyphp\tmp (by EasyPHP, I assume), and so, not sure how to change it to c:\windows\temp (how do you do that anyway? Via a PHP script?), I added the directory to the path. However, nothing changed. I even logged off and back on again to see if that changed anything, but to no avail. Also, I forgot to mention I had set the sessions parm at install to 'mysql', as I doubted I would have write access to the sessions save path on the hosted install and wanted consistency between the two installs. So I'm still stumped! After my first posting, I found a post by someone who was considering installing osc on Windows, and you suggested Apache2triad. Does this sound like a good idea? Do you have any other suggestions? Thank you very much. By your reply from this post and others I have seen you seem both very helpful and most knowledgeable. Keep up the good work! oben |
|
#4
| ||||
| ||||
| oben, Setting the session path in osCommerce MS2 is easily done from the osc administration. Go to 'Configuration >> My Store >> Sessions and the top option on that page will set where oscommerce saves sessions. Simply point it to a real directory on your computer that is not read only, and away you go. It should work fine. It is easier that all the hassle you are going through
__________________ Michael Sasek osCMax Developer
|
|
#5
| |||
| |||
| OK. I tried to do exactly as you said, and changed the sessions dir to c:\winnt\temp (the windows temp file on my system) However, since the STORE_SESSIONS parm in includes/config.php was set to 'mysql', no file was written. So I changed the parm to the default ''. The session file with a name corresponding to the session id on the address line is generated no problem. Conclusion: there is no problem with osc saving the session info initially. When the parm is 'mysql', the difference is that the same info is saved in the 'sessions' table with the index value being the session id. The problem seems to be that the session info is LOST somehow: - I click on a category, a session id appears on the address line - I have verified that, depending on the STORE_SESSIONS parm, either a file in the sessions dir OR an entry in the sessions table is correctly created exactly at that point. However, when I then select a product, no session id info appears on the address line. And then, if I try to order the product, the shopping cart stays desperately empty! Can you think of another explanation? And I do apologize for my insistance, but the symptoms do not correspond to the solutions you have suggested. As far as the STORE_SESSIONS parm, I prefer setting it to 'mysql' anyway, because it can handle a shared hosting environment better. Thanks again, and I hope I'm not taxing your patience too much. oben |
|
#6
| ||||
| ||||
| This has to be a setting local to your servre setup, as I do not have the same problem on any windows install I have done. The session info is not lost on my install, and the cart works as it should You are using a pretty old version of PHP, I suggest upgrading to 4.3.2, and also upgrading apache to 1.3.2.8 Or you could try using Apache2triad. That is what I use and I have zero trouble with oscommerce.
__________________ Michael Sasek osCMax Developer
|
|
#7
| |||
| |||
| Hurray for Apache2Triad! Everything now works fine. EasyPHP does not run Apache as a service by default, and that might be the problem, besides the fact that it has old versions of everything. But now that I've installed Apache2Triad, EasyPHP does not work any more. Anyway, the most important thing is my problem is solved. Thanks a whole lot for your help and your patience, Michael. |
|
#8
| ||||
| ||||
| No problem. Hey, I think the reason easyphp doesnt work anymore is because you can only have one PHP running, and that is the one installed by Apache2Triad. I think you can safely remove easyphp. (backup before you do though
__________________ Michael Sasek osCMax Developer
|
|
#9
| |||
| |||
| Just wanted to add one small thing. I went back to the EasyPHP site to ask for an explanation, and found out, more or less, because they're being a little cagey about it, that it seems the sessions problem would be due to the version of PHP (4.2.0) used. Just in case someone encounters the same problem. oben |
|
#10
| |||
| |||
| I'm glad you guys got to the bottom of it. FYI, I have had exactly the same problem with EasyPHP on a WIN box, and have been banging my head against the wall about it, until I read your posts. Thanks |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Failed opening inclusion (include_path='.;c:\php4\pear') | Anonymous | osCMax v1.7 Discussion | 8 | 11-11-2003 01:16 PM |
| OsCommerce MS2 with PHP4.1.2? | Lynoure | osCommerce 2.2 Installation Help | 1 | 11-11-2003 11:30 AM |
| MS2.2_MAX Cookies not functioning-apache1.3.27/php4.3.2 | Demented | osCommerce 2.2 Installation Help | 1 | 08-21-2003 02:41 PM |
| error with htaccess on xp/apache | AtroxAngel | osCommerce 2.2 Modification Help | 1 | 01-16-2003 09:44 AM |
| Apache SSL server crashing | troyt | osCommerce 2.2 Installation Help | 0 | 12-27-2002 11:58 AM |