PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 9th, 2006, 04:05 AM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 12
$_FILE,$_SESSION,... not run on localhost,help me.

My website run on localhost normally, but if i use $_FILE or $_SESSION,.. it have error :

"Warning: Undefined variable: _SESSION in... "

If i replace this $_SESSION variable with session name, it's run very well. My code below :

PHP Code:
 session_register("newvt");

$newvt=headcounter("text/counter.txt");
    
echo 
$_SESSION["newvt"];   //replace with this  -> echo $newvt; 


Maybe this error because of php.ini file config.
I post my site to server, it's run normally but my localhost is error.
Anyone help me.

Reply With Quote
  #2  
Old August 9th, 2006, 04:13 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
try to register your session var using $_SESSION instead of session_register:
$_SESSION["newvt"] = "blah";

Read all on this page:
http://nl3.php.net/manual/en/functi...on-register.php

especially parts about register globals and such.

Good luck

Reply With Quote
  #3  
Old August 9th, 2006, 10:15 PM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 12
Quote:
Originally Posted by Icon
try to register your session var using $_SESSION instead of session_register:
$_SESSION["newvt"] = "blah";

Read all on this page:
http://nl3.php.net/manual/en/functi...on-register.php

especially parts about register globals and such.

Good luck


Thank you.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > $_FILE,$_SESSION,... not run on localhost,help me.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap