php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33756 Memory issues / output formatting
Submitted: 2005-07-18 19:42 UTC Modified: 2005-07-18 21:06 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: schristm at gmail dot com Assigned:
Status: Closed Package: cURL related
PHP Version: 5.1.0b3 OS: Fedora Core 2 / Linux
Private report: No CVE-ID: None
 [2005-07-18 19:42 UTC] schristm at gmail dot com
Description:
------------
Hello,

I'm actually using PHP 5.1b3, however it was not an option in the version select box. I just upgrade from PHP 5.1b2 so I know that the issue is definitely with the latest beta release.

I am somehow (randomly) getting strange array keys after parsing cURL data with parse_str().

When this occurs, it's usually the first array key that is garbled. In most cases the key contains either partial serialized data or portions of the path to the script.

Reproduce code:
---------------
<?php

// brief snippits of code:
$result = curl_exec($ch);

$retval = array();
parse_str($result, $retval);

print_r($retval);

?>

Expected result:
----------------
Array
(
    [testdomain_com] => pointer
    [testdomain2_com] => pointer
)

Actual result:
--------------
Array
(
    [a:1:{s:5:\"sttestdomain_com] => pointer
    [testdomain2_com] => pointer
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-18 19:55 UTC] schristm at gmail dot com
I forgot to mention the output formatting issue. Again, this is very strange! 

When the array problem indicated above happens, the HTML output of the PHP script gets garbled as well. Certain data that was once included in table cells get bumped out of the table, text is garbled together, etc.

For example, in one of my table cells, a phrase is quoted ("domain.com"). When this error occurs, part of an <A href> tag that is located at the bottom of the page gets spliced into the quote. I'm not using CSS or anything like that either. Also, in this same example, I've seen additional </TABLE> tags (magically?) appear where they don't belong, causing stuff to output funny. Hope this helps!

Thanks!
 [2005-07-18 20:02 UTC] tony2001@php.net
Please provide more information about your system (web-server name, it's version, SAPI you use, etc.).
Are you able to reproduce it with PHP CLI ?
 [2005-07-18 20:08 UTC] schristm at gmail dot com
Hi,

Here's some information that may help:

PHP 5.1.0b3 (cli) (built: Jul 18 2005 02:00:25)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0b3, Copyright (c) 1998-2004 Zend Technologies

Server version: Apache/1.3.33 (Unix)
Server built:   May  9 2005 22:50:50
Server's Module Magic Number: 19990320:16
Server compiled with....
 -D EAPI
 -D EAPI_MM
 -D EAPI_MM_CORE_PATH="logs/httpd.mm"
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FCNTL_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D DYNAMIC_MODULE_LIMIT=64
 -D HARD_SERVER_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache"
 -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"

Linux server1 2.4.20-021stab028.12.777-enterprise #1 SMP Fri May 13 15:50:02 MSD 2005 i686 athlon i386 GNU/Linux


I've also noticed some crashes:

[Mon Jul 18 12:25:38 2005] [notice] child pid 6400 exit signal Segmentation fault (11)
[Mon Jul 18 12:25:44 2005] [notice] child pid 15616 exit signal Segmentation fault (11)
[Mon Jul 18 12:54:41 2005] [notice] child pid 5555 exit signal Segmentation fault (11)
[Mon Jul 18 12:54:43 2005] [notice] child pid 17153 exit signal Segmentation fault (11)
[Mon Jul 18 13:28:50 2005] [notice] child pid 24097 exit signal Segmentation fault (11)
[Mon Jul 18 13:56:50 2005] [notice] child pid 12704 exit signal Segmentation fault (11)
[Mon Jul 18 13:57:19 2005] [notice] child pid 12036 exit signal Segmentation fault (11)
[Mon Jul 18 13:57:19 2005] [notice] child pid 14306 exit signal Segmentation fault (11)


How do you find out the SAPI information you need? Also, I'm really not sure if it can be reproduced via the API. This is a very large application and it would take allot of maneuvering to get it to run from command line, but I suppose I can if you really need that info.
 [2005-07-18 20:10 UTC] schristm at gmail dot com
Oops! I mean't CLI, not API

Thanks!
 [2005-07-18 20:55 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2005-07-18 21:06 UTC] schristm at gmail dot com
Thanks. I appreciate you blowing this off.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 03:01:33 2024 UTC