Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with sessions


bigdave1514

Recommended Posts

Posted

Hi, I've got osCommerce installed and configured ok on my local Apache test server but I get the following errors which I can't seem to rectify:

 

Warning: session_start(): open(\\sess_618a903004466192103265ae5d7c28a2, O_RDWR) failed: Invalid argument (22) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

My sessions.php file is exactly as downloaded from the site but I've tried various things to fix this problem with no luck.

 

I'd appreciate any suggestions! :D

 

Thanks a lot,

Dave.

Posted
Hi, I've got osCommerce installed and configured ok on my local Apache test server but I get the following errors which I can't seem to rectify:

 

Warning: session_start(): open(\\sess_618a903004466192103265ae5d7c28a2, O_RDWR) failed: Invalid argument (22) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

My sessions.php file is exactly as downloaded from the site but I've tried various things to fix this problem with no luck.

 

I'd appreciate any suggestions!  :D

 

Thanks a lot,

Dave.

 

 

leave your sessions file alone.

 

in configure.php set this :

 

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

Treasurer MFC

Posted
leave your sessions file alone.

 

in configure.php set this :

 

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

Thanks, that did the trick!

 

Still got a similar problem in the admin tool though:

 

Warning: session_start(): open(\\sess_14a18ec81df5315da629015d0d2640f3, O_RDWR) failed: Invalid argument (22) in C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php on line 67

 

Anyone got a solution for this?

 

Thanks!

Posted
Thanks, that did the trick!

 

Still got a similar problem in the admin tool though:

 

Warning: session_start(): open(\\sess_14a18ec81df5315da629015d0d2640f3, O_RDWR) failed: Invalid argument (22) in C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\admin\includes\functions\sessions.php on line 67

 

Anyone got a solution for this?

 

Thanks!

 

 

same solution for the other configure.php

Treasurer MFC

  • 3 weeks later...
Posted
leave your sessions file alone.

 

in configure.php set this :

 

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

 

 

 

Your my hero!!! Weird error. I would have never though of it as being the cause!

Posted

Create - c:\tmp

and all works OK

 

 

Hi, I've got osCommerce installed and configured ok on my local Apache test server but I get the following errors which I can't seem to rectify:

 

Warning: session_start(): open(\\sess_618a903004466192103265ae5d7c28a2, O_RDWR) failed: Invalid argument (22) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php:67) in C:\Program Files\Apache Group\Apache2\htdocs\includes\functions\sessions.php on line 67

 

My sessions.php file is exactly as downloaded from the site but I've tried various things to fix this problem with no luck.

 

I'd appreciate any suggestions!  :D

 

Thanks a lot,

Dave.

  • 2 weeks later...
Posted
Create - c:\tmp

and all works OK

 

In the OSC documentation, I saw this:

 

If the secure webserver is on a different server than the normal webserver, the session data needs to be stored in the database in order for both webservers to successfully share the session data.

 

My secure webserver is different than the site hosting webserver. Should tmp still be used? If so, should I create in on the same level as admin and catalog or inside one of them? Thanks, AMc

Should I stay or should I go now? Thanks and goodbye Joe.

Posted

My hosts says they can move from the non-secure pages to the secure pages successfully, so I'm guessing it's either my session or cache mechanics that are causing a problem with just my local system. I've cleared my cookies and files from Temp.Int.Files and still get an empty cart after moving to a secured file.

 

Help! Thanks, AMc

Should I stay or should I go now? Thanks and goodbye Joe.

Posted

My SSL is on a different server, which I'm told means I need to use mySQL for sessions. Cart contents do not transfer to secure pages.

 

Here are my configure files:

catalog/includes/configure.php

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.lowacid-coffee.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://lowacid-coffee.floridaserver.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', '');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

admin/includes/configure.php

?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', 'http://www.lowacid-coffee.com/'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', 'http://www.lowacid-coffee.com/');
 define('HTTPS_CATALOG_SERVER', 'https://lowacid-coffee.floridaserver.com');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
 define('DB_SERVER', '');
 define('DB_SERVER_USERNAME', 'mysql');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

REALLY STUCK!!! Thanks for any help

Should I stay or should I go now? Thanks and goodbye Joe.

Posted

My host control panel says this is my mysql server:

 

mysql.floridaserver.com

 

Is there a right place for that in my configure.php files

Should I stay or should I go now? Thanks and goodbye Joe.

Posted
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/holga/public_html/store/includes/configure.php:48) in /home/holga/public_html/store/includes/functions/sessions.php on line 67

 

help help this is the thing i saw on my site. what is there to change?

Posted
My SSL is on a different server, which I'm told means I need to use mySQL for sessions.  Cart contents do not transfer to secure pages.

 

Here are my configure files:

catalog/includes/configure.php

<?php
/*
?$Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
?define('HTTP_SERVER', 'http://www.lowacid-coffee.com'); // eg, http://localhost - should not be empty for productive servers
?define('HTTPS_SERVER', 'https://lowacid-coffee.floridaserver.com'); // eg, https://localhost - should not be empty for productive servers
?define('ENABLE_SSL', true); // secure webserver for checkout procedure?
?define('HTTP_COOKIE_DOMAIN', '[B]www.lowacid-coffee.com[/B]');
?define('HTTPS_COOKIE_DOMAIN', '');
?define('HTTP_COOKIE_PATH', '[B]/[/B]');
?define('HTTPS_COOKIE_PATH', '');
?define('DIR_WS_HTTP_CATALOG', '/catalog/');
?define('DIR_WS_HTTPS_CATALOG', '/catalog/');
?define('DIR_WS_IMAGES', 'images/');
?define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
?define('DIR_WS_INCLUDES', 'includes/');
?define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
?define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
?define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
?define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
?define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

?define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
?define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
?define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
?define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
?define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
?define('DB_SERVER_USERNAME', '');
?define('DB_SERVER_PASSWORD', '');
?define('DB_DATABASE', 'osCommerce');
?define('USE_PCONNECT', 'false'); // use persistent connections?
?define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

admin/includes/configure.php

?php
/*
?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2002 osCommerce

?Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
?define('HTTP_SERVER', 'http://www.lowacid-coffee.com/'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
?define('HTTP_CATALOG_SERVER', 'http://www.lowacid-coffee.com/');
?define('HTTPS_CATALOG_SERVER', 'https://lowacid-coffee.floridaserver.com');
?define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
?define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
?define('DIR_WS_ADMIN', '[B]/catalog[/B]/admin/');
?define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
?define('DIR_WS_CATALOG', '/catalog/');
?define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
?define('DIR_WS_IMAGES', 'images/');
?define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
?define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
?define('DIR_WS_INCLUDES', 'includes/');
?define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
?define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
?define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
?define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
?define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
?define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
?define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
?define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
?define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
?define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
?define('DB_SERVER', '');
?define('DB_SERVER_USERNAME', 'mysql');
?define('DB_SERVER_PASSWORD', '');
?define('DB_DATABASE', 'osCommerce');
?define('USE_PCONNECT', 'false');
?define('STORE_SESSIONS', 'mysql');
?>

 

REALLY STUCK!!!  Thanks for any help

 

Vger

Posted

It doesn't matter whether your database is on a separate server or not. If your website is hosted on a shared server you should not be storing sessions in files. Store them in the database. I would also advise against using the Cache function unless you know how to set up a tmp folder outside of your stores root, else you can end up seeing other people's 'categories', along with their links, in the left hand column of your website.

 

Vger

Archived

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

×
×
  • Create New...