If you are using MySQL based sessions in your osCommerce installation and your PHP runs with Safe Mode set to On, you receive the following message:
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 149
We also recommend this MOD when your web server has Safe Mode Off too.
Open:
catalog/includes/functions/sessions.php
Find:
function tep_session_save_path($path = '') { if (!empty($path)) { return session_save_path($path); } else { return session_save_path(); } }
Replace with:
function tep_session_save_path($path = '') { if (STORE_SESSIONS != 'mysql') { if (!empty($path)) { return session_save_path($path); } else { return session_save_path(); } } }
Open:
catalog/admin/includes/functions/sessions.php
Find:
function tep_session_save_path($path = '') { if ($path != '') { return session_save_path($path); } else { return session_save_path(); } }
Replace with
function tep_session_save_path($path = '') { if (STORE_SESSIONS != 'mysql') { if (!empty($path)) { return session_save_path($path); } else { return session_save_path(); } } }
Save and close all files and it’s done!