PHP (Cli) generates invalid output when it exceeds 4kB

Bug #257892 reported by Pawel Smolinski
4
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: php5-cli

I've written small script for generate sql query:
--------
echo "INSERT INTO prices (category_from_id, category_to_id, fee) VALUES ";

for($i = 1; $i <= 18; $i++){
 for($j = 1; $j <= 18; $j++){
  $fee = rand(1, 100);
  echo "($i, $j, $fee), ";
 }
}
echo "\n";
--------
and when output exceeds 4kB, it generates invalid output (lost few characters):
--------
(18, 5, 83), (18, 6, 71), (1(18, 8, 48),
--------
(1(18... instead (18, 7, 12), (18...

I've output buffering turned off (as can see in attached php.ini file). On native php 5.2.6 everything works OK (checked on another machine)

My system (Kubunt) version details:

$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04

$ php --version
PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:44:49)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Revision history for this message
Pawel Smolinski (pawel-smolinski) wrote :
description: updated
description: updated
Revision history for this message
Russell Smith (mr-russ) wrote :

I can't reproduce this;

mr-russ@bob:~$ php --version
PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:46:18)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

I've tried with both mcrypt extension installed and without. Neither produces the error for me. What php extensions do you have installed. I can only think something is going on there. Are you on 64 bit or 32 bit?

I've tried on both amd64 and 32bit. Neither produces the error.

The only other strange thing is that my build is 2 minutes later than yours for php. Is something funny going on there. Can you force a reinstall of php and see if the bug continues?

Revision history for this message
Ondřej Surý (ondrej) wrote :

> The only other strange thing is that my build is 2 minutes later than yours for php. Is something funny going on there.

Different architectures?

Revision history for this message
Pawel Smolinski (pawel-smolinski) wrote :

Unfortuently, this bug appeared only on Hardy and I've made update to Intrepid few weeks ago (and it everything works OK on it). I'm working as webdeveloper so I've installed almost all php* modules. If it will help, the machine is Dell' workstation with Intel Pentium 4 2GHz on Intel chipset and very funny Intel graphics card, which breaks X server when starting with splash screen enabled. If you want, I can give you more details about the system, but I'll do it on Monday when I back to work ;)

Revision history for this message
Ondřej Surý (ondrej) wrote :

I don't care what machine you have. Have you installed 32-bit or 64-bit arch? Run "dpkg --print-architecture" and append output here.

Revision history for this message
Pawel Smolinski (pawel-smolinski) wrote :

i386

Revision history for this message
Russell Smith (mr-russ) wrote :

Yes, different architectures is correct.

I posted the amd64 'php --version'. My i386 build reports the same build time as the original reporter.

And still neither machine is able to produce the error.

Without more details I'm not sure how to diagnose this problem.

Pawel, you are not experiencing this on the new version of ubuntu (8.10) and you don't have any other machines with the fault. Is that correct?

If that is all correct, should this be closed?

Russell Smith (mr-russ)
Changed in php5:
status: New → Incomplete
Revision history for this message
Chuck Short (zulcss) wrote :

Closing its fixed for the user apparently.

Regards
chuck

Changed in php5 (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.