osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Sessions do not seem to work on W2K /Apache/ PHP4.2

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Installation Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 08-06-2003, 06:16 AM
New Member
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
oben
Default Sessions do not seem to work on W2K /Apache/ PHP4.2

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 08-06-2003, 08:48 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,484
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 08-07-2003, 05:01 AM
New Member
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
oben
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 08-07-2003, 08:34 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,484
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 08-08-2003, 06:02 AM
New Member
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
oben
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 08-09-2003, 06:46 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,484
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 08-10-2003, 08:31 AM
New Member
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
oben
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 08-10-2003, 10:01 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,484
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 08-13-2003, 06:06 AM
New Member
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
oben
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 08-21-2003, 02:44 PM
Lurker
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
laingand
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 01:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax