Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Who's Online Enhancement 1.4


Guest

Recommended Posts

appreciate the reply.

 

I tried with mysql and it worked great.

 

So if i use the tmp file in my catalog directory, are the sessions automatically deleted every 24 minutes like they are when using mysql or does it have to be done manually?

Link to comment
Share on other sites

i really appreciate all the help.

 

ive switched to mysql and all seems to be working great. Ill check later to make sure my sessions are being removed every 24 minutes.

 

One final question - I set the configure.php in admin to use mysql sessions as well. What is the point of storing admin sessions - wouldnt this be a security threat?

Link to comment
Share on other sites

please help,

 

after a few minutes of being set to mysql,

 

my site stopped working.

 

i get a too many connections error in database.php line 19

 

please help

 

i changed back to file based, but still doesnt work now...?

Link to comment
Share on other sites

Warning: mysql_connect(): Too many connections in /home/tools4fl/public_html/includes/functions/database.php on line 19

Unable to connect to database server!

 

thats my error on each attempt

Link to comment
Share on other sites

Jon,

 

Yikes! Simple empirical evidence suggests you shouldn't use mySQL for sessions. Give it a few minutes or get your admin to bounce the server. And definitely switch back to files.

 

ed

Edited by medvid
Link to comment
Share on other sites

i really appreciate all the help.

 

ive switched to mysql and all seems to be working great. Ill check later to make sure my sessions are being removed every 24 minutes.

 

One final question - I set the configure.php in admin to use mysql sessions as well. What is the point of storing admin sessions - wouldnt this be a security threat?

 

 

I use mysql sessions, they are deleted just like the tmp file ones are :)

Link to comment
Share on other sites

mysql, forced cookies = false

 

Can't figure out the problem, maybe I should try not using mysql for sessions and see how that works.

 

Andrea,

If you do, make sure to set:

define('STORE_SESSIONS', '');

in both catalog/configure.php and admin/configure.php and that your session tmp file exists and doesn't have a leading slash.

 

Let me know how it works.

 

ed

Link to comment
Share on other sites

Andrea,

If you do, make sure to set:

define('STORE_SESSIONS', '');

in both catalog/configure.php and admin/configure.php and that your session tmp file exists and doesn't have a leading slash.

 

Let me know how it works.

 

ed

 

 

I used to use non-mysql session files before I installed the whos_online enhanced mod, then I had to switch to mysql to see the cart and light info. Installing the whos_online mod on a live store so I have to wait until my store traffic dies down before I can switch to files... don't want to drop sessions for 20-30 people and have them wonder whats wrong :(

Link to comment
Share on other sites

