Re: Attempting to use 'passthru' or 'exec' function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 24 January 2005 05:08, Andre Dubuc wrote:

> I'm trying to output a text file from a pdf file using an external
> function, pdftotext, using either PHP's 'passthru' or 'exec' functions.
>
> The following code sort of works (at least I see localhost busy doing
> something for about three seconds, but  the expected output of
> 'content.txt' is empty. I used an idea found on the mailing list: I
> actually got some activity with 'sudo desired_function arg1 arg2'.
>
> File permissions are set wide open (apache:apache 777), safe_mode=off.
>
> What am I doing wrong? (Btw, the pdftotext function works fine on
> commandline).

1) What does your php error log say?
2) Is there any reason you're using sudo? Do you know how it works and have 
you configured sudo correctly?
3) Commands like passthru() and exec() allow you to check the return value of 
the system command being executed -- use it.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux