Fork me on GitHub

Announcement

The oneye project has been discontinued. You might not expect further fixes and support from us. All community related systems are set to read-only mode. Though feel free to download and use oneye as-is or even fork it over at GitHub.

#1 2013-07-31 16:52:51

rozondas
Member
Registered: 2013-07-30
Posts: 16

OpenOffice / LibreOffice

Hi there. I really a need solution with the Office-Support for oneye. Everything is up and running smoothly but the only problem is Office (enable Office-Support). I even tried to use an Windows Sever with OpenOffice 4 and it still the same error. sad


Debian 7.1.0
Xampp/Lampp PHP 5.4
LibreOffice 3

Last edited by rozondas (2013-07-31 16:53:28)

Offline

#2 2013-08-01 14:53:17

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Welcome,

please tell us, which steps you followed to get Office Support and tell us your exact Version.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#3 2013-08-01 16:37:13

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

I'am using oneye 0.9.1 (before 0.9.0).

Copy

youroneyeDir/oneye_xxxxxx/extras/OpenOffice/oneye.xba

from the oneye installation directory to


/usr/lib/openoffice/share/basic/Tools/


Edit


/usr/lib/openoffice/share/basic/Tools/script.xlb


and add

library:element library:name="eyeOS"/


under

library:element library:name="Debug"/


:should look like this

library:element library:name="Debug"/
library:element library:name="eyeOS"/

Offline

#4 2013-08-02 16:57:17

s0600204
Member
From: UK
Registered: 2012-01-22
Posts: 118
Website

Re: OpenOffice / LibreOffice

Hi rozondas,

The steps you followed are no longer valid (where did you get them from?) - the eyeos.xba route has been completely removed in favour of unoconv. (Lars, maybe we should remove the [SYSTEM]/extras/OpenOffice folder?)

Could you please:

  1. In your browser, login to your oneye installation

  2. Right-click on the desktop area and select 'Preferences'

  3. From the categories down the left-hand side, select 'System'

  4. From the tabs at the top, select 'Office Support'

Then follow its instructions:

To refresh the settings page in oneye to see changes, reselect 'System' then 'Office Support'.

Hope this helps

Offline

#5 2013-08-04 22:52:05

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

@rozondas: s0600204 is all right.

s0600204 wrote:

The steps you followed are no longer valid (where did you get them from?) - the eyeos.xba route has been completely removed in favour of unoconv. (Lars, maybe we should remove the [SYSTEM]/extras/OpenOffice folder?)

Ouch, I thought that's been removed already. Done so finally.

@s0600204: Are your changes to unoconv good enough to start a pull request for them? Would like to benefit from other contributions (no explicit one for the moment) to that project, too.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#6 2013-08-05 10:23:47

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

@s0600204:

Python path is set. I'am still unable to open .doc files. Same error es before: For some reason the conversion failed. Try again Later.

Python 2.7.3

Offline

#7 2013-08-05 16:21:42

s0600204
Member
From: UK
Registered: 2012-01-22
Posts: 118
Website

Re: OpenOffice / LibreOffice

@rozondas

And unoconv? Is that installed? For clarity, extracting the zip I linked will give you a folder called 'unoconv-master'. The contents of this folder want to go into system****/extras/unoconv, and must be able to be read from and written to by the webserver.

Offline

#8 2013-08-06 08:38:29

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

@s0600204:

Still not working, even with the new unoconv files. Still getting the For some reason the conversion failed. Try again Later error sad

Offline

#9 2013-08-06 20:49:34

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Okay, please, add "var_dump($cmd);" the following line to the file "xxxxxxxxxx/system/lib/eyeConverter/main.eyecode" in front of "shell_exec($cmd);":

Now you should see some kind of log message before that "For some reason [...]" line, correct? Please, post that line here and I'll give you further instructions.

