PDA

View Full Version : session errors - without changing site


jwiskema
12-28-04, 05:30 PM
I have not touch this site in 2 weeks and neither has anyone else. And I am getting session errors... :confused:

I was using a directory called temp (which has a CHMOD of 777) and it is now looking for a directory called tmp (which I created and set permission to 777) and that did not solve the problem.

Warning: session_start(): open(/tmp/sess_779d50773a45471f71de67560203a233, O_RDWR) failed: Permission denied (13) in /www/c/controlsyslabs/htdocs/oscommerce/catalog/includes/functions/sessions.php on line 67

Warning: I am not able to write to the sessions directory: /tmp. Sessions will not work until the right user permissions are set.

Warning: session_write_close(): open(/tmp/sess_779d50773a45471f71de67560203a233, O_RDWR) failed: Permission denied (13) in /www/c/controlsyslabs/htdocs/oscommerce/catalog/includes/functions/sessions.php on line 106

Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /www/c/controlsyslabs/htdocs/oscommerce/catalog/includes/functions/sessions.php on line 106

I also check powweb and there doesn't seem to be any update that would affect this.

Thank you in advanced,
~ J ~

Builder
12-28-04, 06:41 PM
Does this announcement:
http://forum.powweb.com/showthread.php?t=44687
affect that?

Kevin

jwiskema
12-28-04, 06:55 PM
The error at the bottom says that that save path is "session.save_path is correct (/tmp) " but in the php.ini file it is /www/c/controlsyslabs/htdocs/sessions.

How & where is it being set to tmp?

Thanks,
~ J ~

natural
12-28-04, 08:48 PM
In the /includes/configure.php file you should set the sessions to be saved in mysql instead of a file.

it is an entry like this
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
you probably have it empty and it should be mysql.

jwiskema
12-29-04, 12:11 PM
I did that and still the same errors, it seems that no matter what changes I make it doesn't effect it.

I don't think my php.ini file is being used, when I made changes to it they didn't seem to take effect.

Any ideas?

Thanks, :confused:
~ J ~

natural
12-29-04, 01:16 PM
php.ini has nothing to do with the proper functionality of oscommerce. I run a few oscommerce stores on Powweb and I don't have a custom php.ini file.

To make the changes to includes/configure.php you need to chmod it to let's say 755, then make the changes and chmod it back to 400.

How to chmod the file is explained in the sticky thread by Jade.

All you have to do is change the session to be written to mysql and not a file and all will be good.

jwiskema
12-29-04, 02:36 PM
I changed the configure.php where it says:

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

Putting in the 'mysql' and it is still causing errors, I think I am going to comment out the session stuff (where I am getting errors), the site is being used as a catalog not an e-commerce site so hopefully that will help.

Thanks,
~ J ~

jwiskema
12-29-04, 02:47 PM
I changed the CHMOD on the configure.php to 400 and I am just getting an error that says the config is writable.

jwiskema
12-29-04, 02:52 PM
For some reason when I CHMOD through ws_ftp it was not sticking or something, so what I did instead is used the protect.php file: (<?php
chmod('includes/configure.php', 0444);
?>)

uploaded that and it worked. Thank you very much, errors are gone it must have been the 'mysql' in the config, I just needed to get the permission to stick.

You rock!

natural
12-29-04, 03:01 PM
This is correct. You can't chmod below 600 (I think) through ftp, but you can through a php script.

Glad it worked out.

Jade Dragon
12-29-04, 04:19 PM
Also there are two configure.php files to change

/includes/configure.php and /admin/includes/configure.php

=)
Jade

jwiskema
12-29-04, 04:21 PM
ahh - always forget that one, thanks Jade, you rock too.

~ J ~