How To: Setting Up Drupal File Framework On Ubuntu 8.10

Posted by – December 2, 2008

This document is continually changing! One of the ways it gets changed is by people communicating with me using comments. In the future, I will host a wiki for this purpose – but for the time being please help me out by posting your suggested changes/improvements as comments!

*2010/05/17: New users will want to read down through all of the comments, as this post has become out of date in quite a few ways. Especially have a look at this comment from Wouter.*

Drupal Logo In my previous post I described the troubles I had with standalone document management softwares. Many of the issues I had were related to a lack of flexibility and lack of integration with my CMS of choice: Drupal.

At first glance(and even after looking quite hard), Drupal seems to be weak when it comes to document management. But just like any Drupal solution, a careful examination of the available modules might turn up the ingredients for the perfect recipe!

In this article, I’m going to describe the steps required to get off the ground with a Drupal based document management solution that will provide:

  • Organization of documents
  • Revision control
  • WebDav access
  • Rich metadata
  • Indexing for search
  • In-browser display of documents
  • Document conversion services
  • All the goodness you get from building it inside Drupal
    • Free authentication
    • Free administration interface
    • Integration with other Drupal modules (Views anyone?)
    • Awesome community of developers

Getting started

I’d recommend testing this out on a fresh install of Drupal6.6 – should you encounter difficulty, the number of modules on an established site could make troubleshooting a bit more difficult. After you’ve got it down, you can move on to your active development site.

Thanks to Arto Bendiken, Miglius Alaburda, Justin Miller, Ben Lavender, Frank Febbraro, and of course Moshe Weitzman.

This article is based on Setting up your system for file conversions with File Framework. Ben gives a very helpful and accurate rundown of what it takes to get going under CentOS. Since I was trying it out under Ubuntu, I thought I’d spend the time documenting my troubles – and include instructions to add some extra bells and whistles.

System stuff

First things first, lets go ahead and get all the packages we need:


<pre>
sudo apt-get install php5 php5-dev php-pear make php-getid3 libmagic-dev clamav swftools unrtf poppler-utils catdoc ghostscript tzdata tzdata-java alsa-tools alsa-utils libx11-6 libxext6 libxi6 libxtst6 asoundconf-gtk libfreetype6 libpng12-0 libjpeg62 giflib-tools libsm6 openjdk-6-jdk openoffice.org openoffice.org-headless code2html pstotext
sudo pecl install Fileinfo
sudo pear install http://download.pear.php.net/package/HTTP_WebDAV_Server-1.0.0RC4.tgz
sudo pear install http://download.pear.php.net/package/HTTP_WebDAV_Client-1.0.0.tgz
</pre>

If you have trouble with the install of the pear modules, probably the version has changed – you should visit the HTTP packages page.

JODConverter

We also need to get the JOD Converter. It’s a few .jar files that we’ll stick in a directory in /opt. JODConverter is the piece that actually manages the conversion process through openoffice.


cd /opt && wget http://internap.dl.sourceforge.net/sourceforge/jodconverter/jodconverter-2.2.1.zip && unzip jodconverter-2.2.1.zip && mv jodconverter-2.2.1 jodconverter

Run OpenOffice as a service

Long story short, use a version later than 2.3 to avoid problems running it ‘headless’. This is essential for the file conversion process.

edit: I realized that the OpenOffice service really needs to be running as www-data, so using an init script like this one is really necessary.

<pre>
#!/bin/bash
#
# description: Open Office Service
#

export WEBUSER=www-data
export PATH=$PATH
export LANG=en_US.UTF-8

start() {
echo -n "Starting OpenOffice service: "
sudo -u $WEBUSER /opt/openoffice.org3/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp" -nofirststartwizard & 
echo "OpenOffice Started"
}

stop() {
echo -n "Stopping soffice: "
pkill soffice
echo "OpenOffice Stopped"
}

case "$1" in
start)
start
;;
stop)
stop
;;
status)
status soffice
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac

