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 October 26th, 2004, 03:38 PM
sharyn sharyn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 32 sharyn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 53 m 17 sec
Reputation Power: 5
session problem

I am trying to open a named pipe and saving the file pointer using a session variable. However, while other session variable seem to be saved just fine, the session variable for the file pointer doesn't get saved.

PHP Code:
if (($_SESSION['Pipe_open'] == ))
   {
     if  ( !( 
$_SESSION['Pipe_fp'] = fopen("/Users/administrator/Sites/maps/PipeFile","w") ) )
       echo 
"ERROR :: Can't open PipeFile<br>";
     else
       
$_SESSION['Pipe_open'] = 1;  
   }
   
   
$Pipe_fp_check $_SESSION['Pipe_fp'];
   
   if ( !(
$Pipe_fp_check) ) echo "Error :: pipe not open<br>"


The first time around, the pipe gets opened and everything checks out fine. The next time around, it doesn't re-open the pipe, but the Pipe_fp session variable is not set anymore.

Can anyone help? Thanks a million

-sharyn

Reply With Quote
  #2  
Old October 26th, 2004, 06:29 PM
sharyn sharyn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 32 sharyn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 53 m 17 sec
Reputation Power: 5
Unhappy

ok, I guess I can't assign file pointers to session variables... time to move on...

from the manual :
Quote:
Warning
Some types of data can not be serialized thus stored in sessions. It includes resource variables or objects with circular references (i.e. objects which passes a reference to itself to another object).

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > session problem


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT