RE: [PHP] How to upload a file

2002-12-20 Thread Rich Gray
And if you select a small file it works fine right?

-Original Message-
From: Somesh [mailto:[EMAIL PROTECTED]]
Sent: 20 December 2002 12:29
To: Rich Gray
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] How to upload a file


post_max_size 8M
upload_tmp_dir 

It fails immediately after clicking the submit button.

[thanx for ur concern]



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




RE: [PHP] How to upload a file

2002-12-20 Thread Somesh
post_max_size 8M
upload_tmp_dir 

It fails immediately after clicking the submit button.

[thanx for ur concern]


On Wed, 18 Dec 2002, Rich Gray wrote:

> What are these settings in your php.ini?
> 
> post_max_size
> upload_tmp_dir
> 
> Does the upload_tmp_dir have enough space? Are the permissions on the
> directory correct? When you start the upload - how long does it take to fail
> immeditaely you click submit or after a delay. If the latter then is there
> anything created in the upload directory after teh submit is clicked and
> before it fails...?
> 
> -Original Message-
> From: Somesh [mailto:[EMAIL PROTECTED]]
> Sent: 18 December 2002 15:52
> To: Rich Gray
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] How to upload a file
> 
> 
> 
> No difference
> 
> 
> On Wed, 18 Dec 2002, Rich Gray wrote:
> 
> > As others have suggested does it make any difference if you up the script
> > timeout limit with set_time_limit() or via the max_execution_time in
> > php.ini?
> >
> 
> 
> 
> 

-- 


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




RE: [PHP] How to upload a file

2002-12-18 Thread Rich Gray
What are these settings in your php.ini?

post_max_size
upload_tmp_dir

Does the upload_tmp_dir have enough space? Are the permissions on the
directory correct? When you start the upload - how long does it take to fail
immeditaely you click submit or after a delay. If the latter then is there
anything created in the upload directory after teh submit is clicked and
before it fails...?

-Original Message-
From: Somesh [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 15:52
To: Rich Gray
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] How to upload a file



No difference


On Wed, 18 Dec 2002, Rich Gray wrote:

> As others have suggested does it make any difference if you up the script
> timeout limit with set_time_limit() or via the max_execution_time in
> php.ini?
>



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




RE: [PHP] How to upload a file

2002-12-18 Thread Somesh

No difference


On Wed, 18 Dec 2002, Rich Gray wrote:

> As others have suggested does it make any difference if you up the script
> timeout limit with set_time_limit() or via the max_execution_time in
> php.ini?
> 
> -Original Message-
> From: Somesh [mailto:[EMAIL PROTECTED]]
> Sent: 18 December 2002 13:37
> To: Rich Gray
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] How to upload a file
> 
> 
> It is not displaying any thing.
> It just gives the browser's error page
>   "The page cannot be displayed"
> 
> And the print_r($_FILES) prints an empty array;
> 
> 

-- 


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




RE: [PHP] How to upload a file

2002-12-18 Thread Rich Gray
As others have suggested does it make any difference if you up the script
timeout limit with set_time_limit() or via the max_execution_time in
php.ini?

-Original Message-
From: Somesh [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 13:37
To: Rich Gray
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] How to upload a file


It is not displaying any thing.
It just gives the browser's error page
"The page cannot be displayed"

And the print_r($_FILES) prints an empty array;



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




RE: [PHP] How to upload a file

2002-12-18 Thread Somesh
It is not displaying any thing.
It just gives the browser's error page  
"The page cannot be displayed"

And the print_r($_FILES) prints an empty array;



On Wed, 18 Dec 2002, Rich Gray wrote:

> What does print_r($_FILES) tell you? Is $_FILES['userfile']['error'] set to
> a value?
> Rich
> 
> -Original Message-
> From: Somesh [mailto:[EMAIL PROTECTED]]
> Sent: 18 December 2002 11:18
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to upload a file
> 
> 
> 
> Hi,
> 
> I am using the following code to upload file;
> X---
> 
> 
> Send the file: 
> 
> 
> X---
> 
> This works fine for small files of like some Kbs but fails to upload
> larger files near to 1MB.
> 
> Can any one help me out from this problem
> 
> my file processing code is::
> X---
> if(is_uploaded_file($userfile)) {
> copy($userfile,"./upload/$userfile_name");
> echo "Successfully completed the uploading of the file
> $userfile_name of size $userfile_size";
> }else{
> echo "some error has occured while uploading the file
> $userfile_name";
> echo "$userfile";
> }
> -X---
> 
> 
> 

