php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73436 Setting allow_url_fopen to Off makes several tests fail
Submitted: 2016-11-01 18:39 UTC Modified: 2016-11-01 19:24 UTC
From: php at poni dot no Assigned: cmb (profile)
Status: Closed Package: Testing related
PHP Version: 5.6.27 OS: CentOS 6.8
Private report: No CVE-ID: None
 [2016-11-01 18:39 UTC] php at poni dot no
Description:
------------
with configure: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-curl --without-sqlite3 --without-cdb --without-pdo-sqlite --enable-exif --with-gd --with-png-dir=/usr/lib64 --with-jpeg-dir=/usr/lib64 --with-freetype-dir=/usr/lib64 --with-mysql --with-mysqli --enable-opcache

When allow_url_fopen is set to Off in php.ini, running "make test" will result in multiple failed tests.

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Testing __debugInfo() magic method with bad returns RESOURCE [Zend/tests/debug_info-error-resource.phpt]
Bug #43008 (php://filter uris ignore url encoded filternames and can't handle slashes) [ext/standard/tests/file/bug43008.phpt]
bug 40459 - Test whether the constructor of the user-space stream wrapper is called when stream functions are called [ext/standard/tests/streams/bug40459.phpt]
Bug #71323: Output of stream_get_meta_data can be falsified by its input [ext/standard/tests/streams/bug71323.phpt]

From the test log:

---- EXPECTED OUTPUT
Fatal error: __debuginfo() must return an array in %s%eZend%etests%edebug_info-error-resource.php on line %d
---- ACTUAL OUTPUT
Warning: fopen(): data:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /root/install/php-5.6.27/Zend/tests/debug_info-error-resource.php on line 13

Warning: fopen(data:text/plain,Foo): failed to open stream: no suitable wrapper could be found in /root/install/php-5.6.27/Zend/tests/debug_info-error-resource.php on line 13

Fatal error: __debuginfo() must return an array in /root/install/php-5.6.27/Zend/tests/debug_info-error-resource.php on line 14
---- FAILED

Setting allow_url_fopen to On and re-running the tests results in no failures.

Test script:
---------------
make test

Expected result:
----------------
Test results should either be SKIP or PASS.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-01 19:05 UTC] cmb@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: cmb
 [2016-11-01 19:05 UTC] cmb@php.net
Thanks for reporting this issue!

Indeed, these tests need an appropriate --INI-- section which enforces allow_url_fopen=1.
 [2016-11-01 19:24 UTC] cmb@php.net
-Summary: Setting allow_url_fopen to Off makes several build tests fail +Summary: Setting allow_url_fopen to Off makes several tests fail
 [2016-11-01 19:35 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2eacb53fc44ce4a0f16113eec96dfc0bb5ea52b6
Log: Fix #73436: Setting allow_url_fopen to Off makes several tests fail
 [2016-11-01 19:35 UTC] cmb@php.net
-Status: Analyzed +Status: Closed
 [2016-11-09 03:33 UTC] krakjoe@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2eacb53fc44ce4a0f16113eec96dfc0bb5ea52b6
Log: Fix #73436: Setting allow_url_fopen to Off makes several tests fail
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 16:01:28 2024 UTC