php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34075 The ext/standard/tests/file/bug22414.phpt script fails
Submitted: 2005-08-10 23:22 UTC Modified: 2005-08-12 17:53 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: RVaughn at pheedo dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.4.0 OS: RHEL 3.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: RVaughn at pheedo dot com
New email:
PHP Version: OS:

 

 [2005-08-10 23:22 UTC] RVaughn at pheedo dot com
Description:
------------
The ext/standard/tests/file/bug22414.phpt script in the test suite always fails on Red Hat Enterprise 3.0.

I didn't report this originally as I thought it was a configuration or installation problem with our system when working on PHP 4.4 but I'm trying to run it under PHP 4.3.8 and 4.3.11 and it also fails in the same manner, which leads me to believe it's either got a bug or isn't written correctly to work on RHEL 3.0.

I've read Bug #22582: Problem with bug22414.phpt and while those changes are incorporated they do not address the problem on RHEL 3.0.  Other bug reports also do not address the problem.  I tried making a link from /usr/local/php/bin/php to the new executable but that didn't solve the problem.



Reproduce code:
---------------
Please see the ext/standard/tests/file/bug22414.phpt from the PHP 4.4, 4.3.8, or 4.3.11 distributions, it fails on all three.


Expected result:
----------------
---- EXPECTED OUTPUT
HELLO
Works


Actual result:
--------------
---- ACTUAL OUTPUT
HELLO
sh: line 1: /usr/local/php/bin/php: No such file or directory
Does not work

This fails exactly this way under PHP 4.3.8, 4.3.11 and 4.4 on RHEL 3.0 which is why I believe it's a bug with the script.  The script is identical in all three PHP source code distributions.

I tried to fix the problem by copying the new php executable 

# mkdir -p /usr/local/php/bin
# cp sapi/cli/php /usr/local/php/bin/php

This causes this error on RHEL 3.0 for PHP 4.4, 4.3.11 and 4.3.8:

--FILE--
sh: line 1: -n: command not found

sh: line 1: -n: command not found

Warning: md5_file(): Unable to open file in /usr/src/redhat/SOURCES/php-4.3.8/ext/standard/tests/file/bug22414.phpt on line 24
Does not work

Please don't yell at me, I'm just trying to report what I'm guessing is a potential bug particular to RHEL 3.0 and have written my own passthru() function tests which seem to work just fine.  Cheers, Rob V.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-10 23:34 UTC] tony2001@php.net
How do you run this test?

 [2005-08-11 01:41 UTC] RVaughn at pheedo dot com
I have run this test with 'make test' as part of the whole suite, and also directly with:

# ./sapi/cli/php -c /etc/php.ini ext/standard/tests/file/bug22414.phpt

and

# ./sapi/cli/php ext/standard/tests/file/bug22414.phpt

Fails in all three cases for PHP 4.4, 4.3.11, and 4.3.8.
The first test works, the second one which uses md5_file() to create a hash over the php executable itself, fails with the errors I reported.  I suspect it's something particular to RHEL 3.0 but have not had a chance to test on a Fedora Core 2 system yet.
 [2005-08-11 11:22 UTC] sniper@php.net
The problem is with TEST_PHP_EXECUTABLE environment variable being set to something wrong? Are you setting it yourself?
What shell are you using? What is it set to in Makefile ?
Have you tried latest CVS snapshot?



 [2005-08-11 11:24 UTC] tony2001@php.net
>./sapi/cli/php ext/standard/tests/file/bug22414.phpt

Ugh..Don't do it, please. These tests should not be run directly.
You must use run-tests.php for running them.

Please try to this:
TEST_PHP_EXECUTABLE=./sapi/cli/php && ./sapi/cli/php run-tests.php ext/standard/tests/file/bug22414.phpt
 [2005-08-11 19:06 UTC] RVaughn at pheedo dot com
Shell is RHEL 3.0 /bin/bash.

# echo $TEST_PHP_EXECUTABLE
/usr/src/redhat/SOURCES/php-4.3.8/sapi/cli/php

# ls -al `echo $TEST_PHP_EXECUTABLE`
-rwxr-xr-x    1 root     root      6254005 Aug 10 21:50 /usr/src/redhat/SOURCES/php-4.3.8/sapi/cli/php

