php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18048 htmlentities crashes when called with ENT_QUOTES
Submitted: 2002-06-28 11:11 UTC Modified: 2002-10-15 01:00 UTC
Votes:3
Avg. Score:3.0 ± 1.6
Reproduced:2 of 3 (66.7%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: vanbeek at q-factor dot nl Assigned: derick (profile)
Status: No Feedback Package: Reproducible crash
PHP Version: 4.2.1 OS: SunOS 5.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vanbeek at q-factor dot nl
New email:
PHP Version: OS:

 

 [2002-06-28 11:11 UTC] vanbeek at q-factor dot nl
This bug occurs with Mod_PHP4.2.1 under apache.
When htmlentities is called with ENT_QUOTES as the second parameter and without a third parameter (I didn't test _with_ a third parameter) the script's output stops right at that point.

I am not the machines administrator and hence cannot supply further details.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-28 11:21 UTC] derick@php.net
I can not reproduce this. Can you see if apache crashes, and if yes make a backtrace?
And can you provide a short reproducing script?

Derick
 [2002-06-28 11:40 UTC] vanbeek at q-factor dot nl
A very short reproduction script:

<?php
for ($i = 0; $i < 1000; $i++)
  echo "$i\n";
echo htmlentities ('hello world!', ENT_QUOTES);
?>
When called from the browser, this script yields all values van 0 to 984, then stops. The fact that the values from 985 to 999 are missing would indicate that apache doesn't get to flush its buffers (and has indeed crashed).

As i am not the systems admin, I cannot find out much more. I can see that the server process doesn't crash as a whole, but it might be possible that a thread crashes (if that is even possible under SunOS; under linux a crashing thread takes down the process as well)
You can see this happening at http://www.scheltema.nl/test.php

Greetings,
Pieter van Beek
 [2002-06-28 14:49 UTC] derick@php.net
I still can not reproduce this on Linux with PHP 4.1.x, 4.2.x or 4.3.0-dev on Linux and 4.2.0 on Sun OS 5.8/intel all in both CLI and apache module.

Which version of apache do you use, and which platform do you have? (sparc or intel)

Derick
 [2002-06-29 05:30 UTC] vanbeek at q-factor dot nl
This is one of the header in the server's http response:

Server: Apache/1.3.26 (Unix) PHP/4.2.1 mod_ssl/2.8.9 
OpenSSL/0.9.6d

`uname -a` yields:
SunOS vhost-01.cust.asmr-01.energis-idc.net 5.8 
Generic_108528-13 sun4u sparc

How may I find out which options were used when building 
MOD_PHP?

Greetings,
Pieter.
 [2002-06-29 06:06 UTC] derick@php.net
Make a script with  <?php phpinfo(); ?> and request it through your browser, it should show it in the top section (configure command).

Derick
 [2002-06-29 06:11 UTC] vanbeek at q-factor dot nl
OK, I placed the suggested script on the server we're 
talking about:
http://www.scheltema.nl/phpinfo.php
 [2002-09-29 22:32 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Nov 30 18:01:27 2023 UTC