Feng Forum

Support => How To's => : HDready May 12, 2011, 03:56:44 PM

: Larges files doesn't upload
: HDready May 12, 2011, 03:56:44 PM
Hi there, a recurrent topic but the issue is still there :/
in php info, upload_max_filesize=64M, memory_limit=128, post_max_size=64M.
I have installing the progressbar plug in (change to 100 000 000 000 the size file option, should be good). But when I want to upload a large file (40M), I still have the message "Failed to upload file" at the end. When the progress bar plugin wasn't installed, I just had no message.
I'm working for press width large pictures, I really need to upload large files :/

I can't modify my phpinfo.ini (but I'm not sure that's the problem)

Thanks !

Greg
: Re: Larges files doesn't upload
: HDready May 13, 2011, 05:32:09 AM
Hi, no one has any idea, or patch ? I have read somewhere, that someone had a solution with temp files parts of the large file, but I'm not a developper. It was a long time ago. No patch has been developped ?

Thanks.

Greg
: Re: Larges files doesn't upload
: HDready May 19, 2011, 03:25:08 AM
Hum hum…I guess I'm not the only one with this problem…nobody can help ???
: Re: Larges files doesn't upload
: mmccarn May 19, 2011, 12:45:06 PM
Find a way to run phpinfo() on your server (http://help.rackspacecloud.com/article.php?id=082)

Look for:
* post_max_size (make sure it matches what you think you've set)

* max_execution_time (make sure you allow enough time to upload your large files)

Do you have your file storage set to 'File System' or 'Database'?  If it's set to 'Database', look for settings in mysql related to maximum item size.

Have you followed the standard feng debugging procedures?  If so, do they tell you anything?
http://www.fengoffice.com/web/wiki/doku.php/debugging
: Re: Larges files doesn't upload
: HDready May 20, 2011, 04:14:54 AM
Hi, thanks for responding ;)
I have checked the post_max_size : 64M, the max_execution_time : 120 (maybe the problem, I wans't sure about this).
A 40M file could take some time to be uploaded (more than 120s).

Where should I place the "ini_set(max_execution_time,800)" in fengOffice to fix that ?

Thanks,

Greg
: Re: Larges files doesn't upload
: HDready May 20, 2011, 05:05:39 AM
In the log file :
:
Session "default" started at 2011-05-18T13:57:28+0000
#1 DEBUG: SQL ERROR: Query failed with message 'MySQL server has gone away' - SELECT * FROM `og_user_ws_config_options` WHERE `name` = 'localization' 
#2 FATAL: exception 'DBQueryError' with message 'Query failed with message 'MySQL server has gone away'' in /fengOfficeFolder/environment/library/database/adapters/AbstractDBAdapter.class.php:386
    Stack trace:
    #0 /fengOfficeFolder/environment/library/database/adapters/AbstractDBAdapter.class.php(304): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)
    #1 /fengOfficeFolder/environment/library/database/DB.class.php(211): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)
    #2 /fengOfficeFolder/environment/classes/dataaccess/DataManager.class.php(262): DB::executeAll('SELECT * FROM `...')
    #3 /fengOfficeFolder/application/models/user_ws_config_options/base/BaseUserWsConfigOptions.class.php(105): DataManager->find(Array)
    #4 /fengOfficeFolder/environment/classes/dataaccess/DataManager.class.php(317): BaseUserWsConfigOptions->find(Array)
    #5 /fengOfficeFolder/application/models/user_ws_config_options/base/BaseUserWsConfigOptions.class.php(139): DataManager->findOne(Array)
    #6 /fengOfficeFolder/application/models/user_ws_config_options/base/BaseUserWsConfigOptions.class.php(141): BaseUserWsConfigOptions->findOne(Array)
    #7 /fengOfficeFolder/application/models/user_ws_config_options/UserWsConfigOptions.class.php(143): BaseUserWsConfigOptions::findOne(Array)
    #8 /fengOfficeFolder/application/models/user_ws_config_options/UserWsConfigOptions.class.php(127): UserWsConfigOptions::getByName('localization')
    #9 /fengOfficeFolder/application/models/user_ws_config_options/UserWsConfigOptions.class.php(101): UserWsConfigOptions->getByNameFromCache('localization')
    #10 /fengOfficeFolder/application/functions.php(449): UserWsConfigOptions::getOptionValue('localization', 1, NULL)
    #11 /fengOfficeFolder/application/functions.php(614): user_config_option('localization')
    #12 /fengOfficeFolder/application/application.php(28): get_locale()
    #13 /fengOfficeFolder/init.php(150): require_once('/homez.149/hdre...')
    #14 /fengOfficeFolder/index.php(9): require('/homez.149/hdre...')
    #15 {main}
#3 DEBUG: SQL ERROR: Query failed with message 'MySQL server has gone away' - SELECT * FROM `og_config_options` WHERE `name` = 'max_users' 
#4 FATAL: exception 'DBQueryError' with message 'Query failed with message 'MySQL server has gone away'' in /fengOfficeFolder/environment/library/database/adapters/AbstractDBAdapter.class.php:386
    Stack trace:
    #0 /fengOfficeFolder/environment/library/database/adapters/AbstractDBAdapter.class.php(304): AbstractDBAdapter->prepareAndExecute('SELECT * FROM `...', NULL)
    #1 /fengOfficeFolder/environment/library/database/DB.class.php(211): AbstractDBAdapter->executeAll('SELECT * FROM `...', NULL)
    #2 /fengOfficeFolder/environment/classes/dataaccess/DataManager.class.php(262): DB::executeAll('SELECT * FROM `...')
    #3 /fengOfficeFolder/application/models/config_options/base/BaseConfigOptions.class.php(102): DataManager->find(Array)
    #4 /fengOfficeFolder/environment/classes/dataaccess/DataManager.class.php(317): BaseConfigOptions->find(Array)
    #5 /fengOfficeFolder/application/models/config_options/base/BaseConfigOptions.class.php(136): DataManager->findOne(Array)
    #6 /fengOfficeFolder/application/models/config_options/base/BaseConfigOptions.class.php(138): BaseConfigOptions->findOne(Array)
    #7 /fengOfficeFolder/application/models/config_options/ConfigOptions.class.php(90): BaseConfigOptions::findOne(Array)
    #8 /fengOfficeFolder/application/models/config_options/ConfigOptions.class.php(75): ConfigOptions::getByName('max_users')
    #9 /fengOfficeFolder/application/models/config_options/ConfigOptions.class.php(69): ConfigOptions->getByNameFromCache('max_users')
    #10 /fengOfficeFolder/application/functions.php(410): ConfigOptions::getOptionValue('max_users', NULL)
    #11 /fengOfficeFolder/environment/classes/Env.class.php(105): config_option('max_users')
    #12 /fengOfficeFolder/application/application.php(59): Env::executeAction('error', 'system')
    #13 /fengOfficeFolder/init.php(150): require_once('/homez.149/hdre...')
    #14 /fengOfficeFolder/index.php(9): require('/homez.149/hdre...')
    #15 {main}
Time since start: 60.401705980301 seconds
-------------------------------------------------------------------------------

Session "default" started at 2011-05-19T06:22:18+0000
#1 ERROR: Error: rmdir(/fengOfficeFolder/tmp/og_1305786094_335132.dir) [<a href='function.rmdir'>function.rmdir</a>]: Directory not empty in '/fengOfficeFolder/application/controllers/ProgressController.class.php' on line 63 (error code: 2)
Time since start: 0.12260890007019 seconds
-------------------------------------------------------------------------------

Thanks for help.

Greg
: Re: Larges files doesn't upload
: mmccarn May 21, 2011, 11:25:52 AM
Do you have your file storage set to 'File System' or 'Database'?  If it's set to 'Database', look for settings in mysql related to maximum item size.

If it's set to "Database", are you able to try it when set to "File System"?

You may also need to manually empty and delete the folder complained of in your error message.
: Re: Larges files doesn't upload
: HDready May 21, 2011, 02:46:31 PM
Hi, storage to 'FileSystem' ;)
The folder you are talking about is : /fengOfficeFolder/tmp/ ?

Thanks.

Greg
: Re: Larges files doesn't upload
: franponce87 May 23, 2011, 12:47:40 PM
What about reading the manual here (http://www.fengoffice.com/web/wiki/doku.php/php.ini)? :)

Best regards,
Francisco
: Re: Larges files doesn't upload
: HDready May 23, 2011, 01:10:31 PM
Hi,
I can't change the php.ini file.
I try the solution with .htaccess as suggested on the page you 've shared, but I get an internal error, because of the host configuration.

So, what next ? ;)

I think the ini_set() should be a solution, but I don't know where to write it :/

Thanks.
Greg
: Re: Larges files doesn't upload
: franponce87 May 23, 2011, 01:14:02 PM
Well, you ought to ask your server admin to change the php.ini settings... otherwise you have to look for how to change it manually in the code and then change it back.
I would go for the first option!

Best regards,
Francisco
: Re: Larges files doesn't upload
: HDready May 23, 2011, 01:18:32 PM
The php.ini file can't be modified? I'm on shared host, OVH.
So the question is : change the upload script with set_ini() could changed something or not? And if so, where should I do the modification ?

Thanks,
Greg
: Re: Larges files doesn't upload
: moorezilla May 23, 2011, 01:50:18 PM
Here's what I would do.

Call your host and ask if they will allow you to use .htaccess overrides for your vhost.

If they do, you can up the execution and filesize variables in an .htaccess file in the root of your feng install.

Details on how to set these are here: http://us2.php.net/configuration.changes

If they won't allow you to do that, vps hosting is pretty inexpensive now. Using a vps, you could do whatever you want.

: Re: Larges files doesn't upload
: HDready May 23, 2011, 02:03:31 PM
I'm on shared host, they can't change the configuration just for me.
The server is configured on CGI and not on apache module, so .htaccess does't work.
The question is : without any change on php.ini and .htaccess, is it possible to change the max time limit ? And if so, how ?

I'm looking for VPS, but what's the minimal configuration to run FengOffice ?

Thanks.
Greg
: Re: Larges files doesn't upload
: moorezilla May 23, 2011, 02:15:24 PM
ah... ok. I don't think there's an easy way to do that. You could probably get tricky and tell php to read a different config file than php.ini, but that could cause a host of other issues, and I doubt you'd have much luck setting that up with out sudo privs.

As for a vps, I use Linode now and I've used Slicehost (I think Rackspace bought em, though) and Servint in the past. I mention them all, because they all worked and they all had plans where you could start with a very small vps account and upgrade it as necessary. Upgrading it leaves all your stuff in place; you just have to be down for a little while if you upgrade to a larger plan, as they move all your stuff to a different server. Usually takes less than an hour after you telling them that you need a larger plan, so I usually err on the side of a small plan and then raise the specs as necessary. What you need is really determined by factors I don't know... how many concurrent users, what are they doing in terms of moving bits around, etc.
: Re: Larges files doesn't upload
: HDready May 24, 2011, 04:07:22 AM
Hi,
In the most case, i'm the only one user. I'm using Feng to exchange and comment files in the most cases.
But I need a lot of bytes to stock the files and the price is growing quickly :/

Any one can tell me if ini_set() could change anything ?

Thanks,

Greg