exit 0
</pre>

If you want OpenOffice3 like I’m using, you might want to remove the 2.4 packages with apt-get remove and go to openoffice.org and download the .deb packages. I installed by extracting the archive, cd’ing into the folder and using

sudo dpkg -i *.deb
and doing the same in the desktop integration folder. I can’t really recommend using OOo3 because the Ubuntu folks don’t have it in the repos…and the GUI is very crash happy.

Drupal stuff

Clean URLs

Pop over to the Drupal.org page describing how to set up clean urls if you don’t have that going already. Clean urls aren’t necessary, but due to a bug currently in bitcaching – it is.

Install Drush

If you aren’t using the Drush module, I highly recommend it. Although not related to or necessary for this project, since I discovered it one day ago, it’s become one of my favorite modules. It provides a familiar way to install and update your packages – and has a number of modules that extend it’s functionality.

  • Install the Drush module by downloading the tarball to your modules directory (sites/all/modules) and extract it.
  • Go into your modules page in Drupal and enable the Drush and associated modules. You won’t be able to turn on the simpletest runner module, that’s fine. Also – I wasn’t able to use the CVS support, so I have that disabled as well.

One last thing – you need to add a softlink to drush.php somewhere in your path. For me, I just echoed the path variable and picked the place that looked the best… Make sure you change any paths to whatever works.

<pre>
% echo $PATH
/home/hopkinsju/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

% ln -s /var/www/drupal/sites/all/modules/drush/drush.php /home/hopkinsju/bin/drush
</pre>

Now you should be able to type ‘drush’ and the computer will know what you’re talking about.

Add required modules with Drush

Now we just do this to get all the modules we need:


drush pm install bitcache cck dav fileframework rdf views fileserver #FTW!

Drush will go out and grab the latest version of each module and extract it in your ‘sites/all/modules’ directory.

note: As of this writing bitcache-alpha3 had a bug in it. Using alpha3 will result in the error “Fatal error: Unsupported operand types in serverpath/includes/common.inc on line 1546″. To resolve this, you can use either the alpha2 or dev versions of the bitcache module

A few other bits

The File Framework can get metadata for and play flash and mp3 files. You need only add a couple things to the vendor folder of fileframeworks:

edit: Using the commands below should get you going without a problem, but I wanted to clarify: You MUST use the ‘slim’ version of the xspf player. Also, the path to getid3 should be /vendor/getid3 – there should also be a directory /vendor/getid3/getid3 containing the different modules.

update: new versions of getID3 and flowplayer as of Mar 18, 2009 – also you need to make folders for them…I’ll update the lines in a bit.

<pre>
cd /path/to/drupal/sites/all/modules/fileframework/vendor
wget http://voxel.dl.sourceforge.net/sourceforge/getid3/getid3-1.7.9.zip
unzip getid3-1.7.9.zip

wget http://flowplayer.org/releases/flowplayer/flowplayer-3.0.7.zip
unzip flowplayer-3.0.7.zip

wget http://voxel.dl.sourceforge.net/sourceforge/musicplayer/xspf_player_slim-correct-0.2.3.zip
unzip xspf_player_slim-correct-0.2.3.zip
</pre>

Enable the modules

Visit your modules page and enable the modules you need. When I first attempted this, I did run into an error where I had enabled one module or another without first enabling the modules it required(I think it was the RDF API module that needed to be enabled before the File formats). You’ll want to actually look at what you’re installing rather that just checking all the boxes of course. But basically – check all the boxes ;)

Drupal admin area things

  • Visit admin/settings/dav/dav_fs and save the page to create the dav directory
  • Enable DAV Server in admin/settings/dav
  • If you want html highlighting for text files admin/settings/file/format/text
  • Enable antivirus scanning (I chose to run it as a program) admin/settings/file/antivirus
  • Enable file formats admin/settings/file/format
  • Go tell the Fileserver that you want it to use the ‘Files’ vocab. Doing this will enable automatic creation of file nodes when items are added to that folder via WebDAV.

