Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Losing oscid in admin section


Peper

Recommended Posts

Need some help

 

My shop have got a quite a few addons installed

For some addons if I select something I need to log in again to continue

 

There is no images or so that needs to load, where can I start to look at the cause?

 

My sessions is configured as follows:

 

Session Directory tmp

Force Cookie Use True Info

Check SSL Session ID False Info

Check User Agent False Info

Check IP Address False Info

Prevent Spider Sessions True

Recreate Session True

 

Thanks

Getting the Phoenix off the ground

Link to comment
Share on other sites

Need some help

 

My shop have got a quite a few addons installed

For some addons if I select something I need to log in again to continue

 

There is no images or so that needs to load, where can I start to look at the cause?

 

My sessions is configured as follows:

 

Session Directory tmp

Force Cookie Use True Info

Check SSL Session ID False Info

Check User Agent False Info

Check IP Address False Info

Prevent Spider Sessions True

Recreate Session True

 

Thanks

Hi If your suing Session Directory tmp

you must use the full path ie /user/public_html/tmp/

 

Steve

Link to comment
Share on other sites

My shop have got a quite a few addons installed

For some addons if I select something I need to log in again to continue

Select what? From a drop-down menu? That would mean your browser is not accepting cookies? It there always a osCAdminID in the get variables of the url visible when you work in the admin?

Link to comment
Share on other sites

Select what? From a drop-down menu? That would mean your browser is not accepting cookies? It there always a osCAdminID in the get variables of the url visible when you work in the admin?

 

It is when I'm using drop down menu - the url display the filename e.g. admin/quick_updates.php then I select manufacturers and get logged out.

 

This also happens to some other addons when selecting from a drop down

Getting the Phoenix off the ground

Link to comment
Share on other sites

It is when I'm using drop down menu - the url display the filename e.g. admin/quick_updates.php then I select manufacturers and get logged out.

 

This also happens to some other addons when selecting from a drop down

 

I do believe there is something wrong with the setting of cookies then in your admin section. But even then it can be fixed by adding the session id to get based forms. You will find examples in e.g. admin/categories.php (note the echo tep_hide_session_id()):

 

<?php
   echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get');
   echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
   echo tep_hide_session_id() . '</form>';
?>

Link to comment
Share on other sites

I do believe there is something wrong with the setting of cookies then in your admin section. But even then it can be fixed by adding the session id to get based forms. You will find examples in e.g. admin/categories.php (note the echo tep_hide_session_id()):

 

<?php
   echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get');
   echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
   echo tep_hide_session_id() . '</form>';
?>

Do I need to add this code to application_top.php? - I found code though in admin/categories.php or do I need to add the code for every page that I get logged out from

Getting the Phoenix off the ground

Link to comment
Share on other sites

do I need to add the code for every page that I get logged out from

Search for the </form> tags and see if the corresponding tep_draw_form has a "get" parameter in every page that you get logged-out from. If so, then add the echo tep_hide_session_id() as in the example.

Link to comment
Share on other sites

Thank you for the help so far :thumbsup:

 

The only problem is from edit_orders.php - I searched the support forum but found nothing

 

When I change the order "Status" I get logged out

 

Thanks again for help

 

Ps. I couldn't insert code from edit_orders.php - too long

Edited by Peper

Getting the Phoenix off the ground

Link to comment
Share on other sites

Hi Jan

 

It seems there must be something wrong, the drop down selections boxes is giving me endless hassle see code e.g.

 

<table width="100%" cellspacing="0" cellpadding="0" border="1" bgcolor="#F3F9FB" bordercolor="#D1E7EF" height="100"><tr align="left"><td valign="middle">
                               <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                       <tr><td height="5"></td></tr>
                                       <tr align="center">
                                               <td class="smalltext"><?php echo tep_draw_form('row_by_page', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field( 'cPath', $current_category_id);?></td>
                                               <td class="smallText"><?php echo TEXT_MAXI_ROW_BY_PAGE . '  ' . tep_draw_pull_down_menu('row_by_page', $row_bypage_array, $row_by_page, 'onChange="this.form.submit();"');?></form></td>
                                               <?php echo tep_draw_form('categorie', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); ?>
                                               <td class="smallText" align="center" valign="top"><?php echo DISPLAY_CATEGORIES . '  ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); ?></td></form>
                                               <?php echo tep_draw_form('manufacturers', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'cPath', $current_category_id); ?>
                                               <td class="smallText" align="center" valign="top"><?php echo DISPLAY_MANUFACTURERS . '  ' . manufacturers_list(); ?></td></form>
                                       </tr>
                               </table>

 

 

Changed to

 

 <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                       <tr><td height="5"></td></tr>
                                       <tr align="center">
                                               <td class="smalltext"><?php echo tep_draw_form('row_by_page', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field( 'cPath', $current_category_id);?></td>
                                               <td class="smallText"><?php echo TEXT_MAXI_ROW_BY_PAGE . '  ' . tep_draw_pull_down_menu('row_by_page', $row_bypage_array, $row_by_page, 'onChange="this.form.submit();"');
   echo tep_hide_session_id();
?></form></td>
                                               <?php echo tep_draw_form('categorie', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); ?>
                                               <td class="smallText" align="center" valign="top"><?php echo DISPLAY_CATEGORIES . '  ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
											echo tep_hide_session_id();
 ?></td></form>
                                               <?php echo tep_draw_form('manufacturers', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'cPath', $current_category_id);
											echo tep_hide_session_id();
?>
                                               <td class="smallText" align="center" valign="top"><?php echo DISPLAY_MANUFACTURERS . '  ' . manufacturers_list(); ?></td></form>
                                       </tr>
                               </table>

 

and still getting logged out, this goes to a few other contributions where I use drop down boxes

 

Any help please

Getting the Phoenix off the ground

Link to comment
Share on other sites

and still getting logged out, this goes to a few other contributions where I use drop down boxes

Strange. Does the osCAdminID get shown in the form correctly. Example, this is from the drop-down in the top right corner when I set my browser not to acccept cookies:

<form name="goto" action="http://127.0.0.1/catalog/admin/categories.php?osCAdminID=fbcd9742b5e5ab5465a495704217c7cf" method="get">Go To: <select name="cPath" onChange="this.form.submit();"><option value="0" SELECTED>Top</option><option value="1">Hardware</option>
...many more options left out ...
<option value="14">   Thriller</option></select><input type="hidden" name="osCAdminID" value="fbcd9742b5e5ab5465a495704217c7cf"></form> 

Link to comment
Share on other sites

Strange. Does the osCAdminID get shown in the form correctly. Example, this is from the drop-down in the top right corner when I set my browser not to acccept cookies:

<form name="goto" action="http://127.0.0.1/catalog/admin/categories.php?osCAdminID=fbcd9742b5e5ab5465a495704217c7cf" method="get">Go To: <select name="cPath" onChange="this.form.submit();"><option value="0" SELECTED>Top</option><option value="1">Hardware</option>
...many more options left out ...
<option value="14">   Thriller</option></select><input type="hidden" name="osCAdminID" value="fbcd9742b5e5ab5465a495704217c7cf"></form> 

 

Thanks Jan, got this sorted..after months actually

 

In my admin configure.php there was an error - this would have lead to all the problems in first place

Was running on sub domain and one path were wrong

 

Thanks again

Getting the Phoenix off the ground

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...