Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,191,340 members, 7,943,849 topics. Date: Monday, 09 September 2024 at 06:24 AM

Help With Error Messages On Oscommerce Installation - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Help With Error Messages On Oscommerce Installation (3331 Views)

Oscommerce Vs Opencart Vs Magento Vs Woocommerce. Which Is Best? / Oscommerce Site Map Help / Help With "error 404!" *****CLOSED* ISSUE RESOLVED! (2) (3) (4)

(1) (Reply) (Go Down)

Help With Error Messages On Oscommerce Installation by webemerald(m): 4:28pm On Sep 18, 2007
Hi, folks im having a tryout with oscommerce, but it keeps giving me this errors, i need your help guys.

Warning: session_save_path() [function.session-save-path]: SAFE MODE Restriction in effect. The script whose uid is 40001 is not allowed to access owned by uid 0 in /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/sessions.php on line 161

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/sessions.php:161) in /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/sessions.php on line 97

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/sessions.php:161) in /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/sessions.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/sessions.php:161) in /misc/36/000/143/623/5/user/web/you.com/admin/includes/functions/general.php on line 22
Re: Help With Error Messages On Oscommerce Installation by webemerald(m): 11:04am On Sep 19, 2007
Pls buys i need this,its important
Re: Help With Error Messages On Oscommerce Installation by xanadu: 9:40am On Sep 20, 2007
Hi webemerald. Can you check your script, and post the actual lines referred to on the last lines of each error? That would be helpful.
Re: Help With Error Messages On Oscommerce Installation by webemerald(m): 1:51pm On Sep 20, 2007
heres the entire sessiond.php file

<?php
/*
$Id: sessions.php,v 1.19 2003/07/02 22:10:34 hpdl Exp $

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

Copyright (c) 2007 osCommerce

Released under the GNU General Public License
*/

if (STORE_SESSIONS == 'mysql') {
if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
$SESS_LIFE = 1440;
}

function _sess_open($save_path, $session_name) {
return true;
}

function _sess_close() {
return true;
}

function _sess_read($key) {
$value_query = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'"wink;
$value = tep_db_fetch_array($value_query);

if (isset($value['value'])) {
return $value['value'];
}

return false;
}

function _sess_write($key, $val) {
global $SESS_LIFE;

$expiry = time() + $SESS_LIFE;
$value = $val;

$check_query = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'"wink;
$check = tep_db_fetch_array($check_query);

if ($check['total'] > 0) {
return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'"wink;
} else {
return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')"wink;
}
}

function _sess_destroy($key) {
return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'"wink;
}

function _sess_gc($maxlifetime) {
tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'"wink;

return true;
}

session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
}

function tep_session_start() {
global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;

$sane_session_id = true;

if (isset($HTTP_GET_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) {
unset($HTTP_GET_VARS[tep_session_name()]);

$sane_session_id = false;
}
} elseif (isset($HTTP_POST_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_POST_VARS[tep_session_name()]) == false) {
unset($HTTP_POST_VARS[tep_session_name()]);

$sane_session_id = false;
}
} elseif (isset($HTTP_COOKIE_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_COOKIE_VARS[tep_session_name()]) == false) {
$session_data = session_get_cookie_params();

setcookie(tep_session_name(), '', time()-42000, $session_data['path'], $session_data['domain']);

$sane_session_id = false;
}
}

if ($sane_session_id == false) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

return session_start();
}

function tep_session_register($variable) {
global $session_started;

if ($session_started == true) {
if (PHP_VERSION < 4.3) {
return session_register($variable);
} else {
$_SESSION[$variable] = (isset($GLOBALS[$variable])) ? $GLOBALS[$variable] : null;

$GLOBALS[$variable] =& $_SESSION[$variable];
}
}

return false;
}

function tep_session_is_registered($variable) {
if (PHP_VERSION < 4.3) {
return session_is_registered($variable);
} else {
return isset($_SESSION[$variable]);
}
}

function tep_session_unregister($variable) {
if (PHP_VERSION < 4.3) {
return session_unregister($variable);
} else {
unset($_SESSION[$variable]);
}
}

function tep_session_id($sessid = '') {
if (!empty($sessid)) {
return session_id($sessid);
} else {
return session_id();
}
}

