Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Missing tmp directory


millsr44

Recommended Posts

I've just installed oscommerce and keep getting the message 'Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.' on my index page. I've checked back through old posts and see that it is connected to a tmp directory on my pc, not on the web server. as far as i can see my environment is set up fine and the direcory exists. Does anybody have any ideas?

 

Thanks in advance.

Link to comment
Share on other sites

The /tmp directory must exist on the machine that osc is installed.

 

If running osc on a linux box /tmp should exist (/tmp is the absolute address on a linux box).

 

If running on Windows, open a command shell and type "echo %tmp%" [no quotes] to see if it exists. If not you need to set an environmentatl variable named tmp. You do that from start->control panel->system (depending on the flavor of Windows you're running, but this is the starting point) or you can set it with the command prompt -- type "set tmp="c:\wherever_you_want_the_variable_to_point_to" -- check that it was set with echo %tmp%. Doing it this way tho, the setting will be lost when the machine is rebooting, setting it via control panel will make it persistent.

Link to comment
Share on other sites

The EASIEST thing to do - is store sessions in MYSQL - change BOTH configure.php files (near the bottom).

 

This works on any OS....on any webserver.....

 

Windows is a pain to setup file based sessions...... Not impossable.

Link to comment
Share on other sites

PS: The DEFAULT Windows PHP "tmp" directory is 'C:\PHP\sessiondata' and must have the "IUSR" read/write security permmisions. You can change this - by modifing php.ini

 

Look for and change:

session.save_path = <put your full path here>

This directory must have set the Windows security permmisions for "IUSR" user to read/write.

Link to comment
Share on other sites

Easiest, yes, but potentially slower. From the doc, the mysql option is really meant for shared hosting environments. What is the process of cleaning out sessions from the database? Do they grow forever? Does the admin have to manually go into the db and prune them? I don't know the answer. At least with the file solution (in /tmp) the OS will take care of that problem for you.

Link to comment
Share on other sites

Just so you know - the same problem exist on the file based sessions - files will pile up unless they have a setup to clean it out old files.... Most webserver do have a automatic "clean up" script/program.

Link to comment
Share on other sites

I'm running Linux so the /tmp directory is automatically zapped by a crontab ... with the mysql solution, does osc provide a script that is run automatically or is it up to the admin to write his own or do it manually?

Link to comment
Share on other sites

I've just installed oscommerce and keep getting the message 'Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.' on my index page. I've checked back through old posts and see that it is connected to a tmp directory on my pc, not on the web server. as far as i can see my environment is set up fine and the direcory exists. Does anybody have any ideas?

 

Thanks in advance.

if your running win9x you have to set it (under configurations) as c:\tmp (note the path and the backslash)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...