ID:               34075
 User updated by:  RVaughn at pheedo dot com
 Reported By:      RVaughn at pheedo dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: RHEL 3.0
 PHP Version:      4.4.0
 New Comment:

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!


Previous Comments:
------------------------------------------------------------------------

[2005-08-11 11:24:51] [EMAIL PROTECTED]

>./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 11:22:30] [EMAIL PROTECTED]

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 01:41:40] 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-10 23:34:21] [EMAIL PROTECTED]

How do you run this test?


------------------------------------------------------------------------

[2005-08-10 23:22:20] 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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34075&edit=1

Reply via email to