Just a small description of what that line's doing and what I've in mind: That line prints out the command, which we use to start unoconv, a script/tool to convert documents using LibreOffice. With some kind of preparation (second step, that I need your command for) you can try calling that command inside your shell in order to receive some more Feedback from unoconv.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#10 2013-08-07 08:14:59

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

string(318) "'python' '/opt/lampp/htdocs/oneye/system_1152573eed/extras/unoconv/unoconv' --format=html --output='/opt/lampp/htdocs/oneye/system_1152573eed/users/rt4/root/tmp/71764_new.tmp' --home='/opt/lampp/htdocs/oneye/system_1152573eed/users/rt4/root/tmp' '/opt/lampp/htdocs/oneye/system_1152573eed/users/rt4/root/tmp/71764.doc'"

Offline

#11 2013-08-08 00:25:12

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Okay, so please try the following in a shell on that server:

1) The following should some help for unoconv. Does it?

'python' '/opt/lampp/htdocs/oneye/system_1152573eed/extras/unoconv/unoconv' --help

2) Take a valid doc file, rename it to "test.doc" and save it somewhere. Go there (in command line) and try the following. What does it create? Is there a file or Folder

'python' '/opt/lampp/htdocs/oneye/system_1152573eed/extras/unoconv/unoconv' --format=html --output='./test.html' './test.doc'

Well, if those tests fail already, it seems to be a Problem with the python path or something like that.

PS, @s0600402: On Windows LibreOffice comes with its own python at "C:\Program Files (x86)\LibreOffice 4.0\program\python.exe". What about the UNIX versions?


Best regards,
Lars Knickrehm

The oneye project.

Offline

#12 2013-08-08 09:00:03

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

@lars-sh:

The test worked. A .html was created with the text from the .doc file. Now what? hmm

Offline

#13 2013-08-08 09:26:26

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Well, unoconv and LibreOffice seem to be installed correctly and those path seem to be correct, too.

We can now check what happens if we clean HOME and PATH variables before calling unoconv. But I guess that's working just fine, so it seem to be a rights problem when calling python via PHP. I'm in train right now. In the evening I'll create a simple test file for you to check what happens when calling "shell_exec" (a PHP function).

In the meanwhile you might check if that function is in the list of PHP's disabled functions (see PHP.ini).


Best regards,
Lars Knickrehm

The oneye project.

Offline

#14 2013-08-08 16:23:13

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

I'am unable to open the php.ini. Even with Gedit hmm

Offline

#15 2013-08-08 17:10:20

s0600204
Member
From: UK
Registered: 2012-01-22
Posts: 118
Website

Re: OpenOffice / LibreOffice

@lars : It varies from system to system, I believe. On systems that have package managers that understand the concept of dependencies, then the correct version should be pulled automatically. As rozondas is running Debian, which does have such a package manager, then the correct python version should be installed. This is easily confirmed by the fact that I too have a Debian system and that his python version matches mine.

@rozondas : Could you please go to the file "xxxxxxxxxx/system/lib/eyeConverter/main.eyecode", find this line (should be 80)

$args = ' --format=' . $format . ' --output=' . escapeshellarg($dest) . ' --home=' . escapeshellarg(realpath(um('getCurrentUserDir') . TMP_USER_DIR)) . $args;

and add

. ' -vvvvvv > ../unoconv.log'

to the end before the semicolon so it reads

$args = ' --format=' . $format . ' --output=' . escapeshellarg($dest) . ' --home=' . escapeshellarg(realpath(um('getCurrentUserDir') . TMP_USER_DIR)) . $args . ' -vvvvvv > ../unoconv.log';

Then, rerun the conversion and report back whatever "unoconv.log" has within it.

Offline

#16 2013-08-09 08:13:04

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

@s0600204: Added your code and made a test conversion. The unoconv.log is empty O.o

Offline

#17 2013-08-11 23:15:10

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Just to let you know: I won't be able to answer before Saturday, cause of some mandatory work. Will keep this thread in mind.

