Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-14-2002, 11:01 PM   #1 (permalink)
jacob
Registered User
 
Join Date: Aug 2002
Posts: 2
jacob is on a distinguished road
File upload error(PHP)

i get the file upload error when i tried to upload large files

i have tried increasing the max_file size in php.ini file, but it is not working.

error "Unable to open 'none' for reading: No such file or directory





jacob is offline   Reply With Quote
Old 08-14-2002, 11:05 PM   #2 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
what is the exact size of the files? over 8192 bytes? what size does it let you upload to? (assuming smaller files work)

may have something to do with the buffer size of your socket... (does php have sockets?)
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Old 08-14-2002, 11:16 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
the only setting for php is in the php.ini file itself, .. but regardless, it is still uploading via http. now the question is does the server software have a limit on it for http uploads ?

i'll look through my apache config, but i don't remember seeing anything.

hey jacob, what type of server are you running?


btw.. welcome to codenewbie
sde is offline   Reply With Quote
Old 08-14-2002, 11:25 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
ah hah.. could it be possible that it is timming out before the file can upload? there are 2 places where your server will timeout.. 1 in php itself, and one in apache ( if you are using apache )

php.ini
----------------------------------
max_execution_time = 30 // seconds

httpd.conf
---------------------------------
Timeout 300

the other php.ini settings are:
--------------------------------------
file_uploads = on
upload_max_filesize = 10M

let us know if it works or not.
sde is offline   Reply With Quote
Old 08-15-2002, 05:04 AM   #5 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
Quote:
Originally posted by mmilano

php.ini
----------------------------------
max_execution_time = 30 // seconds

I can't speak for the other ones, but this would give you a time out error. I was doing some array manipulation and it was taking a little too long, so it kept telling me that php script was timing out. I just bumped it to 60 seconds, and now it works. I just hope this is enough because any longer and I would go insane.

Toe
toe_cutter is offline   Reply With Quote
Old 08-15-2002, 06:16 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
i am just showing those as the parameters to edit. 30 seconds is the default, so yes, 60 seconds might be the first change he should make.

it seems odd that 30 seconds is not enough for some array manipulation, unless you are manipulating many many many arrays. i've never needed more than 30 seconds unless i was doing some pretty big sql dumps via https though phpmyadmin or something, .. but the better solution for that is just to do the dump in a shell.
sde is offline   Reply With Quote
Old 08-15-2002, 06:25 AM   #7 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
I was manipulating an array that was 1440+ values. I later found away to do it with MySql, and it freed up most of the time. I stink with MySql, but i have learned a lot.

Toe
toe_cutter is offline   Reply With Quote
Old 08-16-2002, 04:37 AM   #8 (permalink)
jacob
Registered User
 
Join Date: Aug 2002
Posts: 2
jacob is on a distinguished road
Angry reply

Quote:
Originally posted by abc123
what is the exact size of the files? over 8192 bytes? what size does it let you upload to? (assuming smaller files work)

may have something to do with the buffer size of your socket... (does php have sockets?)


PLatform---windows NT
webserver----IIS
php ver 4


upload_max_filesize =16M( php.ini file)

In upload form i gave max_file_size as hidden variable with value 16M.

i tried to upload file of size 3.2MB and got error

"Unable to open 'none' for reading: No such file or directory "
jacob is offline   Reply With Quote
Old 08-16-2002, 06:16 AM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
errrr...... max_execution_time ??? please read the post below where i asked what server you're running.
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File upload NirTivAal PHP 5 03-02-2004 01:29 PM


All times are GMT -8. The time now is 02:18 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting