2

I have a bit of a unique situation. I'm trying to run a video encoding program from a PHP script called Diascope, which relies on the 'convert' command provided by ImageMagick. I have a bash script that executes a really simple conversion and then it runs the application called Diascope. This is the conversion code, and the following does work, it creates the new file

convert image.jpg image.png

Shows no errors, but then I run Diascope like this

diascope -clean audio.txt

And I can see that Diascope loads property because it prints "Diascope 0.2.1":

diascope 0.2.1 (ms 2006-2010) slideshow generator See http://diascope.sf.net for documentation and updates.

Error: executable program not found: convert Please see the requirements for diascope in the release notes.

When I run shell_exec("whoami"); it prints "nobody"

So why can I run convert by itself, but the "diascope" process can't seem to utilize it? I have tried going into /usr/local/bin/convert and chmoding it to 777, but it didn't seem to have any effect, what else could I try here?

UPDATE: I should probably add that when I try to run diascope -clean audio.txt as root on the terminal, it creates the audio.flv file like it should, also I can't seem to sudo su nobody it returns This account is currently not available.

5
  • 1
    Thank you for not signing posts. Commented Jan 3, 2012 at 1:41
  • 1
    Oh jesus christ you've done it on almost 200 Commented Jan 3, 2012 at 1:42
  • 1
    Sorry? Do you mean the "Thanks for reading" note? I can stop doing that, lol Commented Jan 3, 2012 at 1:43
  • No, I meant, "lol I edited out your redundant 'thanks' message, and here's my ironic comment asking you in a backwards lollish way not to do it again" [edit: well, yea, basically ;)] Commented Jan 3, 2012 at 1:45
  • what distribution do you use? Check your syslog/logs and see if something shows up when you run the process Commented Jan 3, 2012 at 2:30

1 Answer 1

4

PHP runs as the same user as apache, which is typically www-data or nobody. I believe you can use suPHP+apache to change the user that PHP runs under.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.