unoconv not running with apache, but runs fine with root

I traced the error to this bit of the code:

        try:
            print >>sys.stderr, "lalala %s", of.basepath
            import uno, unohelper
            print >>sys.stderr, "lelele"
            office = of
            break
        except:
#            debug_office()
            print >>sys.stderr, "unoconv: Cannot find a suitable pyuno library and python binary combination in %s" % of
            print >>sys.stderr, "ERROR:", sys.exc_info()[1]
            print >>sys.stderr

When running as root I get this:

# /usr/bin/unoconv -f pdf -o "/var/www/tmp/test2" "/var/www/tmp/test1"
lalala %s /opt/libreoffice3.6
lelele

Then running the same root through a webpage with apache, I get this:

lalala %s /opt/libreoffice3.6
unoconv: Cannot find a suitable pyuno library and python binary combination in /opt/libreoffice3.6
ERROR: Error during bootstrapping uno (RuntimeException):cannot open file:///root/.ure/types.rdb: 13
lalala %s /opt/libreoffice3.6
unoconv: Cannot find a suitable pyuno library and python binary combination in /opt/libreoffice3.6
ERROR: Error during bootstrapping uno (RuntimeException):cannot open file:///root/.ure/types.rdb: 13

So basically the try bit fails with apache but works as root. I suppose it might be a permissions issue, or something in the environment, but I haven't been able to find any info.

Thanks for your attention!

lalala %s /opt/libreoffice3.6
unoconv: Cannot find a suitable pyuno library and python binary combination in /opt/libreoffice3.6
ERROR: Error during bootstrapping uno (RuntimeException):cannot open file:///root/.ure/types.rdb: 13

unoconv: Cannot find a suitable office installation on your system.
ERROR: Please locate your office installation and send your feedback to:
http://github.com/dagwieers/unoconv/issue