#27596 [Opn->Fbk]: getimagesize, file_get_contents return error
| From: | derick@php.net | Date: | Sun, 14 Mar 2004 19:43:55 +0000 |
| Subject: | #27596 [Opn->Fbk]: getimagesize, file_get_contents return error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56434@lists.php.net to get a copy of this message | ||
ID: 27596
Updated by: derick@php.net
Reported By: mtjo at netzero dot net
-Status: Open
+Status: Feedback
Bug Type: GetImageSize related
Operating System: Win2k SP4
PHP Version: 5CVS-2004-03-14 (dev)
New Comment:
Please post a link to your phpinfo() output.
Previous Comments:
------------------------------------------------------------------------
[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