|
Page 1 of 1
|
enridp
Joined: April 2007
Posts: 9
|
Use FTP To Upload Big Files
Hello !
I was trying for a long time to solve this:
My server limits the max file size to 8MB (via php). I know Icy has an option with FTP, but it doesn't work to me, and I don't know what's going wrong.
When the file to upload is less than 8MB the FTP mode works great, but when not, it seems that the file is uploading (at least it takes the same time...). But the file is not uploaded, then Icy shows this error:
'No post mode specified';
I was searching it, and it come from posting.php:
message_die(GENERAL_MESSAGE, $lang['No_post_mode']);
I don't know how to solve it because I can't understand why "posting.php" works great when the file is less than 8MB and when it's greater posting.php is called without parameters (???).
I hope somebody help me, in spite of my bad english
henry.
PS: I'm using Icy 1.0.11.11
|
#1 Fri 19 Oct, 2007 21:38 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: Use FTP To Upload Big Files
Hello !
I was trying for a long time to solve this:
My server limits the max file size to 8MB (via php). I know Icy has an option with FTP, but it doesn't work to me, and I don't know what's going wrong.
When the file to upload is less than 8MB the FTP mode works great, but when not, it seems that the file is uploading (at least it takes the same time...). But the file is not uploaded, then Icy shows this error:
'No post mode specified';
I was searching it, and it come from posting.php:
message_die(GENERAL_MESSAGE, $lang['No_post_mode']);
I don't know how to solve it because I can't understand why "posting.php" works great when the file is less than 8MB and when it's greater posting.php is called without parameters (???).
I hope somebody help me, in spite of my bad english
henry.
PS: I'm using Icy 1.0.11.11
Post the fuction where that message is included.
|
#2 Sat 20 Oct, 2007 12:22 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
is not a function, is part of posting.php:
- //
- // What auth type do we need to check?
- //
- $is_auth = array();
- $is_auth_type = '';
- $is_auth_type_cal = '';
- switch( $mode )
- {
- case 'newtopic':
- if ( $topic_type == POST_GLOBAL_ANNOUNCE )
- {
- $is_auth_type = 'auth_globalannounce';
- }
- elseif ( $topic_type == POST_ANNOUNCE )
- {
- $is_auth_type = 'auth_announce';
- }
- elseif ( $topic_type == POST_STICKY )
- {
- $is_auth_type = 'auth_sticky';
- }
- else
- {
- $is_auth_type = 'auth_post';
- }
- if (!empty($topic_calendar_time))
- {
- $is_auth_type_cal = 'auth_cal';
- }
- break;
- case 'reply':
- case 'quote':
- $is_auth_type = 'auth_reply';
- break;
- case 'editpost':
- $is_auth_type = 'auth_edit';
- break;
- case 'delete':
- case 'poll_delete':
- $is_auth_type = 'auth_delete';
- break;
- case 'vote':
- $is_auth_type = 'auth_vote';
- break;
- case 'topicreview':
- $is_auth_type = 'auth_read';
- break;
- case 'thank':
- $is_auth_type = 'auth_read';
- break;
- default:
- //MODIFICADO:
- //message_die(GENERAL_MESSAGE, $lang['No_post_mode']);
- //-------------------------
- $is_auth_type = 'auth_post';
- $mode = 'newtopic';
- //-------------------------
- break;
- }
-
How you can see, I have commented the error line, but that's not the problem, a new error appears, apparently posting.php is called WITHOUT parameters (mode, forum, etc.), and I don't know why... I mean, if the file size is < than 8MB it works great...
I can't see why posting.php is called without parameters when the file is >8MB...
|
#3 Sat 20 Oct, 2007 18:01 |
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: Use FTP To Upload Big Files
Have you tried to raise the php memory?
|
#4 Sun 21 Oct, 2007 12:14 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
to raise the php memory?
I don't know how to do it
The server where I'm has a limit for the file sizes: 8MB.
I don't know the memory_limit and I can't touch that (I can't modify php.ini)
Mighty says, some time ago, is possible to upload bypass the 8MB php limit with the FTP option:
http://www.icyphoenix.com/viewtopic.php?t=2333&highlight=
But I can't make it wotk.
|
#5 Sun 21 Oct, 2007 17:57 |
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: Use FTP To Upload Big Files
Have you tried to raise the php memory?
I was meaning with this topic
|
#6 Sun 21 Oct, 2007 18:19 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
Thanks again for your reply Novice !
But I can't find this line:
- php_value memory_limit 32M
-
Anyway, I was viewing the .htaccess, I think I could add something like this:
- php_value max_execution_time 1000
- php_value max_input_time 1000
- php_value post_max_size 100M
- php_value upload_max_filesize 100M
-
But I think it won't solve the problem...
My last option is to make a function to use CGI instead of PHP to upload the files, but I don't want to reach that extreme.
Nobody knows a simpler solution?
EDIT
OK, I'm testing with .htaccess:
php_value max_execution_time 1000 => Internal Server Error
php_value max_input_time 1000 => Internal Server Error
php_value post_max_size 100M => Internal Server Error
php_value upload_max_filesize 100M => Internal Server Error
php_value memory_limit 32M => Internal Server Error
php_value memory_limit 16M => Internal Server Error
php_value memory_limit 2M => Internal Server Error
Conclusion: the .htaccess is not the solution
|
#7 Sun 21 Oct, 2007 19:14 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
Thinking and reading a bit more, I can't see any way that a PHP script can read a file from a client computer to upload it to an FTP site. And I think these are good news, just think of the security implications.
I think the FTP functions are designed to upload files from local server to another server.
Then, how can we bypass the filesize limits from the server?. I think I can do it with CGI, but if there is an easier way, please tell me, I really need it.
Something "strange" that I've noticed is the time it takes the file to upload, I mean, when I'm posting a file > 8MB, it seems to delay more than an 8MB file, just like if the server was receiving more than 8MB...
When you upload a file that is to large, it still goes to the server??,
Is the check of the limit on the move_uploaded_file function?
If so, would be possible ftp the file from the temp directory to the ftp folder because the file is already on the server?
|
#8 Sun 21 Oct, 2007 23:27 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
nobody?
|
#9 Tue 23 Oct, 2007 01:38 |
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: Use FTP To Upload Big Files
Try to update to 1.1.0.15b
|
#10 Tue 23 Oct, 2007 16:18 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
Try to update to 1.1.0.15b
Thanks Novice ! I really esteem your help.
But why do you think updating to 1.1.0.15b will solve the problem? I mean, my doubt is if the FTP mode can really bypass the limits from the server. Is this true? because I can't understand how...
I think, and it's just that, a thinking, the problem is not the Icy version.
But maybe you know something more, could you explain me why you think it will be the solution? I mean, has somebody tested the FTP option to bypass the PHP limits from the server?
bye and thanks again!
|
#11 Tue 23 Oct, 2007 17:42 |
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: Use FTP To Upload Big Files
Try to update to 1.1.0.15b
Thanks Novice ! I really esteem your help.
But why do you think updating to 1.1.0.15b will solve the problem? I mean, my doubt is if the FTP mode can really bypass the limits from the server. Is this true? because I can't understand how...
I think, and it's just that, a thinking, the problem is not the Icy version.
But maybe you know something more, could you explain me why you think it will be the solution? I mean, has somebody tested the FTP option to bypass the PHP limits from the server?
bye and thanks again!
I can´t answer your question, i don´t know how.
The thing i know is that i haven´t got that error with the version 1.1.0.15b.
|
#12 Tue 23 Oct, 2007 20:15 |
|
difus
Joined: August 2006
Posts: 763
Location:
|
Re: Use FTP To Upload Big Files
maybe I'm not right , but I'm thinking there is no way to increase your upload size.
you have to contact server administration or change the hosting.
but your ftp must work
|
#13 Tue 23 Oct, 2007 21:42 |
|
enridp
Joined: April 2007
Posts: 9
|
Re: Use FTP To Upload Big Files
maybe I'm not right , but I'm thinking there is no way to increase your upload size.
you have to contact server administration or change the hosting.
but your ftp must work
Hello difus !
The FTP works fine, but with files < 8MB, just like PHP upload...
Are you saying this is correct? I mean, FTP option can't rise the size limits from PHP? that is my doubt right now, because Mighty says it should... but I can't make it work.
|
#14 Wed 24 Oct, 2007 00:56 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|