|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2000-06-23 06:30 UTC] tite at wolstudios dot com
 Hello. I am trying to have objects and/or classes through php scripts using the session support, but it doesn?t work at all. Is this a future feature? Is it not going to be implemented? if not... why? does the web server's session support doesn?t allow it? would php-dev be interested in something like this? Thank Your for your help. Josafat Moragrega Fernandez Director Tecnico Web On Line Studios PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 06:00:01 2025 UTC | 
What I try to do is to be able to see objects declared in a php web from another web (in the same session). Something like this. test.php: session_start(); class Cart { ...... $carrito = new Cart; session_register("carrito"); ?><A HREF="next_page.php">Next</A><?php .... next_page.php: session_start(); /* If I do it with the class, the sentence $carr = new Cart; Will give me an error **/ echo "<H1>Jur!... (".$carrito->items["10"].")<BR>\n"; /* This will not show any result when in test.php does show the desired result **/ I am running php 4.0 with Apache 1.3.12 The above scripts will work for variables and arrays. Thank You again. Josafat Moragrega FernandezThank you for your help. :) It does work when the session_start is placed after the creation of the object. I Tried it under Apache 1.3.6 and Php 4.0b3. Those same scripts in a Apache 1.3.12 with Php 4.0 dont work. In fact, no session suport is available. A file is created in /tmp like this. -rw------- 1 nobody nogroup 9 Jun 26 01:31 sess_12bed2b02a7d0c1098ab1a9976cf79f1 with content: !carrito| instead of: carrito|O:8:"stdClass":1:{s:5:"items";a:1:{i:10;i:3;}} That shows the machine with the Php 4.0b3 The php.ini file is exactly alike from one machine to anotherone. Any ideas why does this happen? Thank you again. Josafat Moragrega Fernandez Directorio Tecnico Web On Line Studios www.wolstudios.com