Please post your comments if you can improve on what I’ve done!

Happy document managing!

43 Comments on How To: Setting Up Drupal File Framework On Ubuntu 8.10

  1. christopher says:

    Hi Justin, thanks very much for this. I am still having trouble getting the embedding to work properly, and I can’t seem to find much info on the drupal project page. What happens is that when I try to embed anything, all I get on the node is [file: link=1]. Word documents ARE successfully converted into PDF, as evident with:

    File “Work_Order.doc” other available formats:| info PDF document (45.49 KB) | view | download | info

    and the “view” link takes me straight to the PDF. Unfortunately, the attachment preview window isn’t loading  What I want is for users to be able to upload word documents or PDFs, and have them be embedded into the node (either using the embed module or the attachment preview) – according to the fileframework project page, this is possible, but I can’t seem to figure out. Would you mind helping a bit? You can email me at christopher@threedaysatsea.com

    Thanks!
    Christopher M.

  2. Justin says:

    Christopher,

    Sorry for the long delay in getting back to you. Your comment was captured by Akismet – and I just now noticed it.

    Are you placing that embed snippet there by hand, or using the embed link below the node body? The problem with the snippet is that it is lacking the node id of the file to be embedded. Here is a sample snippet:

    [file:350]
    and then with the options set:
    [file:350 handler=file_image_image align=right link=1 caption=an optional caption]

    Both of the above snippets work for me. The first embeds a link with inline view/open/download links, the second embeds the image preview floated to the right a caption centered below.

    I’ll email this to the addy you provided as well, but please to come back and create an account! I suspect your comment was flagged as spam because of the email address?

  3. Jim says:

    Hello Justin,
    First thank you for the great post!!! It significantly shortened my set up time. However, I have a small problem with this module which I hope you can solve or maybe point me into the right direction. When install everything and set up all the permission the system seems to be working just fine. Nonetheless when I attempt file upload, I receive this peculiar error:

    Fatal error: Unsupported operand types in serverpath/includes/common.inc on line 1546

    I just could not figure out why it happens. If you have any suggestions, please feel free to share them. Thank you.

    Jim

  4. Justin says:

    Jim,

    Sounds like you are using bitcache alpha3. I mentioned it in the post, but didn’t give much detail about the specific error.

    Using either bitcache 6.x-1.0-alpha2 or bitcache 6.x-1.x-dev should fix you right up. I’m using the dev version myself.

    I’ll update my post to include the error message for clarity.

    Cheers!

  5. Alex Matan says:

    Thanks for this great tutorial. I am really excited about trying out the File framework and your help is making it ridiculously easy to do so. But I did encounter some minor problems when I gave it a shot.

    I am using a fresh install of Ubuntu 8.10 (Intrepid) and encountered a few problems running the initial “System stuff” step above.

    First, I got complaints that pecl was an unrecognized command when I ran “sudo pecl install Fileinfo”

     sudo: pecl: command not found

    I fixed that by first running “sudo apt-get install php-pear”

    I then got the following complaint at the bottom of the long install script output when I ran “sudo pecl install Fileinfo”

     ERROR: `make’ failed

    I fixed that by first running “sudo apt-get install make”

    So, for a fresh server install without these packages already in place, the “System stuff” section should read as follows:

    AS ABOVE:

    sudo apt-get install php5 php5-dev php-getid3 libmagic-dev clamav swftools unrtf poppler-utils catdoc ghostscript tzdata tzdata-java alsa-tools alsa-utils libx11-6 libxext6 libxi6 libxtst6 asoundconf-gtk libfreetype6 libpng12-0 libjpeg62 giflib-tools libsm6 openjdk-6-jdk openoffice.org openoffice.org-headless code2html pstotext

    NEW:

    sudo apt-get install php-pear
    sudo apt-get install make

    THEN CONTINUE AS ABOVE:

    sudo pecl install Fileinfo
    sudo pear install http://download.pear.php.net/package/HTTP_WebDAV_Server-1.0.0RC4.tgz
    sudo pear install http://download.pear.php.net/package/HTTP_WebDAV_Client-1.0.0.tgz

    Cheers,

    Alex Matan

  6. Justin says:

    Alex,
    Thanks for helping to improve this article. I’ve updated it to include the changes you suggested.

    I also added a couple notes about adding and enabling the Fileserver module. I left it out initially and didn’t realize until a couple months later that I wasn’t able to actually create nodes via WebDAV.

    I think the contents of this article are coming close to something like what we need for the Drupal Handbook documentation of this module, so thanks again!

    See you at Drupalcon?

  7. Andrés says:

    Can you explain a little more this point:

    Go tell the Fileserver that you want it to use the âFilesâ vocab. Doing this will enable automatic creation of file nodes when items are added to that folder via WebDAV.

    What means “go tell the fileserver” and what means “the ‘Files’ vocab”.

    Thanks

  8. Josephus says:

    Hello Justin,
    First thank you for the great post!!!

    I have a problem with this module which I hope you can solve or maybe point me into the right direction. When install everything and set up all the permission the system seems to be working just fine. Nonetheless when I attempt file upload, I receive this peculiar error:

    1. The directory does not exist.
    2. Error saving file myfile.pdf. Please, contact site administrator.

    Thanks

  9. Justin says:

    So sorry for the late reply. I’ve been insanely busy, and then on vacation – neither one are very supportive of checking my blog for comments :)

    About your problem though, I dunno. I’m not sure I’ve seen this message before, but I’d first check that you have the directory.

    Go to admin/settings/file-system and find your default file path. Then look at your server and go there. You should have a folder in there for ‘bitcache’ and a folder in there that is where the repository for the file module goes – so in my case sites/default/files/bitcache/file

    Also, have a look at your tmp directory settings at admin/settings/file-system and make sure that directory exists – then look at phpinfo() to make sure you have access to that directory. I’ve had lots of problems with php trying to use a tmp directory that it didn’t have access to (/root/tmp).

  10. Justin says:

    @Andres
    Instead of ‘Go tell the fileserver’ I might have said set the configuration for the fileserver module.

    ‘the Files vocab’ is the vocabulary that is automatically created by the file module to handle the categorization of file nodes. The files are in fact all stored in one folder on the server, but thanks to the vocabulary, you can create the illusion of nested folders in the file browser.

    Because the Fileframework module creates files as Drupal nodes, and uses the File vocabulary to categorize them, you can have a single file in multiple folders without duplication of the original data.

  11. Kevin M. says:

    I am having the same issue as Josephus above. Here is the full error message: http://drupal.org/node/408504#comment-1476314

    My files / tmp setup is fine, but the sites/default/files/bitcache and sites/default/files/bitcache/file directories were never created. Unfortunately, the documentation for all these modules is pretty poor. Any ideas? Are there files I can cp into bitcache/file to maybe make this work?

  12. Christophe says:

    Hi,

    I was facing the same issue than Kevin & Josephus, with a log saying “The directoryâdoes not exist”.

    I don’t remember where I saw the solution, but to allow jod converter to cut & paste the generated file in [tmpdir] (so /tmp in my case), I’ve been obliged to put the wwwrun account owner of /tmp (even if it was set 777). But when I restart my server (under opensuse 10.3), /tmp is reset with root as owner.

    I solved this issue by replacing into MIME setup page the [tmpdir] value by a specific folder owned by wwwrun… and it’s ok.

  13. Christophe says:

    And many thanks to you Justin, I spent long time to setup my opensuse, I’m still unable to start openoffice with a batch, but you really helped me a lot !

  14. Justin says:

    @Kevin It looks like you’ve been able to resolve your issue by following the steps in http://drupal.org/node/425884#comment-1448512 That’s great.

    @Christophe Perhaps try the above – basically just reinstalling the modules (I’d use devel myself). Also, I cannot stress this enough: look at the output of phpinfo(). You need to look at the value of $TMPDIR. It may be that root’s (or another users) environment variables are being carried over to apache. Look at your phpinfo() and let me know what $TMPDIR is.

  15. Dave says:

    Thanks for a great tutorial, I managed to get this going on debian as root, but having an issue starting from the script.

    I can run :

    /opt/openoffice.org3/program/soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp” -nofirststartwizard

    as root, but when running the script, I get :

    #/etc/init.d/openoffice-service start
    Starting OpenOffice service: OpenOffice Started
    [Java framework] Error in function NodeJava::writeSettings (elements.cxx).
    javaldx failed!
    creation of executable memory area failed: Permission denied
    creation of executable memory area failed: Permission denied
    creation of executable memory area failed: Permission denied
    creation of executable memory area failed: Permission denied
    creation of executable memory area failed: Permission denied
    creation of executable memory area failed: Permission denied
    creation of executable memory area failed: Permission denied

    the java I have installed is java-gcj-compat, the server is debian etch

  16. Dave says:

    yike, I should add, I think the issue is related to the www-data user, I can also start as any other standard user.

  17. Justin says:

    Are you sudo’ing the openoffice start script or are you running it from a root terminal? The line:
    sudo -u $WEBUSER /opt/openoffice.org3/program/soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp” -nofirststartwizard &

    won’t work right unless you are running as a regular user and do:

    sudo /etc/init.d/openoffice-service start

    Try that and let me know. Depending on your needs, you might want to look at either editing the script to use a line like this:

    su – $WEBUSER -c “/opt/openoffice.org3/program/soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp” -nofirststartwizard &”

    I’m not sure though. Tomorrow night if I have time and can remember I think I’ll start a book on DDO and put what I’ve got into it. I’ll section it out by OS since there seems to be a variety of different issues depending on what everyone is running.

  18. Hi Justin,

    I’m working through this on an Ubuntu 9.10 (beta) amd64. I just ran into the “creation of executable memory area failed: Permission denied” error. Your suggestion of “su â $WEBUSERâ-c …â clears up the error message.

  19. Andry B says:

    Thanks for the great tutorial.
    Anybody have tutorial on settingup the WebDav?
    I can access the WebDav,but I don’t know how to upload multiple files via WebDav.

    Any help would be appreciate.

    Thanks

  20. Andrés says:

    going back to:
    ‘âthe Files vocabâ is the vocabulary that is automatically created by the file module…’
    when I go to ‘admin/settings/dav/fileserver’
    I see:
    ‘File taxonomy server
    Vocabulary settings
    Exported vocabularies:’

    But in the Area (the square) where sould be the ‘File’ vocabulary to select I see nothing…

    Did I do something wrong, or do I’m lacking some step?
    Thanks for your previos help, was perfect.

  21. Justin Hopkins says:

    Did you look at the issue queue? Looks like several similar items have been resolved:
    http://drupal.org/project/issues/fileframework?text=vocabulary&status=All

  22. Andrés says:

    Ok, I went to ‘admin/content/taxonomy/add/vocabulary’ and over there i added the ‘File’ vocabulary with next features:
    Content types: File
    Stettings: tags, multiple select

    It was that the right way to do it?

  23. Justin Hopkins says:

    The file vocab should be created automatically. What module versions are you using?

    Did you look at the issue queue?

  24. Andrés says:

    CCK 6.X.2.6
    File Framework 6.x-1.0-alpha5
    Bitcache 6.x-1.0-beta2
    RDF 6.x-1.0-alpha7
    Views 6.x-2.8
    Drupal 6.15

    Anyway I think I make it work, please visit http://www.chandia.net/repositori and check if it’s the desired behaviour.

    Different stuf, about Drush..
    I wasn’t able to install it.
    Youre instruccions are a bit different from the ones in the Readme of the module, anyway I tried both ways but I couldn’t see the module to enable it, is there some trick?, anyway these are the differences

    readme: Untar the tarball into a folder ‘outside’ of your web site (/path/to/drush)
    you: Install the Drush module by downloading the tarball to your ‘modules directory’ (sites/all/modules) and extract it

    readme: ln -s /path/to/drush/drush /usr/bin/drush
    you: ln -s /var/www/drupal/sites/all/modules/drush/drush.php /home/hopkinsju/bin/drush
    (you link ‘drush.php’. readme links ‘drush’

    Thanks for all of your support

  25. Andrés says:

    Another question.
    Would you recommend the sorl installation?

  26. Justin says:

    Right, are you talking about Solr? If so I can’t say from personal experience, but in general Solr has a great reputation.

  27. Justin says:

    Yes, this looks great! Congrats on getting it going.

  28. drewbe says:

    Justin,

    thank you for this great explanation.
    I haven’t started the drupal integration, I’ve been stuck trying to get openoffice to run as a headless service…

    My problem is related to Daves (from May 2009)

    JODconverter and OOo3.2 work great together, as long as I start “soffice” manually:

    sudo /opt/openoffice.org3/program/soffice -headless -accept=âsocket,host=127.0.0.1,port=8100;urpâ -nofirststartwizard &

    and run JODconverter from commandline.

    so I created a script per your instructions:

    and ran the script from
    sudo /etc/init.d/soffice-service start

    but get the following error:
    creation of executable memory area failed: Permission denied

    I tried the suggestion you made in reply to Dave.
    but got a number of other errors.

    can you offer any more insight into how to run openoffice as a service to be accessed by a web app?
    how to structure the permissions? maybe..
    I’ve really been all over the place trying to solve this, or I wouldn’t bother you.
    but based on your post and your comments, I’m hoping you have a quick solutions..

    thanks
    drew

    I’m running Ubuntu Hardy LTS
    oo3.2

  29. Justin Hopkins says:

    @drewbe,

    So are you saying that you edited the script to read

    su – $WEBUSER -c “/opt/openoffice.org3/program/soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp” -nofirststartwizard &”

    p.s. I used this tool to convert that last string into html entities. I don’t know why my comments aren’t UTF-8, but it’s freaking annoying…

    Why don’t you post the script you have, the command (and user) you are using to invoke the script, and any output?

    The anser to your last question about it being accessed by a web app really just requires that OOo and JODconverter be started as the apache user. Running JODConverter and OOo as any user will “work”, but if your intent is for Drupal to have access to the files after they are created, they will need to be owned by the apache user.

  30. Wouter says:

    I am busy trying to get this all to work on 10.4 and my first snag was the permission part of running the openoffice daemon.
    Well I think the man page of sudo in the end helped me:
    -H  The -H (HOME) option sets the HOME environment variable to the homedir of the target user (root by default) as specified in passwd(5). By default,
    sudo does not modify HOME (see set_home and always_set_home in sudoers(5)).

    And I am not done here and have not everything running yet but it might also explain why the process was trying to write to /root/tmp/, and it solved the openoffice start problem.

    and on a side note ….
    sudo pear install HTTP_WebDAV_Server
    works just as well and you don’t have to worry about the version(not that it is maintained)

    swftool for some reason cannot be installed with apt-get today??? the package does exist on the ubuntu website but apt-get and aptitude do not find it.

    And the last one for now JODConverter is now a package so you can install it trough apt-get.
    Thnx for the writeup and keeping up with the comments ;)

  31. Justin says:

    Thanks for the tips! I’ll add them to the post – but obviously it’s starting to get way out of date now. Sad face. Truth is, I’ve turned off the file conversion parts of this on the site it was implemented on.

  32. Mike says:

    Are there any demo sites for this particular combination of modules? I’d love to see a professional grade demo. Thanks

  33. Jean Vieille says:

    Thanks for this great tuto
    Please add in Run “OpenOffice as a service:
    update-rc openoffice.rc defaults

  34. Justin says:

    Are you suggesting I add this to the init script? If so, where exactly? My script doesn’t use it, so can you also tell me what OS and version you’re using as well as OpenOffice version?

  35. Justin says:

    If you read through the comments you’ll find a number of people who have likely implemented this. It’s not a typical public facing service (imho), so you might have trouble actually seeing it live.

  36. Jean Vieille says:

    My previous post was about installing on Debian (Lenny) that needs to explicitly activate the automatic start at boot. It is the same for Ubuntu I guess. If you don’t do that, OpenOffice will probably don’t run at the next reboot.

  37. Jean Vieille says:

    I have a problem with my OpenOffice 2.4 install for serving my Drupal FF conversions.
    After a few days, it starts sucking the CPU power. It is currently at the top of the running processes taking 57% load of an 8*2.8 GHz machine… with 5-10% more every day.
    Last week, it was eating the memory taking a good share of the 12 GB Ram
    I have to reboot the machine every week to keep this in control.
    Any idea?

    I think about trying to install Ooo 3.2, just uninstall – and resinstall appropriately? Any impact on the script?

  38. [...] How To: Setting Up Drupal File Framework On Ubuntu 8.10 HOWTO set up the Drupal File Framework document management module suite under Ubuntu. (tags: drupal howto ubuntu reference linux documentimaging)  Filed under: del.icio.us Leave a comment  Comments (0) Trackbacks (0) ( subscribe to comments on this post ) [...]

  39. dave k says:

    Hi Justin,

    thanks for the walkthrough, the fileframework integration is indeed tricky (i lost my taxonomy). however, I have a separate question; when starting up the webservice I am getting an error:

    [Java framework] Error in function createSettingsDocument (elements.cxx).
    javaldx failed!

    this seems to be a headless run error. any ideas?

    thanks
    dave

  40. Kesh says:

    Hi dave k,

    This issue you can fix by creating folder .openoffice.org in yur user home directory (user who runs openoffice).

  41. ChrisW says:

    So I am giving this a try on 10.04 Ubuntu server.
    I have run into a few things.

    Open Office installs into a different place now with the package. (see update below).

    I have the same error:
    [Java framework] Error in function createSettingsDocument (elements.cxx).
    javaldx failed!

    I have no user folder for www-data to add .openoffice.org into it.
    I can start OO with the command line of another user and with root.
    I tried creating a user folder www-data with the permissions of www-data and a folder .openoffice.org with the same www-data permissions.
    Still no go for me.

    #!/bin/bash
    #
    # description: Open Office Service
    #

    export WEBUSER=www-data
    export PATH=$PATH
    export LANG=en_US.UTF-8

    start() {
    echo -n “Starting OpenOffice service: “
    sudo -u $WEBUSER /usr/bin/soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp” -nofirststartwizard &
    echo “OpenOffice Started”

  42. ChrisW says:

    Is the module WebDAV the way to go now to add WebDAV to Drupal?  It looks like it has all the components required?

    I will note that this module is also way old. http://drupal.org/project/webdav

  43. Oliver says:

    I was also getting errors similar to

    [Java framework] Error in function createSettingsDocument (elements.cxx).
    javaldx failed!

    but slightly different because I’m using libreoffice:

    I/O error : Permission denied
    I/O error : Permission denied
    [Java framework] Error in function NodeJava::writeSettings (elements.cxx).
    javaldx failed!

    One solution (which I haven’t tested for this particular command but have used successfully for similar commands), is to prefix the command with “HOME=/tmp”, eg:

    HOME=/tmp /usr/bin/soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp” -nofirststartwizard &

    This will set the home directory to /tmp for the command, which the web user should have write access to.

    Another hot tip: google for the “libreoffice -convert-to” option for a simpler alternative to running (open|libre)office as a service for document conversion.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">