Forum Moderators: coopster

Message Too Old, No Replies

File Upload prob

         

gooflox

2:28 am on Jul 23, 2005 (gmt 0)

10+ Year Member



Hello all.

I've done file uploads before and have solid code to get it done. But it isn't working on a new server I've been asked to work on. When you submit a file larger than 512 KB, it dies "Cannot find Server". Works great when the filesize is less than 512 and fine on other servers.

Here is the form tag:


<form ENCTYPE="multipart/form-data" name="f1" action="upload.php" method="POST">

Settings from php.ini that are relevant:

file_uploads On
max_execution_time 3000
max_input_time 600
memory_limit 50M
post_max_size 200M
upload_max_filesize 1000M
upload_tmp_dir /tmp

Any ideas? Apache? Cash reward for getting me out this jam!

jatar_k

5:04 am on Jul 23, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



given those settings I doubt it is the 512 that is the issue

I am often wrong of course but we work with what we have ;)

so why else would it be dying?

"cannot find server" is not an error that really has anything to do with file sizes or execution time.

>> new server I've been asked to work on

my first thought wouold be looking at dns probs, routing probs. I assume you can get to the form and you can start uploading the file. I also think the disconnect is right there, what happens when the file starts uploading? Watch it via ssh and see if the file is even created and if it is then watch if the size increases in any way.

gooflox

1:55 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



I found this on PHP's site from a user:

For apache, also check the LimitRequestBody directive.
If you're running a Red Hat install, this might be set in /etc/httpd/conf.d/php.conf.
By default, mine was set to 512 KB.

I think this is it and will give it a try.

philbish

11:50 pm on Jul 24, 2005 (gmt 0)

10+ Year Member



If you echo out phpinfo() and look for "upload_max_filesize" and "Timeout" / "Timeouts" it might tell you something useful

gooflox

12:40 am on Jul 25, 2005 (gmt 0)

10+ Year Member



It was the php.conf file. Thanks for looking.

pixellion

3:28 am on Aug 26, 2005 (gmt 0)

10+ Year Member



That worked like a charm as well!