From the Makefile:

TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH)

top_builddir = /usr/src/redhat/SOURCES/php-4.3.8

SAPI_CLI_PATH = sapi/cli/php

The Makefile matches this, which is where the unstriped executable is:

# echo $TEST_PHP_EXECUTABLE
/usr/src/redhat/SOURCES/php-4.3.8/sapi/cli/php

As per Tony's suggestion (thanks, but doesn't work, sorry I forgot that I also tried 'run-tests.php'):

# TEST_PHP_EXECUTABLE=./sapi/cli/php && ./sapi/cli/php run-tests.php ext/standard/tests/file/bug22414.phpt

=====================================================================
CWD         : /usr/src/redhat/SOURCES/php-4.3.8
PHP         : ./sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 4.3.8
ZEND_VERSION: 1.3.0
PHP_OS      : Linux - Linux db.pheedo.com 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686
INI actual  : /etc/php.ini
More .INIs  : /etc/php.d/imap.ini,/etc/php.d/ldap.ini
Extra dirs  : 
=====================================================================
Running selected tests.
FAIL Bug #22414: passthru() does not read data correctly [ext/standard/tests/file/bug22414.phpt]

Output from this run is the same:

# more ext/standard/tests/file/bug22414.out
HELLO
Does not work

I haven't tried the CVS snapshot because we've given up on getting PHP 4.4 to build and work on RHEL 3.0 for now.  The fact that this test fails on three different RHEL 3.0 servers w/three different PHP versions (4.3.8, 4.3.11, 4.4) is what makes me think there's a problem with this script on RHEL 3.0.  The test script is the same in all three distributions, and it fails in the same way on all three, and I've written some simple passthru() tests myself and the function seems to work just fine, it's the test script.

Could be that passthru() is failing on RHEL 3.0 for all these versions as my own tests are pretty simple.  Thanks!
 [2005-08-11 20:43 UTC] RVaughn at pheedo dot com
More info:

===============================================================================
BUILD ENVIRONMENT
===============================================================================
OS:
Linux - Linux db.pheedo.com 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT \
2005 i686

Automake:
automake (GNU automake) 1.6.3
Written by Tom Tromey <tromey@redhat.com>.

Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Autoconf:
autoconf (GNU Autoconf) 2.57
Written by David J. MacKenzie and Akim Demaille.
 [2005-08-11 23:06 UTC] sniper@php.net
