php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48603 Using --with-curlwrappers and open_basedir causes problems
Submitted: 2009-06-19 11:08 UTC Modified: 2009-07-25 20:45 UTC
Votes:35
Avg. Score:4.5 ± 0.8
Reproduced:31 of 32 (96.9%)
Same Version:31 (100.0%)
Same OS:8 (25.8%)
From: manuel dot schmitt at manitu dot de Assigned:
Status: Closed Package: cURL related
PHP Version: 5.2.10 OS: Linux 2.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: manuel dot schmitt at manitu dot de
New email:
PHP Version: OS:

 

 [2009-06-19 11:08 UTC] manuel dot schmitt at manitu dot de
Description:
------------
Installing PHP 5.2.10 with PEAR enabled causes the following error:

Fatal error: Error: cannot open phar "/home/redhat/BUILD/php-5.2.10/pear/install-pear-nozlib.phar" in /home/redhat/BUILD/php-5.2.10/pear/install-pear-nozlib.phar on line 795


Reproduce code:
---------------
Configure PHP 5.2.10 with PEAR, build and install it.

Our configure options are:

./configure \
--prefix=/usr/local/php5 \
--with-config-file-path=/usr/local/php5/etc \
--with-apxs=/usr/sbin/apxs \
--disable-debug \
--enable-bcmath \
--enable-calendar \
--enable-ctype \
--enable-dbase \
--enable-exif \
--enable-ftp \
--enable-force-cgi-redirect \
--enable-mbstring \
--enable-pdo \
--enable-session \
--enable-soap \
--enable-sockets \
--enable-sqlite-utf8 \
--enable-track-vars \
--enable-wddx \
--enable-zip \
--with-bz2 \
--with-curl \
--with-curlwrappers \
--with-dom \
--with-dom-xslt \
--with-freetype-dir \
--with-gd \
--with-gettext=/usr \
--with-imagemagick \
--with-jpeg-dir \
--with-ldap \
--with-mysql \
--with-openssl \
--with-pcre-regex \
--with-pear \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-pdo-sqlite2 \
--with-png-dir \
--with-ttf \
--with-xslt \
--with-xsl \
--with-zlib

Expected result:
----------------
PEAR should be installed correctly.

Actual result:
--------------
The error described above

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-21 09:36 UTC] linux at acoustype dot com
The same error is given to me.

make OK

make install NG

same error
can't install

but
--without-pear
make install OK

CentOS 5.3 32bit
 [2009-06-22 05:53 UTC] filebackup at 126 dot com
me too.

centos5.3 x86_64
 [2009-06-22 13:51 UTC] bubi at malinator dot com
Me too. Downgraded to 5.2.9.
2.6.16-1.2096_FC5 x86_64
 [2009-06-22 23:30 UTC] mlavi at sgi dot com
Reproduced error on: SLES 10.1 = SUSE Linux Enterprise Server 10 (x86_64)
 [2009-06-22 23:49 UTC] mlavi at sgi dot com
Oddly, when I rebuilt PHP without any extensions: ./configure --prefix=/data/temp, I do get PEAR installed with warnings:

Installing PEAR environment:      /data/temp/lib/php/

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400
 [2009-06-22 23:57 UTC] mlavi at sgi dot com
Appears to be a duplicate of bugs: 48625 and 48650.
http://bugs.php.net/bug.php?id=48625
http://bugs.php.net/bug.php?id=48650
 [2009-06-27 01:24 UTC] jd at cpanel dot net
Seems to be caused by the changes to curl to avoid serving file:// urls when open_basedir or safe_mode are enabled combined with the "--with-curlwrappers" option.  Disabling curlwrappers gets around the "cannot open phar" problem.  You could also just force the php_register_url_stream_wrapper() loop in ext/curl/interface.c to skip the file protocol.

The "Cannot use a scalar value as an array" error seems to be an unrelated problem with the PEAR bundle included with 5.2.10.
 [2009-06-29 18:26 UTC] no at email dot pl
The same errors on FreeBSD 7.2 stable amd64
 [2009-07-02 18:52 UTC] tremclem at yahoo dot com
My compilation of PHP 5.2.10 on Solaris 10 crashed with this same issue. Unfortunately, my customers require the Pear functionality.
 [2009-07-10 22:03 UTC] jani@php.net
See also bug #48637
 [2009-07-10 22:12 UTC] jani@php.net
And bug #48775 
 [2009-07-25 20:44 UTC] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286323
Log: - Fixed bug #48637 ("file" wrapper is overwritten when using --with-curlwrappers)
# Also fixes bug #48603, basically same issue.
 [2009-07-25 20:45 UTC] jani@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 00:01:27 2024 UTC