krh_68 Posted March 5, 2005 Share Posted March 5, 2005 Hi folks, I'm new to oscommerce too, but managed to get a site deployed last night (early morning). My problem is that I can't launch my admin tool at all, I resolved an header issue with the sessions.php file below but am now getting the following message, any ideas? Parse error: parse error, unexpected T_IF in /home/mysitename/public_html/catalog/admin/includes/functions/sessions.php on line 12 here is a section of the script from line 9 to 20 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; } My first post, it may not be my last...... :o Thanks! Karl. Link to comment Share on other sites More sharing options...
241 Posted March 5, 2005 Share Posted March 5, 2005 Hi folks,Parse error: parse error, unexpected T_IF in /home/mysitename/public_html/catalog/admin/includes/functions/sessions.php on line 12 here is a section of the script from line 9 to 20 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; } My first post, it may not be my last...... :o Thanks! Karl. <{POST_SNAPBACK}> the code is correct. how did you resolve your header issue with the sessions.php as that may be what is causing this error, my guess would be that there is a missing piece of code elsewhere which was meant to finish a section of code and due to this being missing the code now runs on to this page causing an error. not the best explanation. The missing code could be a ; semicolon No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
krh_68 Posted March 5, 2005 Author Share Posted March 5, 2005 the code is correct.how did you resolve your header issue with the sessions.php as that may be what is causing this error, my guess would be that there is a missing piece of code elsewhere which was meant to finish a section of code and due to this being missing the code now runs on to this page causing an error. not the best explanation. The missing code could be a ; semicolon <{POST_SNAPBACK}> Hi, thanks for the fast reply, to resolve the header fault I followed an instruction to remove any space after the: <?php and before the: ?> at the top and bottom of the file, instead of sitting on their own line they now look like this (lines 1 to 12): <?php/* $Id: sessions.php,v 1.9 2003/06/23 01:20:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (STORE_SESSIONS == 'mysql') { ***** lines 110 to 113: ***** } else { return session_save_path(); } }?> Thanks, Karl. Link to comment Share on other sites More sharing options...
241 Posted March 5, 2005 Share Posted March 5, 2005 go to your backup copy and upload the file admin/includes/functions/sessions.php I think you may have made a mistake in your edit for the header issue, which may have required another file to be edited or to have mysql set for sessions in the configure.php files. If you do not have a backup copy, then download a copy of the osCommerce and keep it to one side as your backup copy. Open the zip and retrieve the required file to upload No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
krh_68 Posted March 5, 2005 Author Share Posted March 5, 2005 go to your backup copy and upload the file admin/includes/functions/sessions.php I think you may have made a mistake in your edit for the header issue, which may have required another file to be edited or to have mysql set for sessions in the configure.php files. If you do not have a backup copy, then download a copy of the osCommerce and keep it to one side as your backup copy. Open the zip and retrieve the required file to upload <{POST_SNAPBACK}> Thanks, all done, now I get the following error when I try to go to the admin/index.php: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/harteru/public_html/catalog/admin/includes/configure.php:47) in /home/harteru/public_html/catalog/admin/includes/functions/sessions.php on line 67 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/harteru/public_html/catalog/admin/includes/configure.php:47) in /home/harteru/public_html/catalog/admin/includes/functions/sessions.php on line 67 Fatal error: Cannot re-assign $this in /home/harteru/public_html/catalog/admin/includes/classes/upload.php on line 31 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.