|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tite at wolstudios dot com
New email:
PHP Version: OS:


 [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: Mon Jun 24 16:01:32 2024 UTC