PDA

View Full Version : PHP help



rotan
January 6th, 2005, 20:58
hello
pls help me that how to upload a file (8M) on my server with php script.

i use copy, but the server responds "cannot find the pages" or "too large".

in the same script, i upload a file (2k). then the everything is all right.

thanks a lot


if (isset($userfile)){
if(is_file("/var/lib/mysql/cnuc/tmp.txt")) {
unlink("/var/lib/mysql/cnuc/tmp.txt");
//echo "1";
}

//echo "2";
copy($userfile, "/var/lib/mysql/cnuc/tmp.txt");
//echo $userfile_name;

kabatak
January 7th, 2005, 02:20
you should check the "upload_max_filesize" configuration of your server and see if it allows 8MB or more. you can do this using phpinfo();

rotan
January 7th, 2005, 05:04
thanks for your help
but i checked the phpinfo(), it show me as following:

Directive Local Value Master Value
upload_max_filesize 12M 12M
upload_tmp_dir no value no value
user_dir no value no value

but the php scripts do nothing.
thanks again

alien
January 8th, 2005, 05:40
Check the max script execution time.

rotan
January 9th, 2005, 03:15
thanks
i changed it as following:

max_execution_time 300 300
max_input_time 600 600
memory_limit 20M 20M

but i got the same result