#27596 [Opn->Bgs]: getimagesize, file_get_contents return error
| From: | wez@php.net | Date: | Mon, 15 Mar 2004 12:05:01 +0000 |
| Subject: | #27596 [Opn->Bgs]: getimagesize, file_get_contents return error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56456@lists.php.net to get a copy of this message | ||
ID: 27596
Updated by: wez@php.net
Reported By: mtjo at netzero dot net
-Status: Open
+Status: Bogus
Bug Type: GetImageSize related
Operating System: Win2k SP4
PHP Version: 5CVS-2004-03-14 (dev)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Looks like whoever compiled your php somehow managed to break the
build. (perhaps it was broken anyway).
Upgrade to a recent official binary (or recompile latest HEAD for
yourself).
Considered fixed since it works for everyone else on the planet ;-)
Previous Comments:
------------------------------------------------------------------------
[2004-03-14 14:59:58] mtjo at netzero dot net
http://trilogyaudiometrics.com/dev/phpinfo.php.html
------------------------------------------------------------------------
[2004-03-14 14:56:56] mtjo at netzero dot net
I was running PHP 4.3.2 previously as a CGI with the same Apache2 build
w/o any fopen related problems and essentially the same php.ini.
------------------------------------------------------------------------
[2004-03-14 14:43:55] derick@php.net
Please post a link to your phpinfo() output.
------------------------------------------------------------------------
[2004-03-14 14:36:03] mtjo at netzero dot net
Description:
------------
Local system: Apache2
Any functions relying on the fopen wrapper produces errors using remote
URIs.
Loaded Modules:
core mod_win32 mpm_winnt http_core mod_so mod_access mod_actions
mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dir mod_env
mod_imap mod_include mod_isapi mod_log_config mod_mime mod_mime_magic
mod_negotiation mod_rewrite mod_setenvif mod_userdir mod_php5
Extensions enabled:
php_mysql.dll
php_pgsql.dll
allow_url_fopen is enabled in php.ini
Reproduce code:
---------------
$image_dim = getimagesize( 'http://www.google.com/images/logo.gif'
);
echo 'width: ' . $image_dim[0] . ' - ' . 'height: ' . $image_dim[1];
$get_file = file_get_contents(
'http://trilogyaudiometrics.com/dev/mime.php'
);
$file = str_replace( '<', '<', $get_file );
echo '<br/ ><pre>' . $file . '</pre>';
Expected result:
----------------
width: 276 - height: 110
<?php
ini_set( 'mime_magic.magicfile', '/usr/share/misc/magic.mime' );
echo mime_content_type( 'blank.php' );
?>
Actual result:
--------------
Notice: getimagesize() [function.getimagesize]: Unable to find the
wrapper "http" - did you forget to enable it when you configured PHP?
in D:\www\image.php on line 3
Warning: getimagesize(http://www.google.com/images/logo.gif)
[function.getimagesize]: failed to open stream: Invalid argument in
D:\www\image.php on line 3
width: - height:
Notice: file_get_contents() [function.file-get-contents]: Unable to
find the wrapper "http" - did you forget to enable it when you
configured PHP? in D:\www\image.php on line 7
Warning: file_get_contents(http://trilogyaudiometrics.com/dev/mime.php)
[function.file-get-contents]: failed to open stream: Invalid argument
in D:\www\image.php on line 7
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27596&edit=1