Author Topic: Import files and folders  (Read 2891 times)

samuel2010

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Import files and folders
« on: July 29, 2010, 05:49:14 am »
Hey guys,

i have a folder of 3GB with different files and subfolders on my webserver.

Is there any possibility to mass-import these files into fengoffice?


Thanks.
« Last Edit: July 29, 2010, 08:15:16 am by samuel2010 »

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: Import files and folders
« Reply #1 on: July 29, 2010, 10:39:42 am »
Hi Samuel, you have several options:

Free Alternatives:

#1 .- Take a look at the Free Webdav Plugin in the community contributions forum board. We haven't tested it yet.

#2 .- Take a look at zipimporter, located in FENG_ROOT/library/zipimporter . It is currently undocumented and unsupported, it might require a few tweaks and hacks but it should work.

#3 .- Upload a Zip File (or several zips) and decompress it inside Feng (php-zip extension required).

Non free Alternatives:

#4 .- Support the official WebDAV plugin that will let you drag and drop the folder containing your files. It will  replicate the directory structure creating files and workspaces accordingly. We need supporters to get the plugin finished.

#5 .- Subscribe to Feng Onsite and have one of our team members help you find a way to import your information.

samuel2010

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Import files and folders
« Reply #2 on: July 29, 2010, 01:42:09 pm »
thanks for your answer. I just tried the zipimport script via ssh - but no success. Calling the script just takes 1 second - it says that it was completed, but no data is imported. Any hint for me?


Code: [Select]
php zipImportConsole.php /var/www/vhosts/domain.com/private/daten.zip 5 1
Extracting from /var/www/vhosts/domain.com/private/daten.zip ... Complete
Deleting temp files ... Complete


5 is the ID of my workspace - 1 for my user

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: Import files and folders
« Reply #3 on: July 29, 2010, 03:25:27 pm »
Checking the cache/log.php might be an option.

samuel2010

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Import files and folders
« Reply #4 on: July 29, 2010, 05:17:15 pm »
seems like I have to disable safe-mode?

Code: [Select]

Session "default" started at 2010-07-29T16:49:45+0000
#1 ERROR: Error: set_time_limit(): Cannot set time limit in safe mode in '/var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/zipImportConsole.php' on line 18 (error code: 2)
#2 ERROR: Error: zip_read() expects parameter 1 to be resource, integer given in '/var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php' on line 63 (error code: 2)
#3 ERROR: Error: zip_close() expects parameter 1 to be resource, integer given in '/var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php' on line 91 (error code: 2)
#4 ERROR: Error: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php:59) in '/var/www/vhosts/domain.com/httpdocs/orga/environment/classes/Cookie.class.php' on $
#5 ERROR: Error: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php:59) in '/var/www/vhosts/domain.com/httpdocs/orga/environment/classes/Cookie.class.php' on $
#6 ERROR: Error: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php:59) in '/var/www/vhosts/domain.com/httpdocs/orga/environment/classes/Cookie.class.php' on $
#7 ERROR: Error: unlink(/var/www/vhosts/domain.com/httpdocs/orga/tmp/1164//..): Is a directory in '/var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php' on line 115 (error code: 2)
#8 ERROR: Error: unlink(/var/www/vhosts/domain.com/httpdocs/orga/tmp/1164//.): Is a directory in '/var/www/vhosts/domain.com/httpdocs/orga/library/zipimport/ZipImport.class.php' on line 115 (error code: 2)
Time since start: 0.0748951435089 seconds
-------------------------------------------------------------------------------


cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: Import files and folders
« Reply #5 on: July 29, 2010, 05:19:12 pm »
It does ....

samuel2010

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Import files and folders
« Reply #6 on: July 30, 2010, 04:26:56 am »
Safe-Mode error has gone... But there are still errors... :-(,

Code: [Select]
Session "default" started at 2010-07-30T07:24:42+0000
#1 ERROR: Error: zip_read() expects parameter 1 to be resource, integer given in '/var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php' on line 63 (error code: 2)
#2 ERROR: Error: zip_close() expects parameter 1 to be resource, integer given in '/var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php' on line 91 (error code: 2)
#3 ERROR: Error: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php:59) in '/var/www/vhosts/domain.com/httpdocs/environment/classes/Cookie.class.php' on $
#4 ERROR: Error: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php:59) in '/var/www/vhosts/domain.com/httpdocs/environment/classes/Cookie.class.php' on $
#5 ERROR: Error: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php:59) in '/var/www/vhosts/domain.com/httpdocs/environment/classes/Cookie.class.php' on $
#6 ERROR: Error: unlink(/var/www/vhosts/domain.com/httpdocs/tmp/7600//..): Is a directory in '/var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php' on line 115 (error code: 2)
#7 ERROR: Error: unlink(/var/www/vhosts/domain.com/httpdocs/tmp/7600//.): Is a directory in '/var/www/vhosts/domain.com/httpdocs/library/zipimport/ZipImport.class.php' on line 115 (error code: 2)
Time since start: 0.0756750106812 seconds
-------------------------------------------------------------------------------

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: Import files and folders
« Reply #7 on: July 30, 2010, 09:53:29 am »
To test it, try with a smaller zip with 2 or 3 files inside.

The error seams to be that it cannot  open the Zip. It might be an issue with the path, with the zip, the zip library or other.