#40851 [NEW]: fopen(); returns resource id #2
| From: | jjc1231 at gmail dot com | Date: | Sun, 18 Mar 2007 23:41:13 +0000 |
| Subject: | #40851 [NEW]: fopen(); returns resource id #2 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-110488@lists.php.net to get a copy of this message | ||
From: jjc1231 at gmail dot com
Operating system: Win 2k Server
PHP version: 5.2.1
PHP Bug Type: Unknown/Other Function
Bug description: fopen(); returns resource id #2
Description:
------------
Is this a problem with my php congig or just doesn't work with IIS
5/Windows?
At first it said that i did not have access to the file, so i allowed
read-only in the permissions, and then it said resource id #2.
This also happens when opening a url
Thanks in advance
Reproduce code:
---------------
LOCAL FILE CODE:
<?php
$file = fopen('C:\Inetpub\wwwroot\test.txt', 'r');
echo $file;
?>
URL CODE:
<?php
$file = fopen('http://www.google.com',
'r');
echo $file;
?>
Expected result:
----------------
it opens the contents of the file or url i type in which the browser would
display, because the contents are html tags...
Actual result:
--------------
resource id #2
--
Edit bug report at http://bugs.php.net/?id=40851&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40851&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40851&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40851&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40851&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40851&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40851&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40851&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40851&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40851&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40851&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40851&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40851&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40851&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40851&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40851&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40851&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40851&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40851&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40851&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40851&r=mysqlcfg