function tep_session_name($name = '') {
if (!empty($name)) {
return session_name($name);
} else {
return session_name();
}
}

function tep_session_close() {
if (PHP_VERSION >= '4.0.4') {
return session_write_close();
} elseif (function_exists('session_close')) {
return session_close();
}
}

function tep_session_destroy() {
return session_destroy();
}

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

function tep_session_recreate() {
if (PHP_VERSION >= 4.1) {
$session_backup = $_SESSION;

unset($_COOKIE[tep_session_name()]);

tep_session_destroy();

if (STORE_SESSIONS == 'mysql') {
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
}

tep_session_start();

$_SESSION = $session_backup;
unset($session_backup);
}
}
?>
Re: Help With Error Messages On Oscommerce Installation by xanadu: 2:54pm On Sep 20, 2007
Hello @webemerald. I think the major issue here is that your web server has got SAFE mode. In basic terms, this is a mode employed by most web hosts now to get around the security issues of shared servers (which is what majority of websites are on anyway). What it does is this: PHP runs a quick check to see if the ownership of any script currently running is the same as that of any file the script is calling. It apears in the case of your files, the ownership is different.

To confirm if safe mode is indeed turned on on your server, enter this command in a php file and run it:
<?php phpinfo(); ?>

It should return all the current php settings as stated in the php.ini file. Search for 'Safe_mode' - it should show whether it is on or off.
Now to try and resolve the issue: You can go around your server's php.ini configuration using your .htaccess, located somewhere in the root folder of your website. You can also create another instance of php.ini and place in your webroot, but personally I prefer simply adding a line to the .htaccess file.

Note: Please back up your site.

1. Open up your .htaccess file
2. Add the following to the file in a new line:
php_flag safe_mode off
3. Save the file.

Test the website again. Hopefully, you should not get the same error again.

Please lets know what happens. Good luck.
Re: Help With Error Messages On Oscommerce Installation by webemerald(m): 3:25pm On Sep 21, 2007
Thanks xanadu, im currently trying out your suggestions but id like to know if its possible to access the php.ini file on a shared hosting server. i saw the path in the result of the php.info but the path isnt accesible.

thanks
Re: Help With Error Messages On Oscommerce Installation by xanadu: 3:42pm On Sep 21, 2007
No, its not possible. You will have to create your own - which is not overly complicated. To do this you will need to edit a copy of a working php.ini 'template' - which you can get if you have a downloaded copy of php. Take a look at this site for steps in creating your own php.ini file:

http://www.dmcinsights.com/phpmysql/phpini.php

Note: Did your phpinfo results state that safe_mode was off? If so, why not consider simply editing the 1 line (the safe_mode line, using the .htaccess way I explained earlier - that's pretty straightforward), rather than creating your own php.ini. Of course, after reading the article above, if you are confident and sure, by all means go ahead and change it. Otherwise, do it the .htaccess way as I explained earlier.

Let me know if you have any further queries.
Re: Help With Error Messages On Oscommerce Installation by webemerald(m): 3:54pm On Sep 21, 2007
safe mode is turned on, i did it and still gave me the errors
Re: Help With Error Messages On Oscommerce Installation by xanadu: 4:08pm On Sep 21, 2007
ok, maybe I need to chat real time with u - just yimmed you - can u respond to that, pls?
Re: Help With Error Messages On Oscommerce Installation by kazey(m): 4:11pm On Sep 21, 2007
This has nothing to do with safemode. Make sure your tmp folder is writeable, and also your session path is defined correctly, if its file based. I would encourage a fresh reinstall with a full catalog and emptying the database after that.
Re: Help With Error Messages On Oscommerce Installation by xanadu: 4:21pm On Sep 21, 2007
@kazey, thanks for your post. If the issue is that he does not have permissions to make the tmp folder writable (which may be the case if he used his web hosts free oscommerce install - and which may be why he needs safe_mode off at least temporarily), he may not be able to make it writeable will he? And it might be wise to try the above before taking he step of reinstalling, I would imagine.

(1) (Reply)

Download MLM Script For Free / 3 Effective Ways Of Promoting Your Affiliate Products In 2019 / How Do I Locate Whogohost Cpanel

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 30
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.