Ok, I switched over to file and it seems to be working much better.... but I lost the ability to see in the cart and the lights all indicate "no cart". I tried putting stuff in my cart and seeing if it worked, still nothing :(

 

Don't know what the trouble is now

Link to comment
Share on other sites

Ok, I switched over to file and it seems to be working much better.... but I lost the ability to see in the cart and the lights all indicate "no cart". I tried putting stuff in my cart and seeing if it worked, still nothing :(

 

Don't know what the trouble is now

Andrea,

 

You said earlier you switched back to v1.5.1. Did you reinstall v1.6 beta?

 

ed

Link to comment
Share on other sites

Might have it figured out...

 

This is the code for the for file sessions to be picked up:

 

      if ( (file_exists(DIR_FS_CATALOG . tep_session_save_path() . '/sess_' . $session_id)) && (filesize(DIR_FS_CATALOG . tep_session_save_path() . '/sess_' . $session_id) > 0) ) {
       $session_data = file(DIR_FS_CATALOG . tep_session_save_path() . '/sess_' . $session_id);
       $session_data = trim(implode('', $session_data));

 

DIR_FS_CATALOG = /local/home/xxx/xxx.com/

 

my sessions path is set to: /local/home/xxx/tmp_sessions

since I put sessions files below the home directory

 

they aren't matching up... could this be the problem? The other info is showing up though so I am not sure if that could really be it ....

Link to comment
Share on other sites

Andrea,

 

More like my bad luck. I have this working perfectly on a shop and I can switch sessions back and forth from mySQL to files with no problems. Lights work, cart shows up, no error messages.

 

Some people installed it and claimed it's working great. Others are getting errors. I'm starting to think that the session data is very dependent on environment variables I'm not aware of.

 

Well, that's one reason why I posted a Beta. There's no other easy way to test it. However, I feel bad Jon's site went down. Hopefully it recovered.

 

BTW, you did modify both configure.php files, make sure admin->configuration->sessions-session directory doesn't have a leading slash, made sure the directory existed under catalog, and has write permissions, right?

 

ed

Link to comment
Share on other sites

Might have it figured out...

 

This is the code for the for file sessions to be picked up:

 

 ? ? ?if ( (file_exists(DIR_FS_CATALOG . tep_session_save_path() . '/sess_' . $session_id)) && (filesize(DIR_FS_CATALOG . tep_session_save_path() . '/sess_' . $session_id) > 0) ) {
? ? ? ?$session_data = file(DIR_FS_CATALOG . tep_session_save_path() . '/sess_' . $session_id);
? ? ? ?$session_data = trim(implode('', $session_data));

 

DIR_FS_CATALOG = /local/home/xxx/xxx.com/

 

my sessions path is set to: /local/home/xxx/tmp_sessions

since I put sessions files below the home directory

 

they aren't matching up... could this be the problem? The other info is showing up though so I am not sure if that could really be it ....

 

Andrea,

 

Either move the session directory under catalog or hard code the directory path into the code.

 

ed

Link to comment
Share on other sites

Andrea,

 

More like my bad luck.  I have this working perfectly on a shop and I can switch sessions back and forth from mySQL to files with no problems.  Lights work, cart shows up, no error messages.

 

Some people installed it and claimed it's working great.  Others are getting errors.  I'm starting to think that the session data is very dependent on environment variables I'm not aware of.

 

Well,  that's one reason why I posted a Beta.  There's no other easy way to test it.  However, I feel bad Jon's site went down.  Hopefully it recovered.

 

BTW, you did modify both configure.php files, make sure admin->configuration->sessions-session directory doesn't have a leading slash, made sure the directory existed under catalog, and has write permissions, right?

 

ed

 

Both configs changed, no leading slash... I'm going to try to create the temp directory in the catalog directory and see what happens. Right now it's one under the home so no one can get at it...

 

I should be setting the sessions directory to just the directory name if I do that correct? just: /session_tmp NOT /local/home/xxx/xxx.com/session_tmp right?

Link to comment
Share on other sites

Both configs changed, no leading slash... I'm going to try to create the temp directory in the catalog directory and see what happens. Right now it's one under the home so no one can get at it...

 

I should be setting the sessions directory to just the directory name if I do that correct? just:  /session_tmp  NOT /local/home/xxx/xxx.com/session_tmp  right?

 

Andrea,

 

Just "session_tmp". The slash will put it at the root of the file system.

 

ed

Link to comment
Share on other sites

Warning: mysql_connect(): Too many connections in /home/tools4fl/public_html/includes/functions/database.php on line 19

Unable to connect to database server!

 

thats my error on each attempt

 

Jon,

 

Did you get this sorted out?

 

ed

Link to comment
Share on other sites

what a huge relief!

 

it turns out my host was updating the SQL, so all sites on my server were down for about 20 minutes.

 

I now have sessions set to mysql in both config.php files, and all works great!

 

The mod works perfect, the lights and cart contents are now shown.

 

 

My only remaining concern is that the automatic removal every 24 minutes of the sessions from the sessions table will work right. I guess ill just keep checking the table to see if it grows out of control...

But ed, is this working for you?

Link to comment
Share on other sites

Andrea,

 

Just "session_tmp".  The slash will put it at the root of the file system.

 

ed

 

 

Ok, still not work, just can't get the cart to show :( No idea why. If anyone has any suggestions I will try. No matter where I put the sessions directory it is not showing. And since I can see the referer, the current page and the time on the site I assume sessions are working, just not the cart part.

Link to comment
Share on other sites

My only remaining concern is that the automatic removal every 24 minutes of the sessions from the sessions table will work right. I guess ill just keep checking the table to see if it grows out of control...

But ed, is this working for you?

 

 

Mysql sessions are deleted just like file sessions. I was using that before and it works perfectly.

 

:)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...