Re: Re: Problem with fopen(...) -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
To: Arty <pmelist@xxxxxxx>
Date: Fri, 5 Nov 2004 23:04:24 +0100
Subject: Re:  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@xxxxxxx> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux