gnope php gtk gui gnope.org  

Gtk classes in sessions

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
leon_pegg



Joined: 12 Jun 2006
Posts: 113
Location: hemel / UK

PostPosted: Tue Oct 31, 2006 2:05 pm    Post subject: Gtk classes in sessions Reply with quote

I dont know if this is expected behavior but i would expect it is not.
running this pice of code i would expect it to save the gtk class definition then restore it but it crashes is this expected behavior
Code:

<?php
session_id("restore");
session_start();
$_SESSION['testwindow'] = new gtkwindow();
session_write_close();
session_id("restore");
session_start();
?>

kind regards leon
Back to top
Osiris



Joined: 17 Dec 2005
Posts: 65

PostPosted: Wed Nov 01, 2006 1:25 am    Post subject: Reply with quote

hi,

maybe the following link is an answer to your question:
Serializing objects - objects in sessions

Regards

Christian[/url]
Back to top
leon_pegg



Joined: 12 Jun 2006
Posts: 113
Location: hemel / UK

PostPosted: Wed Nov 01, 2006 2:31 am    Post subject: Reply with quote

ok i should have said this is not the desiarded result
take the following
Code:

<?php
$window = new gtkwindow();
$windowstr = serialize($window);
$window = unserialize($windowstr);
?>

this will crash php were the correct effect would be to recreate the object.
i have noticed that you can serialize gtk objects but not unserialize them.
any ideas on the reason for this.
thanks for the link but not realy that helpful

I feel this may be a bug in the php-gtk extention.
only tested on windows.

regards leon
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed Nov 01, 2006 9:04 am    Post subject: Reply with quote

I doubt that php-gtk objects are meant to be serialized
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.