Jump to content

Recommended Posts

hey I have problems with my php session id popping up in the url on mac computers and on pc's after you clean out you cache. And on  whois.sc .com the session id's appear in the address bar as well.

 

The other guys who have shopping carts that are using sessions that are on the same server do not have this problem.

 

Does anyone know of what I am doing that could be causing this? All am doing is using sessionstart() and $_SESSION[''] .

Link to comment
https://forums.phpfreaks.com/topic/58406-solved-_session-question/
Share on other sites

The Session ID will pop up in the URL if session.use_trans_sid=1 in your php.ini file. This happens when the user's browser has cookies either disabled or restricted. Try putting session.use_trans_sid=0 in your php.ini file. Post your chunk of script from session_start(); on up and let me see if there might be something else.

<?php 
  include ('book_sc_fns.php');
  // The shopping cart needs sessions, so start one
  session_start();
  do_html_header('Welcome');

// echo '<font color = #FF0000> <p><b>Select a category below or a brand from above.</b></p></font>';
  
?>





<?php 
  
  
  
echo "<TABLE BORDER=1 bgcolor=#FFFFFF bordercolor=RED bordercolorlight=#33CCFF bordercolordark=RED CELLSPACING=1 ALIGN=left>";
  
  
  
  echo "<tr><td>";
  echo "<b>Please select a category below</b>";

  // get categories out of database
  $cat_array = get_categories();

  // display as links to cat pages
  display_categories($cat_array);
  
  
  
  
  echo "</tr></td>";
  
  echo "</table>";

  ?>
    
<?php
  

  // if logged in as admin, show add, delete, edit cat links
  if(isset($_SESSION['admin_user']))
  {
    display_button('admin.php', 'admin-menu', 'Admin Menu');
  }
  do_html_footer(); 
?>

There might be session info in the book_sc_fns.php include. Do you see any? Make your own php.ini file. Put it in your root directory, and then add session.use_trans_sid=0 to it, and see for yourself if your cart works. You gotta love a host that tells you what to do. It's your business if you screw up your site not theirs, sheesh.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.