shell script with shell_exec() [message #180113] |
Wed, 09 January 2013 00:32 |
Erick Engelke
Messages: 2 Registered: January 2013
Karma: 0
|
Junior Member |
|
|
I need to run some binaries from within php web pages.
Ironically, it's to convert Word/Excel to PDF, no joke, but open office
does it pretty easily. No need to buy someone's service.
My problem is, the cli version of PHP executes the scripts perfectly, but
the FreeBSD Apache module PHP 5.4.7 - which I believe doesn't have the
safe mode, well it does a SIG_ABORT on the open office binary.
I've been reading web pages all day but don't see how to get around this.
Erick
|
|
|
Re: shell script with shell_exec() [message #180114 is a reply to message #180113] |
Wed, 09 January 2013 01:22 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 1/8/2013 7:32 PM, Erick Engelke wrote:
>
> I need to run some binaries from within php web pages.
>
> Ironically, it's to convert Word/Excel to PDF, no joke, but open office
> does it pretty easily. No need to buy someone's service.
>
> My problem is, the cli version of PHP executes the scripts perfectly, but
> the FreeBSD Apache module PHP 5.4.7 - which I believe doesn't have the
> safe mode, well it does a SIG_ABORT on the open office binary.
>
> I've been reading web pages all day but don't see how to get around this.
>
> Erick
You really didn't give us much to go on. But my first check would be to
ensure the web server user has sufficient permission to execute Open
Office and it's libraries. Also ensure it can read the file you're
converting from and write access to the directory you're writing to.
Next thing I would check would be the log files for any messages.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: shell script with shell_exec() [message #180115 is a reply to message #180113] |
Wed, 09 January 2013 11:10 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On Jan 9, 12:32 am, Erick Engelke <er...@uwaterloo.ca> wrote:
> I need to run some binaries from within php web pages.
>
> Ironically, it's to convert Word/Excel to PDF, no joke, but open office
> does it pretty easily. No need to buy someone's service.
For Excel to PDF I use phpExcel. It'll read an Excel file and write it
as a PDF.
For Word you might be able to do something with phpwordlib.
|
|
|
Re: shell script with shell_exec() [message #180116 is a reply to message #180114] |
Wed, 09 January 2013 14:02 |
Erick Engelke
Messages: 2 Registered: January 2013
Karma: 0
|
Junior Member |
|
|
On Tue, 8 Jan 2013, Jerry Stuckle wrote:
> On 1/8/2013 7:32 PM, Erick Engelke wrote:
>>
>> I need to run some binaries from within php web pages.
>>
> You really didn't give us much to go on.
Thanks for your help. I figured it out, the www userid didn't have a
tempdir/homedir, so setting HOME to /tmp solved it.
Erick
|
|
|
Re: shell script with shell_exec() [message #180117 is a reply to message #180116] |
Wed, 09 January 2013 16:20 |
The Natural Philosoph
Messages: 993 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 09/01/13 14:02, Erick Engelke wrote:
>
>
> On Tue, 8 Jan 2013, Jerry Stuckle wrote:
>
>> On 1/8/2013 7:32 PM, Erick Engelke wrote:
>>>
>>> I need to run some binaries from within php web pages.
>>>
>> You really didn't give us much to go on.
>
> Thanks for your help. I figured it out, the www userid didn't have a
> tempdir/homedir, so setting HOME to /tmp solved it.
>
> Erick
makes sense. In such cases having run with /tmp systems in the past that
filled up, id be tempted to create something under /var/tmp
Unless the files are truly temporary and vanish as fast as they are
created..
--
Ineptocracy
(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
|
|
|