php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9454 Reference issue 2
Submitted: 2001-02-26 05:18 UTC Modified: 2001-04-10 10:09 UTC
From: mailling at bigfoot dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: Windows 2000
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mailling at bigfoot dot com
New email:
PHP Version: OS:

 

 [2001-02-26 05:18 UTC] mailling at bigfoot dot com
I got in trouble with reference.
Issues with Linux, Mandrake 7.2 and Windows 2000
with PHP 4.04pl1, php 4.0.3 php 4.0.1pl2

I am unable to give small script, the problem seems to appear only on big script, some refences seems to be messed up.

What I did.
I used MySql to query a system.
When I check the result of a query, I got a resource ID
But sometimes, the resource ID is a big number, ie 18739485
I belived the problem came from MySql, but I used ODBC to find a turn around, with the same problem.
The worst is the such a resource is working well after for the next_record statement.

Then, I realize a dump of a big variable, that contains references of objects, of arrays...
And one of this variable inside is at the beginning a number, and becomes a reference to another object. I checked the code, and the variable is written only once.

Something else, I write to the screen a string using printf() or echo sprintf(), and I find this string in the big variable.

Worst, I notice some strange characters in this object (with ascii code >127)

It seems that in some condition, the memory manager doesn't work well. With my code, PHP hangs on while it is trying to print a resource ID variable (on Unix or PHP).

I can send you my code if you are interested in. For a core file, I didn't compile PHP- Linux with the debug option. Do you know how I can do the same thing with Windows?

Hope that helps

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-26 16:34 UTC] mailling at bigfoot dot com
This problem seems to be related to the bug 9407 also.
I am not sure it is due to the garbage collector.
I ran it as a CGI or with ISAPI filter, I increased the amount of memeory a thread could take until 13Mb, with Linux also.
I destroyed the process...

I think it is due to a buffer overflow somewhere when a reference is built, or something like that.

Good luck
 [2001-03-08 06:40 UTC] stas@php.net
Please provide a short code reproducing the problem.
 [2001-04-10 10:09 UTC] sniper@php.net
No feedback. If this happens also with soon to be released 
PHP 4.0.5, reopen this bug report with a short example
script that can be used to reproduce this.

--Jani

 [2011-08-30 20:23 UTC] yago@php.net
Automatic comment from SVN on behalf of yago
Revision: http://svn.php.net/viewvc/?view=revision&revision=315816
Log: Approved change made by anonymous #9454
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 15:01:36 2025 UTC