-- 



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




RE: [PHP] How to upload a file

2002-12-18 Thread Rich Gray
What does print_r($_FILES) tell you? Is $_FILES['userfile']['error'] set to
a value?
Rich

-Original Message-
From: Somesh [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 11:18
To: [EMAIL PROTECTED]
Subject: [PHP] How to upload a file



Hi,

I am using the following code to upload file;
X---


Send the file: 


X---

This works fine for small files of like some Kbs but fails to upload
larger files near to 1MB.

Can any one help me out from this problem

my file processing code is::
X---
if(is_uploaded_file($userfile)) {
copy($userfile,"./upload/$userfile_name");
echo "Successfully completed the uploading of the file
$userfile_name of size $userfile_size";
}else{
echo "some error has occured while uploading the file
$userfile_name";
echo "$userfile";
}
-X---


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




RE: [PHP] How to upload a file

2002-12-18 Thread Jon Haworth
Hi Somesh,

> > > This works fine for small files of like some 
> > > Kbs but fails to upload larger files near to 1MB.
> > 
> > What's your upload_max_size set to in php.ini?
> 
> It is as follows
>   ; Maximum allowed size for uploaded files.
>   upload_max_filesize = 8M

I don't have a clue then, sorry :-(

Might be a timeout thing, but I can't see how that could affect it... you
could try bumping up max_execution_time and see if anything happens 

Cheers
Jon

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




Re: [PHP] How to upload a file

2002-12-18 Thread Bogdan Stancescu
Are you sure it's PHP the one that fails? i.e. do you get the "some 
error has occured while uploading the file $userfile_name" message 
or some other message? I had this kind of problem when trying to store 
incoming files in a database, and the link to the database failed, not PHP.

Also, if you have a slow connection, PHP might time out? I'm not sure if 
this is possible though, because I expect Apache to handle the upload 
(well, technically the download) and only run your PHP script after it 
finished that, but who knows?

Bogdan

Somesh wrote:
Hi Jon,
	It is as follows
	; Maximum allowed size for uploaded files.
	upload_max_filesize = 8M

On Wed, 18 Dec 2002, Jon Haworth wrote:



Hi Somesh,



This works fine for small files of like some 
Kbs but fails to upload larger files near to 1MB.

What's your upload_max_size set to in php.ini?

Cheers
Jon







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




RE: [PHP] How to upload a file

2002-12-18 Thread Somesh

Hi Jon,
It is as follows
; Maximum allowed size for uploaded files.
upload_max_filesize = 8M

On Wed, 18 Dec 2002, Jon Haworth wrote:

> Hi Somesh,
> 
> > This works fine for small files of like some 
> > Kbs but fails to upload larger files near to 1MB.
> 
> What's your upload_max_size set to in php.ini?
> 
> Cheers
> Jon
> 

-- 


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




Re: [PHP] How to upload a file

2002-12-18 Thread Wico de Leeuw
Look for the limit in php.ini

http://www.php.net/manual/en/configuration.directives.php#ini.upload-max-filesize

Gr,

Wico


At 16:47 18-12-02 +0530, Somesh wrote:


Hi,

I am using the following code to upload file;
X---


Send the file: 


X---

This works fine for small files of like some Kbs but fails to upload
larger files near to 1MB.

Can any one help me out from this problem

my file processing code is::
X---
if(is_uploaded_file($userfile)) {
copy($userfile,"./upload/$userfile_name");
echo "Successfully completed the uploading of the file
$userfile_name of size $userfile_size";
}else{
echo "some error has occured while uploading the file
$userfile_name";
echo "$userfile";
}
-X---






--
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




RE: [PHP] How to upload a file

2002-12-18 Thread Jon Haworth
Hi Somesh,

> This works fine for small files of like some 
> Kbs but fails to upload larger files near to 1MB.

What's your upload_max_size set to in php.ini?

Cheers
Jon

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




[PHP] How to upload a file

2002-12-18 Thread Somesh

Hi,

I am using the following code to upload file;
X---


Send the file: 


X---

This works fine for small files of like some Kbs but fails to upload 
larger files near to 1MB.

Can any one help me out from this problem

my file processing code is::
X---
if(is_uploaded_file($userfile)) {
copy($userfile,"./upload/$userfile_name");
echo "Successfully completed the uploading of the file 
$userfile_name of size $userfile_size";
}else{
echo "some error has occured while uploading the file 
$userfile_name";
echo "$userfile";
}
-X---






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