klox7 Posted October 23, 2010 Posted October 23, 2010 Hello! If I'm loged in the site and go to this link .php?html_id=11?osCsid= I get loged out. Then I noticed if I change in url the second ? to $ it works fine .php?html_id=11&osCsid= How can I change this and where? Thank you Quote
germ Posted October 23, 2010 Posted October 23, 2010 If you post the source code that makes the links I'll help you fix it. Look in /includes/boxes/information.php Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 (edited) Here is the code from /includes/boxes/information.php: <?php /* $Id: information.php,v 1.6 2002/11/22 18:56:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $product_check_query = tep_db_query("SELECT html_id,html_ime,html_opis FROM html_strani ORDER BY language_id"); $information = ''; $i=0; while($html_stran = tep_db_fetch_array($product_check_query)){ if($i==0) $information .= '<li class="ibg_list_un"><a href="' . tep_href_link(FILENAME_SHIPPING. '?html_id=' .$html_stran['html_id']) . '">'.$html_stran['html_ime'].'</a></li>' ; else{ if($i==1){ $information .= '<li class="ibg_list "><a href="' . tep_href_link('pogoji_poslovanja.php') . '">Pogoji poslovanja</a></li><li class="ibg_list"><a href="' . tep_href_link(FILENAME_SHIPPING. '?html_id=' .$html_stran['html_id']) . '">'.$html_stran['html_ime'].'</a></li>' ; }else{ $information .= '<li class="ibg_list"><a href="' . tep_href_link(FILENAME_SHIPPING. '?html_id=' .$html_stran['html_id']) . '">'.$html_stran['html_ime'].'</a></li>' ; }} $i++; } $info_box_contents = array(); $info_box_contents[] = array('text' => '<ul>'. $information. '<li class="ibg_list "><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">Kontaktirajte nas</a></li>'. '</ul>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> And is it possible that it has something to do with this in seo.class.php in line 1411 (there is ? as a separator)? $link = $connection == 'NONSSL' ? $this->base_url : $this->base_url_ssl; $separator = '?'; if ($this->not_null($parameters)) { $link .= $this->parse_parameters($page, $parameters, $separator); } else { $link .= $page; } Thanks a lot Edited October 24, 2010 by mave Quote
germ Posted October 24, 2010 Posted October 24, 2010 Whoever coded that doesn't understand how the osC function tep_href_link() works. >_< Backup the file and try the code below: <?php /* $Id: information.php,v 1.6 2002/11/22 18:56:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $product_check_query = tep_db_query("SELECT html_id,html_ime,html_opis FROM html_strani ORDER BY language_id"); $information = ''; $i=0; while($html_stran = tep_db_fetch_array($product_check_query)){ if($i==0) $information .= '<li class="ibg_list_un"><a href="' . tep_href_link(FILENAME_SHIPPING , 'html_id=' .$html_stran['html_id']) . '">'.$html_stran['html_ime'].'</a></li>' ; else{ if($i==1){ $information .= '<li class="ibg_list "><a href="' . tep_href_link('pogoji_poslovanja.php') . '">Pogoji poslovanja</a></li><li class="ibg_list"><a href="' . tep_href_link(FILENAME_SHIPPING , 'html_id=' .$html_stran['html_id']) . '">'.$html_stran['html_ime'].'</a></li>' ; }else{ $information .= '<li class="ibg_list"><a href="' . tep_href_link(FILENAME_SHIPPING , 'html_id=' .$html_stran['html_id']) . '">'.$html_stran['html_ime'].'</a></li>' ; }} $i++; } $info_box_contents = array(); $info_box_contents[] = array('text' => '<ul>' . $information . '<li class="ibg_list "><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">Kontaktirajte nas</a></li>'. '</ul>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 That worked like a charm :thumbsup: Thank you! ...and yes, probably he didn't understand how to code this because generaly there are a lot of mistakes. Regarding this I have anoter question. How to do this (not get loged out) for this kind of link: <a href="shipping.php?html_id=6"><?php echo tep_image(DIR_WS_IMAGES . 'dostava-blaga.png','Dostava blaga', '','');?></a> And the same thing happens if I use search. When you hit search I get loged out and I lose my osCsid. Quote
germ Posted October 24, 2010 Posted October 24, 2010 (edited) <?php echo '<a href="' . tep_href_link(FILENAME_SHIPPING , 'html_id=6') . '">' . tep_image(DIR_WS_IMAGES . 'dostava-blaga.png','Dostava blaga') . '</a>'; ?> Edited October 24, 2010 by germ Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 Is there a way to fix this in search. If I use search engine on site I also get loged out. Quote
germ Posted October 24, 2010 Posted October 24, 2010 Sounds like who ever coded it is just using simple HTML for the form and not the proper PHP code. That would cause what you are experiencing. Again, if you post the code I'll help you fix it. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 (edited) If the code is in includes/boxes/search.php than this is it: <?php /* $Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- search //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SEARCH); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => ' <table cellpadding="0" cellspacing="4" border="0"> <tr><td colspan="2" style="width:100%;vertical-align:middle;">'. tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="height:19px; width:100%;"') . '' . tep_hide_session_id() . '</td></tr> <tr><td class="bg_input ie6_png">' . tep_hide_session_id() . tep_image_submit('button_quick_find.png', BOX_HEADING_SEARCH,' style="float:right;vertical-align:middle;margin:0px 0px 0px 12px;"') . '' . BOX_SEARCH_TEXT . '</td></tr> <tr><td><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a></td></tr> </table> '); new infoBox($info_box_contents); ?> </td> </tr> <!-- search_eof //--> Edited October 24, 2010 by mave Quote
germ Posted October 24, 2010 Posted October 24, 2010 I don't think that code is used on the site. If you are talking about the search box in the upper left corner of the site I think the code is in /includes/header.php Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 Ups...here is the code (but just a part since it is long): <table cellpadding="0" cellspacing="0" border="0"> <tr><td class="header"> <table cellpadding="0" cellspacing="0" border="0"> <tr><td class="navigation"> <?php echo tep_draw_form('search',tep_href_link(FILENAME_ADVANCED_SEARCH, '', 'NONSSL', false),'post') ?> <div class = "search"> <div class = "searchInput"><input type="text" name="keywords" class="go" value="Išči po trgovini" onfocus="this.value=''"></div> <div class = "searchBtn"><?php echo tep_image_submit('searchIcon.png','Išèi')?></div> </div </form> </td></tr> <tr><td> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="logo"><a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image(DIR_WS_IMAGES.'logo.png');?></a></td> <td style="width:100%;"> <div class="menu"> Quote
germ Posted October 24, 2010 Posted October 24, 2010 Not the problem. I just noticed two things. One - You have one of the SEO URL mods installed. That might be the problem. Two - The site isn't making any cookies and the oscSid never goes away. It should be gone after only a few clicks. You might have a problem with the cookie settings in the config file. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 I checked and there is Ultimate SEO instaled. But I don't see any settings for cookies in includes/configure.php <?php define('HTTP_SERVER', 'http://'); define('HTTP_CATALOG_SERVER', 'http://'); define('HTTPS_CATALOG_SERVER', 'https://'); define('ENABLE_SSL_CATALOG', 'true'); define('DIR_FS_DOCUMENT_ROOT', 'public_html/'); define('DIR_WS_ADMIN', '/'); define('DIR_FS_ADMIN', ''); define('DIR_WS_CATALOG', '/'); define('DIR_FS_CATALOG', 'public_html/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_WS_SPG_SHIPPING', DIR_WS_MODULES . 'spg_shipping/'); define('DB_SERVER', ''); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> Quote
germ Posted October 24, 2010 Posted October 24, 2010 Wrong config file. :blush: That's the admin one - look in the catalog one. And let me correct myself. It is making cookies - just not the "normal" cookie with the oscSid in it seen on osc installs. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 24, 2010 Author Posted October 24, 2010 I was looking at both of them and copied wrong one :blush: .Here is the code from catalog/includes/configure.php <?php /* $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://'); define('HTTP_CATALOG_SERVER', 'http://'); define('HTTPS_SERVER', 'https://'); define('ENABLE_SSL_CATALOG', 'true'); define('DIR_FS_DOCUMENT_ROOT', '/public_html/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', '/public_html/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_FS_CATALOG', '/public_html/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/') define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_WS_PRODUCT_IMAGE_CACHE_FS_PATH',DIR_FS_CATALOG . 'img_cache'); define('DIR_WS_PRODUCT_IMAGE_CACHE_HTTP_PATH',HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'img_cache'); define('DB_SERVER', ''); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> Quote
germ Posted October 24, 2010 Posted October 24, 2010 That one is screwed up, too. Sent you a PM with lines to add. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted October 24, 2010 Posted October 24, 2010 It's still not making the right cookie. Did you add the lines to the catalog config file? :unsure: Check the config file on the server to be sure it has the new lines. If you change it locally then FTP to the server permissions on the server can prevent the file from being overwritten. Something else to check. In the includes FOLDER (catalog and admin) where the normal configure.php files are there is a FOLDER named local On some installs there may be a configure.php inside the local FOLDER (catalog and admin) If there is, anything in it overrides anything in the normal configure.php files. If the cookie settings are there then it's either a problem with the SEO add-on or your template. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
klox7 Posted October 25, 2010 Author Posted October 25, 2010 Permissions was the problem. I uploaded it again. There is a local folder in both admin and catalog but just with this readme file: "This directory contains local configuration information. It also must contain a file named configure.php that can be used to override the defaults set in application_top.php Remember to execute PHP commands the file needs to start with <?php and end with ?>" Quote
klox7 Posted October 25, 2010 Author Posted October 25, 2010 After updating config file it now started to work. When you search you don't get logged out anymore :D . And in url &osCsid is gone. Quote
klox7 Posted October 25, 2010 Author Posted October 25, 2010 Just for info these lines were added in catalog/includes/configure.php define('HTTP_COOKIE_DOMAIN', '.example.com'); define('HTTPS_COOKIE_DOMAIN', '.example.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.