Re: Re: [PHP] Problem with fopen(...) -
| From: | P M | Date: | Sat, 06 Nov 2004 19:33:16 +0000 |
| Subject: | Re: Re: [PHP] Problem with fopen(...) - | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-201372@lists.php.net to get a copy of this message | ||
Well, since I'm using the latest version of the PHP plugin, it can't be that I'm
using the $_FILES variable ($HTTP_POST_FILES is for older versions of php as far as I know).
Nevertheless, I tried it.. and it didn't work.
To clarify my problem.. I'm using a form to get a file name and some other info (regular text
boxes) where the file information is supposed to be stored in the $_FILES array (predefined by php).
Though it seems that I can't use neither the [name] or the [tmp_name] field in this array to
get the file name. The error occurs directly when I try to fopen(...) the file. I simply get the
following error:
Warning: fopen("", "r") - No error in c:\code\wengine\aey.php on line 130
My MySQL db is working just fine, so is PHP (other code works), as well as the process of using
other HTML form information for PHP processing (such as textboxes).
Does the error message above ring a bell to you? Thanks..
Arty
-----Original Message-----
From: Pankaj Kafley <kafley@gmail.com>
To: Arty <pmelist@home.se>
Date: Fri, 5 Nov 2004 23:04:24 +0100
Subject: Re: [PHP] Problem with fopen(...) - "No error"??
Can you be more specific ? I actually had the same sort of problem
once but maybe it is not the same. But anyways I was getting null
everytime until I change $_FILES variable to $HTTP_POST_FILES. As by
suggested by someone else here.
Regards
On Fri, 5 Nov 2004 21:08:17 +0100, Arty <pmelist@home.se> wrote:
> I'm working against a table without problems, that is, as long as I insert and retrieve
> texts and numerical values from various fields. However, I'm also using a table for images, but
> I can't upload files correctly. This is the error I get :
>
> Warning: fopen("", "r") - No error in c:\code\wengine\aey.php on line 130
>
> Warning: fread(): supplied argument is not a valid File-Handle resource in
> c:\code\wengine\aey.php on line 131
>
> I have no clue what's the problem. I checked register_globals (on) but then again, that
> shouldn't matter 'cause I'm using the $_FILES variable to access the file
> information. Obviously, PHP thinks otherwise. It seems (from the warning "fopen("",
> "r")" above), that even so, $_FILES[userfile][tmp_name] is not recognized and just
> interpretated as null. I've tried $_FILES[userfile][name] also, but the same error occurs. The
> second error is obviously just an effect from the first, so what am I doing wrong here?? Any tips
> appreciated!
>
> Thanks,
> Arty
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php