nights Posted January 14, 2007 Share Posted January 14, 2007 I am new to OSCommerce, After i have install, Icannot access the admin page. It has below error: Parse error: syntax error, unexpected '(', expecting ',' or ';' in /home/razor/public_html/admin/includes/classes/sessions.php on line 34 I have see the soucre of sessions.php. I cannot find and problem on it. Please help. class php3session { var $name = PHP_SESSION_NAME; var $auto_start = false; var $referer_check = false; var $save_path = PHP_SESSION_SAVE_PATH; var $save_handler = 'php3session_files'; var $lifetime = 0; var $cache_limiter = 'nocache'; var $cache_expire = 180; var $use_cookies = true; var $cookie_lifetime = 0; var $cookie_path = substr(DIR_WS_ADMIN, 0,-1); //<-----line 34 var $cookie_domain = ''; var $gc_probability = 1; var $gc_maxlifetime = 0; var $serialize_handler = 'php'; var $ID; var $nr_open_sessions = 0; var $mod_name = ''; var $id; var $delimiter = "\n"; var $delimiter_value = '[==]'; function php3session() { $this->mod_name = $this->save_handler; } } I am using apache 2.2 + php 5. Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2007 Share Posted January 14, 2007 Copy this and paste it in place of that line var $cookie_path = substr(DIR_WS_ADMIN, 0, -1); var $cookie_path = substr(DIR_WS_ADMIN, 0, -1); here is yours see the difference? var $cookie_path = substr(DIR_WS_ADMIN, 0,-1); Mine has a space between , -1 Link to comment Share on other sites More sharing options...
nights Posted January 14, 2007 Author Share Posted January 14, 2007 Copy this and paste it in place of that line var $cookie_path = substr(DIR_WS_ADMIN, 0, -1); var $cookie_path = substr(DIR_WS_ADMIN, 0, -1); here is yours see the difference? var $cookie_path = substr(DIR_WS_ADMIN, 0,-1); Mine has a space between , -1 Thx for your help. I have tried, but the result is same. Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2007 Share Posted January 14, 2007 well how comes you're using php5 and the sessions aren't supported? This file is used for php3 because of the session_start. Unless you changed something in your catalog\includes\application_top.php Link to comment Share on other sites More sharing options...
nights Posted January 14, 2007 Author Share Posted January 14, 2007 well how comes you're using php5 and the sessions aren't supported? This file is used for php3 because of the session_start. Unless you changed something in your catalog\includes\application_top.php I havent change the code. I have turn on the session support in PHP. Are there any thing I need to config for the PHP?? Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2007 Share Posted January 14, 2007 not sure I understand what you mean by turning the sessions on in php. If you're talking about the php.ini the defaults should be just fine, assuming you have your own server. But looking at the error reported shows it uses the admin/includes/classes/sessions.php That file will be used if the session_start function does not exist. ie prior to PHP4. So you could place a php script in the root of the osc catalog and run it like: <?php phpinfo(); ?> shows php5 right? Also if the catalog end works it means something else is incorrect with the admin because it performs the same test there. Link to comment Share on other sites More sharing options...
nights Posted January 14, 2007 Author Share Posted January 14, 2007 not sure I understand what you mean by turning the sessions on in php. If you're talking about the php.ini the defaults should be just fine, assuming you have your own server. But looking at the error reported shows it uses the admin/includes/classes/sessions.php That file will be used if the session_start function does not exist. ie prior to PHP4. So you could place a php script in the root of the osc catalog and run it like: <?php phpinfo(); ?> shows php5 right? Also if the catalog end works it means something else is incorrect with the admin because it performs the same test there. THX, I have solved. I forget i have add disable-all when I install the PHP. Link to comment Share on other sites More sharing options...
siano Posted July 10, 2007 Share Posted July 10, 2007 THX, I have solved. I forget i have add disable-all when I install the PHP. I have the same issue - not sure what you mean by 'I forget i have add disable-all' please elaborate. I just had my server upgraded from 4.4.6 to 4.4.7 and cURL enabled. Thanks Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.