Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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:

Code: [Download] [Hide] [Select]
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
 



 
enridpSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
enridp wrote: [View Post]
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:

Code: [Download] [Hide] [Select]
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.
 



 
novice programmerSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
is not a function, is part of posting.php:

Code: [Download] [Hide]
  1. //  
  2. // What auth type do we need to check?  
  3. //  
  4. $is_auth = array();  
  5. $is_auth_type = '';  
  6. $is_auth_type_cal = '';  
  7. switch( $mode )  
  8. {  
  9.     case 'newtopic':  
  10.         if ( $topic_type == POST_GLOBAL_ANNOUNCE )  
  11.         {  
  12.             $is_auth_type = 'auth_globalannounce';  
  13.         }  
  14.         elseif ( $topic_type == POST_ANNOUNCE )  
  15.         {  
  16.             $is_auth_type = 'auth_announce';  
  17.         }  
  18.         elseif ( $topic_type == POST_STICKY )  
  19.         {  
  20.             $is_auth_type = 'auth_sticky';  
  21.         }  
  22.         else  
  23.         {  
  24.             $is_auth_type = 'auth_post';  
  25.         }  
  26.         if (!empty($topic_calendar_time))  
  27.         {  
  28.             $is_auth_type_cal = 'auth_cal';  
  29.         }  
  30.         break;  
  31.     case 'reply':  
  32.     case 'quote':  
  33.         $is_auth_type = 'auth_reply';  
  34.         break;  
  35.     case 'editpost':  
  36.         $is_auth_type = 'auth_edit';  
  37.         break;  
  38.     case 'delete':  
  39.     case 'poll_delete':  
  40.         $is_auth_type = 'auth_delete';  
  41.         break;  
  42.     case 'vote':  
  43.         $is_auth_type = 'auth_vote';  
  44.         break;  
  45.     case 'topicreview':  
  46.         $is_auth_type = 'auth_read';  
  47.         break;  
  48.     case 'thank':  
  49.         $is_auth_type = 'auth_read';  
  50.         break;  
  51.     default:  
  52.         //MODIFICADO:  
  53.                 //message_die(GENERAL_MESSAGE, $lang['No_post_mode']);  
  54.                 //-------------------------  
  55.                         $is_auth_type = 'auth_post';  
  56.                         $mode = 'newtopic';  
  57.                 //-------------------------  
  58.         break;  
  59. }  
  60.  


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...
 



 
enridpSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
Have you tried to raise the php memory?
 



 
novice programmerSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
enridpSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
novice programmer wrote: [View Post]
Have you tried to raise the php memory?

I was meaning with this topic
 



 
novice programmerSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
Thanks again for your reply Novice !
But I can't find this line:
Code: [Download] [Hide]
  1. php_value memory_limit 32M  
  2.  


Anyway, I was viewing the .htaccess, I think I could add something like this:
Code: [Download] [Hide]
  1. php_value max_execution_time 1000  
  2. php_value max_input_time 1000  
  3. php_value post_max_size 100M  
  4. php_value upload_max_filesize 100M  
  5.  


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  
 



 
enridpSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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?
 



 
enridpSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
nobody?  blink1
 



 
enridpSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
Try to update to 1.1.0.15b
 



 
novice programmerSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
novice programmer wrote: [View Post]
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!
 



 
enridpSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
enridp wrote: [View Post]
novice programmer wrote: [View Post]
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.
 



 
novice programmerSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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  
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Use FTP To Upload Big Files 
 
difus wrote: [View Post]
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.
 



 
enridpSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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