When I worked with osCommerce projects I had experienced with some common errors those I have mentioned here and also their solutions :

Error Type : Warning: session_save_path() [function.session-save-path]: SAFE MODE Restriction in effect. The script whose uid is X is not allowed to access owned by uid Y in /path/to/your/oscommerce/catalog/includes/functions/sessions.php on line 167
How to fix:
Step 1:  Open catalog/includes/functions/sessions.php

Find the following code

function tep_session_save_path($path = '') {
    if (!empty($path)) {
      return session_save_path($path);
    } else {
      return session_save_path();
    }
  }

and replace with the following code

  function tep_session_save_path($path = '') {
  if (STORE_SESSIONS != 'mysql') {
    if (!empty($path)) {
      return session_save_path($path);
    } else {
      return session_save_path();
    }
  }
  } 
Step 2: Open catalog/admin/includes/functions/sessions.php

Find the following code

  function tep_session_save_path($path = '') {
    if ($path != '') {
      return session_save_path($path);
    } else {
      return session_save_path();
    }
  }
  

and replace with the following code

  function tep_session_save_path($path = '') {
  if (STORE_SESSIONS != 'mysql') {
    if (!empty($path)) {
      return session_save_path($path);
    } else {
      return session_save_path();
    }
  }
  }
Error Type: Warning: I am able to write to the configuration file:  catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.
How to fix:
Make  chmod catalog/includes/configure.php  file to 644
If you are using windows server right  click on catalog/includes/configure.php file
Select  'Properties' (a small window will be opened )
Select/Tick  on Attributes:   'Read-only' and click OK
Error Type:  Warning: session_start() [function.session-start]: open(/tmp\sess_d6bde9ac679d6e3434615010f05b922c, O_RDWR) failed: No such file or directory (2) in catalog\admin\includes\functions\sessions.php on line 102

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\osc_skin\admin\includes\functions\sessions.php:102) in catalog\admin\includes\functions\sessions.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at catalog\admin\includes\functions\sessions.php:102) in catalog\admin\includes\functions\general.php on line 22

Warning: Unknown: open(/tmp\sess_d6bde9ac679d6e3434615010f05b922c, 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 (/tmp) in Unknown on line 0

How to fix:

Step 1:  Open catalog/includes/configure.php
and define session_store to 'mysql'

Step 1-a:  Open catalog/admin/includes/configure.php

and define SESSION_STORES to 'mysql'

I recommend not to use php close tag ?> in the full php script which will help to remove output buffering, white space from the script as a result headers never send before the script is executing.

Tags: , , ,