Re: [PHP-DEV] File upload problem

2003-02-27 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick


On Thu, 27 Feb 2003, Frans Bakker wrote:

> Hello everybody,
> 
> I am relatively new to PHP and for quite some days I am trying to get a file
> upload system going through a standard html form. To test it I use an html
> page called Test2.php with a form in it with
> enctype=\"multipart/form-data\". Here is the source code:
> 
>  
> $AppImageDir = Web/Images";
> 
> if (isset($_FILES["ImageFile"])) {
> move_uploaded_file($_FILES['ImageFile']['tmp_name'],
> $AppImageDir."/".$_FILES['ImageFile']['name']);
> 
> }
> 
> ?>
> 
> 
> 
> Web site - pages form
> 
> 
>  
> echo "
>  method=\"post\">
> 
> 
> 
> 
> ";
> ?>
> 
> 
> 
> 
> It is a standard straight forward image upload situation. You see that the
> form directs to itself (action=\"Test2.php\") and on top of the page a
> simple instruction to see if the file uploads correctly. As far as I can
> see, this is correct code. Note that the any \\ are to escape "" and further
> \\ (necesary in echo "" statements).
> 
> However, when I execute the page, I get the following error messages:
> 
> Warning: Unable to create '/Web/Images/cartel_feria1.jpg': Permission denied
> in /Web/Test2.php on line 6
> 
> Warning: Unable to move '/tmp/php0jHeNE' to '/Web/Images/cartel_feria1.jpg'
> in /Web/Test2.php on line 6
> 
> It seems to say that I don't have permission to execute a file upload on
> that page. As you can see by the directory specifications this script runs
> on a Linux. However, I also tried the same script on a Windows machine, with
> the corresponding directory specifications of course, and with the same
> result: permission denied.
> 
> What is wrong here, where do I set what type of permissions in order to get
> the file upload to work? By the way, in the php.ini FileUpload is set at
> yes.
> 
> Kind regards,
> FRANS BAKKER
> 
> 
> 
> 

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



[PHP-DEV] File upload problem

2003-02-27 Thread Frans Bakker
Hello everybody,

I am relatively new to PHP and for quite some days I am trying to get a file
upload system going through a standard html form. To test it I use an html
page called Test2.php with a form in it with
enctype=\"multipart/form-data\". Here is the source code:





Web site - pages form







";
?>




It is a standard straight forward image upload situation. You see that the
form directs to itself (action=\"Test2.php\") and on top of the page a
simple instruction to see if the file uploads correctly. As far as I can
see, this is correct code. Note that the any \\ are to escape "" and further
\\ (necesary in echo "" statements).

However, when I execute the page, I get the following error messages:

Warning: Unable to create '/Web/Images/cartel_feria1.jpg': Permission denied
in /Web/Test2.php on line 6

Warning: Unable to move '/tmp/php0jHeNE' to '/Web/Images/cartel_feria1.jpg'
in /Web/Test2.php on line 6

It seems to say that I don't have permission to execute a file upload on
that page. As you can see by the directory specifications this script runs
on a Linux. However, I also tried the same script on a Windows machine, with
the corresponding directory specifications of course, and with the same
result: permission denied.

What is wrong here, where do I set what type of permissions in order to get
the file upload to work? By the way, in the php.ini FileUpload is set at
yes.

Kind regards,
FRANS BAKKER



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



Re: [PHP-DEV] file upload issue in HEAD

2002-04-04 Thread Rasmus Lerdorf

It looks ok, but let me do a full test after lunch in a couple of hours.

On Thu, 4 Apr 2002, Derick Rethans wrote:

> Hello Rasmus,
>
> can you please test RC2, and shed some light if there is still a problem
> with this in PHP_4_2_0?
>
> regards,
> Derick
>
> On Fri, 29 Mar 2002, Rasmus Lerdorf wrote:
>
> > Right, that is what I am seeing at least on the Debian package of 4.1.2,
> > and in 4.2 and HEAD this is fixed but we still have the issue of dropping
> > form fields when file uploads are turned off.  I need to build another
> > 4.1.2 to see if I can reproduce what I am seeing in the Debian build.
> >
> > -Rasmus
> >
> > On Fri, 29 Mar 2002, Stefan Esser wrote:
> >
> > > Hi,
> > >
> > > > Did you turn off file_uploads in your php.ini before testing?  I just
> > > > double-checked in the 4.2 branch and turning off file_uploads makes the
> > > > variable disappear for me.
> > >
> > > Ahhh then I misunderstood your mail. I thought you mean in 4.1.2 if you do
> > > not
> > > upload a file (only fill the input fields) php would not handle the request.
> > >
> > > Hmm yeah if you disable the file_upload you turn off whole multipart
> > > processing.
> > >
> > > Stefan
> > >
> >
> >
> > --
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> Derick Rethans
>
> -
> PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
> All your branches are belong to me!
>SRM: Script Running Machine - www.vl-srm.net
> -
>


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




Re: [PHP-DEV] file upload issue in HEAD

2002-04-04 Thread Derick Rethans

Hello Rasmus,

can you please test RC2, and shed some light if there is still a problem 
with this in PHP_4_2_0?

regards,
Derick

On Fri, 29 Mar 2002, Rasmus Lerdorf wrote:

> Right, that is what I am seeing at least on the Debian package of 4.1.2,
> and in 4.2 and HEAD this is fixed but we still have the issue of dropping
> form fields when file uploads are turned off.  I need to build another
> 4.1.2 to see if I can reproduce what I am seeing in the Debian build.
> 
> -Rasmus
> 
> On Fri, 29 Mar 2002, Stefan Esser wrote:
> 
> > Hi,
> >
> > > Did you turn off file_uploads in your php.ini before testing?  I just
> > > double-checked in the 4.2 branch and turning off file_uploads makes the
> > > variable disappear for me.
> >
> > Ahhh then I misunderstood your mail. I thought you mean in 4.1.2 if you do
> > not
> > upload a file (only fill the input fields) php would not handle the request.
> >
> > Hmm yeah if you disable the file_upload you turn off whole multipart
> > processing.
> >
> > Stefan
> >
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
All your branches are belong to me!
   SRM: Script Running Machine - www.vl-srm.net
-


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




Re: [PHP-DEV] file upload issue in HEAD

2002-03-29 Thread Rasmus Lerdorf

Hrm, you are right, I can't repeat it in the current 4.1 branch.  Am I
seeing things on Debian?  Anybody else have a Debian woody server with
4.1.2 from the Debian package running?

If so, please test this script:








Don't provide a file to be uploaded, just put something in the text field
and let me know if it show up when you submit the form.

-Rasmus

On Fri, 29 Mar 2002, Stefan Esser wrote:

> Hi,
>
> > Did you turn off file_uploads in your php.ini before testing?  I just
> > double-checked in the 4.2 branch and turning off file_uploads makes the
> > variable disappear for me.
>
> Ahhh then I misunderstood your mail. I thought you mean in 4.1.2 if you do
> not
> upload a file (only fill the input fields) php would not handle the request.
>
> Hmm yeah if you disable the file_upload you turn off whole multipart
> processing.
>
> Stefan
>


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




Re: [PHP-DEV] file upload issue in HEAD

2002-03-29 Thread Rasmus Lerdorf

Right, that is what I am seeing at least on the Debian package of 4.1.2,
and in 4.2 and HEAD this is fixed but we still have the issue of dropping
form fields when file uploads are turned off.  I need to build another
4.1.2 to see if I can reproduce what I am seeing in the Debian build.

-Rasmus

On Fri, 29 Mar 2002, Stefan Esser wrote:

> Hi,
>
> > Did you turn off file_uploads in your php.ini before testing?  I just
> > double-checked in the 4.2 branch and turning off file_uploads makes the
> > variable disappear for me.
>
> Ahhh then I misunderstood your mail. I thought you mean in 4.1.2 if you do
> not
> upload a file (only fill the input fields) php would not handle the request.
>
> Hmm yeah if you disable the file_upload you turn off whole multipart
> processing.
>
> Stefan
>


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




Re: [PHP-DEV] file upload issue in HEAD

2002-03-29 Thread Stefan Esser

Hi,

> Did you turn off file_uploads in your php.ini before testing?  I just
> double-checked in the 4.2 branch and turning off file_uploads makes the
> variable disappear for me.

Ahhh then I misunderstood your mail. I thought you mean in 4.1.2 if you do
not
upload a file (only fill the input fields) php would not handle the request.

Hmm yeah if you disable the file_upload you turn off whole multipart
processing.

Stefan


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




Re: [PHP-DEV] file upload issue in HEAD

2002-03-29 Thread Rasmus Lerdorf

Did you turn off file_uploads in your php.ini before testing?  I just
double-checked in the 4.2 branch and turning off file_uploads makes the
variable disappear for me.

-R

On Fri, 29 Mar 2002, Stefan Esser wrote:

> > By the way, this didn't work at all in 4.1.2.  Any
>
> Sorry but I cannot reproduce this. The _REQUEST array is filled here. The
> only strange thing is that phpinfo doesn't show it... But var_dump and
> print_r do...
>
> Stefan
>


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




Re: [PHP-DEV] file upload issue in HEAD

2002-03-29 Thread Stefan Esser

> By the way, this didn't work at all in 4.1.2.  Any

Sorry but I cannot reproduce this. The _REQUEST array is filled here. The
only strange thing is that phpinfo doesn't show it... But var_dump and
print_r do...

Stefan


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




[PHP-DEV] file upload issue in HEAD

2002-03-29 Thread Rasmus Lerdorf

I don't think it is a good idea to drop all form data from an
enctype=multipart/form-data POST when file uploads are turned off.  I
think it makes more sense only to drop the uploaded file.

A simple test script:

 
 
 
 
 
 

With file_uploads set to Off in php.ini $_REQUEST['text'] is empty.

By the way, this didn't work at all in 4.1.2.  Any
enctype=multipart/form-data form without an actual file uploaded at the
same time would drop all the extra data fields.  Probably serious enough
to get 4.1.3 out the door with a fix unless we can get 4.2 out really
quickly now.  Many big PHP packages like Phorum and Mantis are affected by
this as they have forms where people may optionally include an uploaded
file.

-Rasmus


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




[PHP-DEV] File Upload

2002-03-25 Thread David McInnis

I wrote s script to upload a file.  The script works, but when I point
my browser to the file it downloads, but I can no longer open the file
in MS Word.  What is happening to my file?  My client is Windows and the
server is Linux.

David McInnis




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




Re: [PHP-DEV] File upload on Win32

2001-12-03 Thread Jani Taskinen


Hangs? It's partially broken but that problem is bit different
and can be worked around by setting register_globals=off.

What kind of file is the one you're uploading? And how big?
What are your php.ini settings that affect the uploading?
(upload_max_filesize.. etc)

--Jani


On Mon, 3 Dec 2001, Frank M. Kromann wrote:

>Hi,
>
>Is it me or is upload broken in 4.2.0-dev from cvs ? php.exe hangs after
>uploading the first 8.192 bytes. Nothing happens, no cpu usage.


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] File upload on Win32

2001-12-03 Thread Frank M. Kromann

Hi,

Is it me or is upload broken in 4.2.0-dev from cvs ? php.exe hangs after uploading the 
first 8.192 bytes. Nothing happens, no cpu usage.

- Frank




-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] file upload

2001-02-09 Thread Manuele Ferraro

hi ng

For file upload i compare temp file with "none".
It's OK.

>From yesterday, the string tha corresponding at null file is null string



? why ??

Manuele


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] File upload error - no mime boundary found after start of file header

2001-02-04 Thread David Croft


I am working on a site that handles a lot of file uploads. Occasionally
the following error will be thrown:

shell httpd: PHP Warning:  File Upload Error - No Mime boundary found
after start of file header in Unknown on line 0

Now I figured this was probably a browser bug rather than a PHP bug but a
grep of the last few log entries shows a variety of browsers (see end of
this message)

The guts of the form is:






Any ideas what could be wrong please? rfc1867.c makes no sense to
me. Thanks.

David


recent browsers:

Mozilla/4.73 [en]C-SYMPA  (Win95; U)
Mozilla/4.06 [en]C-gatewaynet  (Win98; I)
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MSN 6.0)
Mozilla/4.0 (compatible; MSIE 5.0; AOL 6.0; Windows 98; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 
98)::ELNSB50::4110028001e0027a016c0503002a
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; AIRF)
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)






-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]