RE: [PHP] How to upload a file

2002-12-20 Thread Somesh
post_max_size 8M
upload_tmp_dir didn't set to any value

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




[PHP] How to upload a file

2002-12-18 Thread Somesh

Hi,

I am using the following code to upload file;
X---
form enctype=multipart/form-data action=load.php method=post
input type=hidden name=MAX_FILE_SIZE value=10
Send the file: input type=file name=userfilebr
input type=submit value=Send 
/form
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_sizebr;
}else{
echo some error has occured while uploading the file 
$userfile_namebr;
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 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] Random Number Genertation

2002-12-18 Thread Somesh
Hi shaun,
Store all those numbers in an array and use the function 
array_rand.


On Wed, 18 Dec 2002, shaun wrote:

 Hi,
 
 Say i have a set of non sequential numbers for example: 1 3 8 12 13 16 19
 21.
 
 How can i get php to take a random number from this set?
 
 Thanks for  your help
 
 
 
 

-- 


-- 
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---
 form enctype=multipart/form-data action=load.php method=post
 input type=hidden name=MAX_FILE_SIZE value=10
 Send the file: input type=file name=userfilebr
 input type=submit value=Send 
 /form
 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_sizebr;
 }else{
 echo some error has occured while uploading the file
 $userfile_namebr;
 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 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