Author Topic: Failed to import file  (Read 6240 times)

cippian

  • Newbie
  • *
  • Posts: 4
    • View Profile
Failed to import file
« on: January 15, 2009, 10:42:51 pm »
I cannot upload *particular* files to any document tab in any workspace. When I try to upload these files I get the following error:

Failed to import file '/tmp/phppPAKXe' to the file repository (unique file id: ...)

I also get the following error:
Error
Query failed with message 'Duplicate entry 'ProjectFiles-31-uid' for key 1'

The two files that won't upload, one is a powerpoint and the other an xls spreadsheet. They are both a bit large, over 1MB. The filenames are no different than others. Even if I rename the file I still get the same errors as above. I can upload, delete, and re-upload other files.

Also, in the manual, there is no description of the differences of using the file system or the database to store files. Right now I have opengoo set to use the database.

The files are over 1MB, however it says max allowable filesize is 10MB and I tried increasing that in the php.ini to 100MB just for testing. Are there restrictions on the file size when using the database? Is there a way to increase the allowable file size when using the database if that is the problem?

Thanks for any help in advance.

« Last Edit: January 16, 2009, 12:56:09 am by cippian »

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Failed to import file
« Reply #1 on: January 18, 2009, 07:06:58 pm »
It must be related to the fact that you are using the database. The text that says the max allowed size of the file only considers what is the maximum that PHP allows to upload, not the database. I don't know how to change this in the database.

If it's not too late I would recommend you to use the filesystem, as it is faster and doesn't have this kind of size limit issues (assuming that is the cause of the problem). Did you try uploading smaller powerpoints and/or excels? And have you tried uploading large files of some other type?

cippian

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Failed to import file
« Reply #2 on: January 19, 2009, 11:50:54 am »
If I switch to filesystem, and try to upload, I get the following error:

/opengoo/upload/attributes.php' is not writable

Is there a concise guide to what the permissions should be on all folders and files? I searched but could not find a concise guide, ie a table of what permissions should be set to.


ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Failed to import file
« Reply #3 on: January 20, 2009, 09:16:29 am »
Basically, these folders need to be writable:
  • /config
  • /public/files
  • /cache
  • /upload
  • /tmp
and all files inside those folders.

Since version 1.1, files inside those folders, like /config/config.php and /upload/attributes.php are created automatically by OpenGoo and so they should already have write permissions.

On version 1.2 there will be an option to upgrade OpenGoo automatically, and this will require that you give the webserver user permissions to write on all files and folders in OpenGoo (at least during the upgrade).

cippian

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Failed to import file
« Reply #4 on: January 20, 2009, 11:25:30 am »
so all of those folders and files inside need to be 777 or 755 is enough?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Failed to import file
« Reply #5 on: January 20, 2009, 12:33:01 pm »
Depending on who is the owner user and the owner group of those files and folders. What's important is that the web server's user is allowed to write to those folders, so if that user is the owner of those files and folders a 755 would be enough.

carlos

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: Failed to import file
« Reply #6 on: January 20, 2009, 01:38:27 pm »
The problem with storing large files in the database (MySQL) is that mysql adds a limitation to the size of the communications with the client, in this case opengoo. This limitation is set by default at 16Mb, although there are cases in which this is only 1Mb.

To change the size of the communications packet, you should change the value of the 'max_allowed_packet ' variable to 100Mb, for example. This can be done executing the sql command 'set GLOBAL max_allowed_packet =104857600', or better still modifying the max_allowed_packet variable setting in the my.cnf mysql option file and restarting the server.. see http://dev.mysql.com/doc/refman/5.0/en/windows-create-option-file.html

sinbad

  • Freshman
  • *
  • Posts: 31
    • View Profile
Re: Failed to import file
« Reply #7 on: May 06, 2009, 06:49:03 pm »
I'm using file system storage and get the same error as well.
I changed all permissions of the above dirs to 777 and still get the same error when I try to upload.

Any ideas what next?