Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Session Error in Admin


omidhz

Recommended Posts

Hi, I don;t know if this is happening to me or anyone else has the same problem.

In the admin area, I'm getting the following error:

 

Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/bargain/public_html/shop/admin/includes/functions/sessions.php on line 67

 

I had the problem since I have started the OSC shop, but lately It has been increased and occurring a lot. I have click on refresh many time to get back to the page that I was working on.

 

Any idea how to fix this problem? I'm really getting tired of this :'( because it is really bothering me.

 

Please help.

Thanks

Regards,

Link to comment
Share on other sites

start with the session directory in your admin->configuration->sessions

Make sure you set the full path to the tmp directory of your host (/tmp is the default). Or if you want to store the sessions in the dbase in your includes\configure.php (both admin/catalog sides) set the store sessions to mysql

 

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Link to comment
Share on other sites

start with the session directory in your admin->configuration->sessions

Make sure you set the full path to the tmp directory of your host (/tmp is the default). Or if you want to store the sessions in the dbase in your includes\configure.php (both admin/catalog sides) set the store sessions to mysql

 

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Thanks for the quick reply. I do have a tmp folder in the root and another one in "shop" directory. (My store is located in the "shop" directory".

I checked the session path it is "/tmp". Should I change it to anything else?

Regards,

Link to comment
Share on other sites

yes it should be the path to your tmp directory - to the root of your path your host gave you with the the /tmp appended. Something like

 

/home/bargain/public_html/tmp

 

 

and make sure you have the tmp directory created there. But I would prefer to store the sessions in the dbase.

Link to comment
Share on other sites

yes it should be the path to your tmp directory - to the root of your path your host gave you with the the /tmp appended. Something like

 

/home/bargain/public_html/tmp

and make sure you have the tmp directory created there. But I would prefer to store the sessions in the dbase.

I think that fixed the problem. I'm not getting the error any more now. Thanks for the tip.

One more question, why do you prefer to store the session in the dbase?

Regards,

Link to comment
Share on other sites

Couple of reasons.

 

I use the session with other contributions and so storing in the dbase is easier to manipulate its contents. Also I don't have to remember to change the directory settings or run the chance to accidentally have the tmp directory cached by search engines. (like leaving it inside the catalog path)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...