|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5200 Session Support for Objects
Submitted: 2000-06-23 06:30 UTC Modified: 2000-06-26 01:35 UTC
From: tite at wolstudios dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0 Release Candidate 2 OS: SuSe 6.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
10 + 26 = ?
Subscribe to this entry?

 [2000-06-23 06:30 UTC] tite at wolstudios dot com

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-24 02:08 UTC] stas at cvs dot php dot net
Yes it does work. Please provide more info.
 [2000-06-25 20:00 UTC] tite at wolstudios dot com
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.


class Cart { 

$carrito = new Cart;

?><A HREF="next_page.php">Next</A><?php

/* 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 Fernandez

 [2000-06-25 21:56 UTC] stas at cvs dot php dot net
Please define class before session_start
 [2000-06-26 01:35 UTC] tite at wolstudios dot com
Thank 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:

instead of:
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
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 25 20:01:30 2024 UTC