From:             mtjo at netzero dot net
Operating system: Win2k SP4
PHP version:      5CVS-2004-03-14 (dev)
PHP Bug Type:     GetImageSize related
Bug description:  getimagesize, file_get_contents return error 

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( '<', '&lt;', $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 bug report at http://bugs.php.net/?id=27596&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27596&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27596&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27596&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27596&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27596&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27596&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27596&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27596&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27596&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27596&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27596&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27596&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27596&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27596&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27596&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27596&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27596&r=float

Reply via email to