Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > PHP Programming
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 11-01-2009, 12:48 PM
  #1
SkaFreaks
Champion (Level 13)
 
Join Date: Jan 2004
Location: St. Louis MO USA
Posts: 224
iTrader: (0)
SkaFreaks is on a distinguished road
php.ini Sessions or Cookies?

Hello
So I am trying to move my website to a new server that a friend is hosting. Neither of us know much about the php setup. On the original site I have a login on the main page that works fine, when moving the site to the new server it won't work.

After looking through the php info from the two servers I noticed a difference in the PHP Variables.
old - http://skafreaks.com/test.php
new - http://skafreaks.club1069media.com/test.php

if you look at the PHP Variables, the new server doesn't have _REQUEST or _COOKIE.

Could this cause a problem in all of this?
If so, how can I add this info to the new php.ini file?

Thanks for any help.
SkaFreaks
__________________
Ska's The Shizzle
SkaFreaks is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-06-2009, 09:12 AM
  #2
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 30,730
iTrader: (0)
scoutt is a jewel in the roughscoutt is a jewel in the roughscoutt is a jewel in the rough
_REQUEST or _COOKIE

are Super Globals, you cannot turn them off. COOKIE won't be there probably because you don't have any cookies from that server.
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-06-2009, 12:00 PM
  #3
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
PHP Code:
<?php
ini_set
("display_errors",1);
setcookie("TestCookie""testvalue");
?>
PHP Code:
<?php
ini_set
("display_errors",1);
session_start();

if(
$_SESSION['TestSession'] =="testvalue")
{
echo 
"Sessions work";
}
$_SESSION['TestSession'] = "testvalue";
?>
Does the first create a cookie in your cookie directory and does the second print "Sessions work" after you refresh it few times?
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-06-2009, 07:32 PM
  #4
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 30,730
iTrader: (0)
scoutt is a jewel in the roughscoutt is a jewel in the roughscoutt is a jewel in the rough
Vege, by default this will create the cookie and then delete it since there is no time to the cookie, it expires as soon as it is made.

setcookie("TestCookie", "testvalue");
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-07-2009, 03:26 AM
  #5
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
Quote:
Originally Posted by scoutt View Post
Vege, by default this will create the cookie and then delete it since there is no time to the cookie, it expires as soon as it is made.

setcookie("TestCookie", "testvalue");
From manual:
Quote:
If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes).
So in theory he should have plenty of time to check if it's made.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-07-2009, 10:43 AM
  #6
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 30,730
iTrader: (0)
scoutt is a jewel in the roughscoutt is a jewel in the roughscoutt is a jewel in the rough
That has never been the case for me. You can see it being made in the browser, yes, but as soon as you go to the next page the cookie is always gone. Unless they acutally fixed it. lol
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 11:32 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.