PS: But that file is created once you open a document? I recommend you to do something like the following in that line (additionally) and post the output here:

var_dump(shell_exec(...));

Best regards,
Lars Knickrehm

The oneye project.

Offline

#18 2013-08-26 12:27:02

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

Back again after my vacation.

The unoconv.log is created after I start the conversion. Were exactly shall I put the var_dump(shell_exec(...)); code?

Offline

#19 2013-08-26 13:20:18

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Sorry, has been busy that day, here's a better description of what to do:

Edit "system/lib/eyeConverter/main.eyecode" and replace shell_exec($cmd); with var_dump(shell_exec($cmd));.

Finally tell us what you see in that eyeVisor window (when opening a DOC / ODT file).

PS: Just to make sure you might want to send me a screenshot of that to mail@lars-sh.de .


Best regards,
Lars Knickrehm

The oneye project.

Offline

#20 2013-08-28 12:43:17

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

string(343) "'python' '/opt/lampp/htdocs/oneye/system_1152573eed/extras/unoconv/unoconv' --format=html --output='/opt/lampp/htdocs/oneye/system_1152573eed/users/rt4/root/tmp/64734_new.tmp' --home='/opt/lampp/htdocs/oneye/system_1152573eed/users/rt4/root/tmp' -vvvvvv > ../unoconv.log '/opt/lampp/htdocs/oneye/system_1152573eed/users/rt4/root/tmp/64734.doc'" NULL

For some reason the conversion failed. Please try again later.

You got an E-Mail

Offline

#21 2013-08-30 01:26:39

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Got it, thanks. Strange results hmm I'm really not sure why we get "NULL" from that shell_exec call. It should have been something... more/different... at least *something* xD

Please, create a new php file and add the following php code ( http://pastebin.com/m7FxY7Fy ) into it, save, upload and then call that php file within your browser. Finally show us (again) what's shown.

Some explanation: The script executes the simple shell command "echo" and it tries to start python. Le's hope we get some results out of that...


Best regards,
Lars Knickrehm

The oneye project.

Offline

#22 2013-08-30 03:06:59

s0600204
Member
From: UK
Registered: 2012-01-22
Posts: 118
Website

Re: OpenOffice / LibreOffice

Suggested small alteration to 3rd line of the pastebin (Careful of the " and '):

var_dump(shell_exec("'python' -c 'print \"abc\"'"));

Calling 'python' without any arguments will cause it to return without doing or outputting anything.

Oh, and if you're using var_dump(), remove the "> ../unoconv.log" from my earlier suggestion, but leave the "-vvvvvv" in place (for now).

Offline

#23 2013-08-30 15:56:52

rozondas
Member
Registered: 2013-07-30
Posts: 16

Re: OpenOffice / LibreOffice

Here the results.

Code from lars-sh: string(4) "abc " NULL 
Code from s0600204: string(4) "abc " string(4) "abc "

Last edited by rozondas (2013-08-30 15:57:26)

Offline

#24 2013-08-31 12:29:23

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

s0600204 wrote:

Oh, and if you're using var_dump(), remove the "> ../unoconv.log" from my earlier suggestion, but leave the "-vvvvvv" in place (for now).

Just made sure, that the pipe is working correctly.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#25 2013-08-31 12:36:13

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: OpenOffice / LibreOffice

Summary

  • "shell_exec" works with both, "echo" and "python".

  • When doing the conversion, its output is simply nothing.

  • With a shell user conversation works just fine.

My next idea
As stated previously, I guess that there's some kind of problem with the permissions. Please, remove those two lines from either mine or s06's file and add the following one:

var_dump(shell_exec("'python' '/opt/lampp/htdocs/oneye/system_1152573eed/extras/unoconv/unoconv' --help"));

Best regards,
Lars Knickrehm

The oneye project.

Offline

Board footer

Powered by FluxBB