Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 08-28-2003, 07:23 AM   #1 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
&PHPSESSID=3bd08c5d175f7ff5b53919200ce96ad

when i am using sessions within PHP the first page that the user is on always generates a 'PHPSESSID' string at the end of all my links. how do i go about making those never show up? i think they are causing me problems with search engines.

word up.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 08-28-2003, 08:58 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
could it be a php.ini setting?
__________________
Mike
sde is offline   Reply With Quote
Old 08-30-2003, 01:30 PM   #3 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
here is what i ended up using


PHP Code:
<?
$searchengines
=array("Google""Fast""Slurp""W3C_Validator");
$is_search_engine=0;
foreach(
$searchengines as $key => $val) {
if(
strstr("$HTTP_USER_AGENT"$val)) {
$is_search_engine++;
}


if(
$is_search_engine==0) {
session_start();
}
?>
i just resubmitted the site, so hopefully it will work out
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 08-30-2003, 11:04 PM   #4 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
I also found this, add to your .htaccess if you can't edit the php.ini file:
Code:
php_flag session.auto_start off
php_flag use_trans_sid off
bdl is offline   Reply With Quote
Old 09-03-2003, 09:04 AM   #5 (permalink)
Nitro
Registered User
 
Nitro's Avatar
 
Join Date: Jun 2003
Location: London, England
Posts: 29
Nitro is on a distinguished road
Send a message via AIM to Nitro
Why not have a go at making your own sessions. It's very simple, and I have found it much better. I was always having problems with php sessions when logging in, I would sometimes find that to login successfully I had to clear my cache. I dont know if anyone else has had this problem, but I did, and creating my own sessions prevented this, and also seemed to make thing more secure, because you could match an email and password to a session ID, so details dont show up in the browser.
Nitro is offline   Reply With Quote
Old 09-03-2003, 04:21 PM   #6 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
Quote:
Originally posted by bdl
I also found this, add to your .htaccess if you can't edit the php.ini file:
Code:
php_flag session.auto_start off
php_flag use_trans_sid off
if i set it up with "php_flag use_trans_sid off" then users with cookies off wouldnt be able to buy stuff
__________________


Urban Clothing
Admin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 09:53 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting