| View previous topic :: View next topic |
| Author |
Message |
leon_pegg
Joined: 12 Jun 2006 Posts: 113 Location: hemel / UK
|
Posted: Tue Oct 31, 2006 2:05 pm Post subject: Gtk classes in sessions |
|
|
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
|
|
| Back to top |
|
 |
leon_pegg
Joined: 12 Jun 2006 Posts: 113 Location: hemel / UK
|
Posted: Wed Nov 01, 2006 2:31 am Post subject: |
|
|
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
|
Posted: Wed Nov 01, 2006 9:04 am Post subject: |
|
|
| I doubt that php-gtk objects are meant to be serialized |
|
| Back to top |
|
 |
|