All your output here shows version 4.3.8. Please do the tests REALLY with PHP 4.4.0 or rather with the latest CVS snapshot of PHP 5.1 (http://snaps.php.net/php5-latest.tar.gz)

 [2005-08-12 02:08 UTC] RVaughn at pheedo dot com
Hi Sniper,

Sorry about that, here's the run on PHP 4.4 vs. PHP 4.3.8, the failure and output are the same, note this is a different host name, the one where I'm trying to build PHP 4.4.  If you need any more info please let me know.  This is from the PHP 4.4 sources pulled on 1 Aug 2005:

# TEST_PHP_EXECUTABLE=./sapi/cli/php && ./sapi/cli/php run-tests.php ext/standard/tests/file/bug22414.phpt

=====================================================================
CWD         : /usr/local/src/Tars/php-4.4.0
PHP         : ./sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 4.4.0
ZEND_VERSION: 1.3.0
PHP_OS      : Linux - Linux dev.pheedo.com 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686
INI actual  : /etc/php.ini
More .INIs  : /etc/php.d/mhash.ini,/etc/php.d/mysql.ini
Extra dirs  : 
=====================================================================
Running selected tests.
FAIL Bug #22414: passthru() does not read data correctly [ext/standard/tests/file/bug22414.phpt]
 [2005-08-12 02:11 UTC] RVaughn at pheedo dot com
Can't run these tests against PHP 5.1 - we are running PHP 4.3.2 on our servers and want to upgrade to PHP 4.4 if possible but do not want to move to PHP 5.1 yet, our application will require a lot of testing with PHP 5 before we make that migration.  Our goal right now is simply to get to PHP 4.4 for the bug and security fixes and to test our application against it as well as upgrade MySQL from 3.x to 4.1-1, and then migrate to PHP 5.x at some later date.  Thanks, Rob
 [2005-08-12 02:22 UTC] sniper@php.net
You're running the test wrong. Use 'make test' or 'make test TESTS=<pathtotestsyouwanttorun>'.

Secondly: I wasn't saying you need to move to PHP 5.1, I simply asked you to TEST if this happens with it..

 [2005-08-12 02:56 UTC] RVaughn at pheedo dot com
I ran the test exactly the way "tony2001@php.net" said to in this bug report.  If I run 'make test' the same thing happens.  I'll run it yet again the Nth way you've asked.  Here you go, fails exactly the same way:

# make test TESTS=ext/standard/tests/file/bug22414.phpt

=====================================================================
CWD         : /usr/local/src/Tars/php-4.4.0
PHP         : /usr/local/src/Tars/php-4.4.0/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 4.4.0
ZEND_VERSION: 1.3.0
PHP_OS      : Linux - Linux dev.pheedo.com 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686
INI actual  : /etc/php.ini
More .INIs  : /etc/php.d/mhash.ini,/etc/php.d/mysql.ini
Extra dirs  : 
=====================================================================
Running selected tests.
FAIL Bug #22414: passthru() does not read data correctly [ext/standard/tests/file/bug22414.phpt]
 [2005-08-12 04:50 UTC] RVaughn at pheedo dot com
Here's output from the straight-forward 'make test'.  I don't know how many other bits of info I can send to convince someone that this test script doesn't work right?  It fails the same no matter which way I run it, and on three different version of PHP 4.x all on RHEL 3.0 servers.  Is there any way I can convince someone this script has a problem?

=====================================================================
TIME END 2005-08-11 19:26:29
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :   55
Exts tested     :   32
---------------------------------------------------------------------
Number of tests :  630
Tests skipped   :  137 (21.7%)
Tests warned    :    0 (0.0%)
Tests failed    :    5 (0.8%)
Tests passed    :  488 (77.5%)
---------------------------------------------------------------------
Time taken      :   72 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
mb_send_mail() test 5 (lang=Simplified Chinese) [ext/mbstring/tests/mb_send_mail05.phpt]
mb_send_mail() test 6 (lang=Traditional Chinese) [ext/mbstring/tests/mb_send_mail06.phpt]
mb_send_mail() test 7 (lang=Korean) [ext/mbstring/tests/mb_send_mail07.phpt]
php-users@php.gr.jp #16242 [ext/mbstring/tests/php_gr_jp_16242.phpt]
Bug #22414: passthru() does not read data correctly [ext/standard/tests/file/bug22414.phpt]
=====================================================================
 [2005-08-12 11:13 UTC] sniper@php.net
Yes, you can convince me if you can test if that happens with the latest PHP 5.1 snapshot..

 [2005-08-12 17:53 UTC] RVaughn at pheedo dot com
Then I can't convince you.  PHP 4.4.0 is supposed to be the latest "supported" 4.x release, and if it doesn't work for that, that should be enough.

This test script hasn't worked from 4.3.2 through 4.4.0 on four different releases I've tried.  Unfortunately, like most working people, I don't have the time to stay on top of my regular workload already, and definitely do not have the time to download, configure and compile PHP 5.1 to see whether or not it fails there, esp. when we have no need for PHP 5.1 right now.

I'm unclear why that would even matter?  If it didn't fail for PHP 5.1 then what would be your answer other than "upgrade to 5.1, bug closed" when that's not an option right now for us?

I think I've done a 110% job of showing this test script fails under a number of PHP 4.x releases and have spent the time to show it appears to be the test script, not the actual passthru() function itself.  Guess this is why this script has been broken for so long.  So much for PHP 4.4 being an "official" release and for working towards making PHP 4.4.1 something that will build and test correctly on most systems.

At least this report will be out there for someone else to find; I've already been contacted by someone with the same problem.  I can't put any more time into this and if you guys aren't willing to have a QA person take a look at this script, oh well.  Thanks for the help, I guess and it can stay broken.  Cheers, Rob
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 14:01:34 2025 UTC