Libreoffice Problem

472 views
Skip to first unread message

Ajay Mandera

unread,
Apr 23, 2013, 6:31:33 AM4/23/13
to vg...@googlegroups.com
Hi Experts,

I have installed Libreoffice to convert doc file in to pdf file. It is installed on server Ubuntu 12.04. Its working perfectly fine in terminal but when the same command is executed using PHP's exec(), it is not working.

Ouput of command is "NULL" and the return code of process is "77".

After searching  more about this on Internet I found that  PHP script is not getting permission to run libreoffice command. So in reply to this I execute this two commands,

chown www-data:www:data /usr/bin/libreoffice
chown -R www-data:www:data /usr/share/libreoffice

After doing this the same problem is there.
Any idea why this occur?



Regards,
Ajay Mandera

Sham Arsiwala

unread,
Apr 23, 2013, 11:16:28 AM4/23/13
to vg...@googlegroups.com
Hi,

Try to give suid to /usr/bin/libreoffice
And then try

Chmod u+s /usr/bin/libreoffice


Sham Arsiwala
Electromech Corp

On 23-Apr-2013, at 4:01 PM, Ajay Mandera <am6...@gmail.com> wrote:

Hi Experts,

I have installed Libreoffice to convert doc file in to pdf file. It is installed on server Ubuntu 12.04. Its working perfectly fine in terminal but when the same command is executed using PHP's exec(), it is not working.

Ouput of command is "NULL" and the return code of process is "77".

After searching  more about this on Internet I found that  PHP script is not getting permission to run libreoffice command. So in reply to this I execute this two commands,

chown www-data:www:data 
chown -R www-data:www:data /usr/share/libreoffice

After doing this the same problem is there.
Any idea why this occur?



Regards,
Ajay Mandera

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG
 
---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tejas Barot

unread,
Apr 23, 2013, 11:37:33 AM4/23/13
to VGLUG
Hello,

As you're trying to do this from Webserver probably apache, then there must be logs regarding the same.

Try to check error at /var/log/apache/error.log and provide the logs at time when you receive error.

Waiting for your reply.
--
Thanks & Regards,
Tejas Barot
Linux Administrator,
Red Hat Certified Engineer,
Linux Blog:- http://www.tejasbarot.com
Linux Forums :- http://linuxforums.tejasbarot.com
Open Source :- http://opensource.tejasbarot.com
Facebook :- http://www.fb.me/tejasbarot.official
Facebook Page :- http://www.fb.me/AllLinuxUsersBlog
Twitter :- https://twitter.com/imtejasbarot
LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Sent on my BlackBerry® from Vodafone

From: Ajay Mandera <am6...@gmail.com>
Date: Tue, 23 Apr 2013 16:01:33 +0530
Subject: [VGLUG] Libreoffice Problem

Ajay Mandera

unread,
Apr 24, 2013, 1:44:23 AM4/24/13
to vg...@googlegroups.com
Thanks for reply sir,

I tried this and got same error.


Regards,
Ajay

Regards,
Ajay Mandera

Ajay Mandera

unread,
Apr 24, 2013, 1:48:40 AM4/24/13
to vg...@googlegroups.com
Thanks,

I checked both the log files, apache and php error log, but there is no error message regarding Libreoffice.

Tejas Barot

unread,
Apr 24, 2013, 2:00:07 AM4/24/13
to VGLUG
Hello,

Not regarding LibreOffice, But is Apache give you some error whenever you access that page ?


--
Thanks & Regards,
Tejas Barot
Linux Administrator,
Red Hat Certified Engineer,
Linux Blog:- http://www.tejasbarot.com
Linux Forums :- http://linuxforums.tejasbarot.com
Open Source :- http://opensource.tejasbarot.com
Facebook :- http://www.fb.me/tejasbarot.official
Facebook Page :- http://www.fb.me/AllLinuxUsersBlog
Twitter :- https://twitter.com/imtejasbarot
LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Sent on my BlackBerry® from Vodafone

From: Ajay Mandera <am6...@gmail.com>
Date: Wed, 24 Apr 2013 11:18:40 +0530
Subject: Re: [VGLUG] Libreoffice Problem

Ajay Mandera

unread,
Apr 24, 2013, 2:27:27 AM4/24/13
to vg...@googlegroups.com
Hi,

When I run my script there was no new entry in apache error log but in PHP error log some entries was coming but not related my error. Here I display that PHP error log,

[24-Apr-2013 11:46:47 UTC] PHP Strict Standards:  Declaration of FPDF::_putstream() should be compatible with that of TCPDF::_putstream() in /var/www/dcrdx/lib/fpdi/fpdi2tcpdf_bridge.php on line 167
[24-Apr-2013 11:46:47 UTC] PHP Strict Standards:  Declaration of FPDF_TPL::SetFont() should be compatible with that of TCPDF::SetFont() in /var/www/dcrdx/lib/fpdi/fpdf_tpl.php on line 456
[24-Apr-2013 11:46:47 UTC] PHP Notice:  Undefined index: path in /var/www/dcrdx/classes/class.Document.php on line 89
[24-Apr-2013 11:46:47 UTC] PHP Notice:  Undefined variable: aChecked in /var/www/dcrdx/classes/class.Document.php on line 2164
[24-Apr-2013 11:46:48 UTC] PHP Notice:  Undefined index: path in /var/www/dcrdx/classes/class.Document.php on line 89
[24-Apr-2013 11:47:24 UTC] PHP Strict Standards:  Declaration of FPDF::_putstream() should be compatible with that of TCPDF::_putstream() in /var/www/dcrdx/lib/fpdi/fpdi2tcpdf_bridge.php on line 167
[24-Apr-2013 11:47:24 UTC] PHP Strict Standards:  Declaration of FPDF_TPL::SetFont() should be compatible with that of TCPDF::SetFont() in /var/www/dcrdx/lib/fpdi/fpdf_tpl.php on line 456
[24-Apr-2013 11:47:24 UTC] PHP Notice:  Undefined index: path in /var/www/dcrdx/classes/class.Document.php on line 89
[24-Apr-2013 11:47:24 UTC] PHP Notice:  Undefined variable: aChecked in /var/www/dcrdx/classes/class.Document.php on line 2164
[24-Apr-2013 11:47:24 UTC] PHP Notice:  Undefined index: path in /var/www/dcrdx/classes/class.Document.php on line 89
[24-Apr-2013 11:48:07 UTC] PHP Strict Standards:  Declaration of FPDF::_putstream() should be compatible with that of TCPDF::_putstream() in /var/www/dcrdx/lib/fpdi/fpdi2tcpdf_bridge.php on line 167
[24-Apr-2013 11:48:07 UTC] PHP Strict Standards:  Declaration of FPDF_TPL::SetFont() should be compatible with that of TCPDF::SetFont() in /var/www/dcrdx/lib/fpdi/fpdf_tpl.php on line 456
[24-Apr-2013 11:48:07 UTC] PHP Notice:  Undefined index: path in /var/www/dcrdx/classes/class.Document.php on line 89
[24-Apr-2013 11:48:07 UTC] PHP Notice:  Undefined variable: aChecked in /var/www/dcrdx/classes/class.Document.php on line 2164
[24-Apr-2013 11:48:08 UTC] PHP Notice:  Undefined index: path in /var/www/dcrdx/classes/class.Document.php on line 89


This might help you to get clue about problem.

Regards,
Ajay Mandera
Reply all
Reply to author
Forward
0 new messages