PDA

View Full Version : Help on Sessions error - installation



red_fraggle
02-28-2004, 04:42 PM
Wahts this mean! happens when i change the defualt /tmp directtory for sessions. Where is this directory supoposed to be created, i have tried the root and under admin to no avail.


Cliff....



Warning: session_start(): open(/temp/sess_fa03c1835a4bbcea97b12b472870419b, O_RDWR) failed: No such file or directory (2) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/includes/functions/sessions.php:67) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/includes/functions/sessions.php:67) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/includes/functions/sessions.php on line 67
Warning: Installation directory exists at: /hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/install. Please remove this directory for security reasons.
Warning: I am able to write to the configuration file: /hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.
Warning: The sessions directory does not exist: /temp. Sessions will not work until this directory is created.

jonthewebb
02-29-2004, 10:06 AM
Well... obviously it's trying to find a directory that doesn't exist. Where you create it might depend on where you have access to with your host. probably for you, if you can ftp to the directory which holds your root folder (I expect in the cmurphy/ directory... this would be outside of the document root and therefore not accessible directly by anyone looking at your site) you should create a folder named temp or whatever. Then you need to go to the admin panel, select configuration->sessions and change the session directory to /home/hsphere/local/home/cmurphy/temp.

The directory needs to be writeable, CHMOD to 666 ( think that is correct....)


Once you've done that most of the other errors will go away too.

jon

red_fraggle
02-29-2004, 11:30 AM
I have created the following directories.

$root/temp/
$root/catalog/temp/
Both set to CHmod 666 which is read and write for all groups/users

Could this be a bug with using files and not database sessions on a shared server?

At this point i cant even get into my admin due to the error not being able to start a session! Anyone know the p[age i would edit to change the settings to use database sessions instead of files?



If i put this url in my browser, $rootURL/catalog/admin I get a page that says this:

Warning: session_start(): open(/temp/sess_cec4189043836f9b5c4eeac509c7cecd, O_RDWR) failed: No such file or directory (2) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/sessions.php:67) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/sessions.php:67) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/sessions.php on line 67

Warning: Cannot modify header information - headers already sent by (output started at /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/sessions.php:67) in /home/hsphere/local/home/cmurphy/absalute-pleasure.com/catalog/admin/includes/functions/general.php on line 86

Warning: Unknown(): open(/temp/sess_cec4189043836f9b5c4eeac509c7cecd, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/temp) in Unknown on line 0

jonthewebb
02-29-2004, 12:05 PM
Hmmm

sounds tricky. The session directory used is stored in the `configuration` table. You could use phpmyadmin or similar (or the myql client if you're feeling brave...) to find the key SESSION_WRITE_DIRECTORY and change that manually to whatever it needs to be. I would guess that it needs to be:

/home/hsphere/local/home/cmurphy/absalute-pleasure.com/temp

from your error messages. I am not sure what the $root you mention means...


jon

red_fraggle
02-29-2004, 05:59 PM
by $root i meant /home/hsphere/local/home/cmurphy/absalute-pleasure.com. figured would save me some typeing and you would understand.

at thsi point i cant get into admin or anything else for that matter.

Happen to know the key name of the cell that keeps the true/false on wether to use file or database sessions? need to go in and change it back to database so i can get into admin!


Cliff...

jonthewebb
03-01-2004, 01:00 AM
I think that's in the includes/configure.php files...

down at the bottom...

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

red_fraggle
03-01-2004, 10:20 PM
Problem solved!

That did it thanks a bunch jon. Would still like to know why using file session storage causes this to crash. Especially when i have created the directory before hand and given it ch_mod 777 for testing.

Anonymous
04-28-2004, 03:25 PM
quick tip on the chmod command
4-2-1
read-write-execute

7 is all permissoins, read+write+execute,
6 is read+write
5 is read+execute.
4 is read only
3 is write+execute
2 is write only
1 is execute only
0 is of course no permissions.

Also, in case you're unaware, the 3 digits corrospond to
file owner
owner group members
everyone else

So chmod 765 filename gives...
all permissions to the file owner,
read+write for the group members,
read+execute to the rest of the world.

Maybe, just maybe this will save someone a headache or 2 :wink:

neil
04-28-2004, 04:00 PM
temp is a directory inside catalog - used by EasyPopulate.
tmp - if used for sessions - has to be in the level above catalog
ie. created at the same level as public_html on a remote unix server
- usually by tech support if it does not exist already.
If tmp was inside catalog & therefore accessible through a browser,
it would be a security risk. Hijacking of sessions etc.
Much safer to store sessions in the database.

:)