php exec suddenly stopped working

Discussion in 'Programming' started by buuxy, May 6, 2009.

  1. #1
    i use ffmpeg and image2mpeg from within php using exec

    A script i wrote suddenly stopped working , i havent updated anything on the server or recompiled the php.ini

    when i try a simple test with exec i get nothing

    The usual suspects like safe_mode, open_basedir, and so on seem to be correct both in php.ini itself and in phpinfo().

    when i do echo exec("whoami");
    i get "nobody"
     
    buuxy, May 6, 2009 IP
  2. diligenthost

    diligenthost Peon

    Messages:
    685
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This proves that exec() is working, I'm quite sure. The web server is most likely running using an Apache handler and not suPHP. When Apache runs that way it runs as the 'userid' username of "nobody", if it ran via suPHP then it would use your accounts username instead. The fact that it said "nobody" means thats what Apache/web server is running as when it ran the command whoami.

    What makes you believe it isn't working, what would that script say beforehand?
     
    diligenthost, May 6, 2009 IP
  3. buuxy

    buuxy Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    the script converts videos it didnt give an output before but it would convert the video

    the same line works fine from command line.

    the "cat" command to join files also doesnt work anymore, and a few other programs i use like imagemagick etc

    all work fine from command line , dont work from php

    this just suddenly happened , they were all working fine before. rebooted the server , no help..

    i just mentioned the whoami command to show exec was working , must be some privilege problem or something
     
    buuxy, May 6, 2009 IP
  4. buuxy

    buuxy Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yah i checked on my working server and it says nobody and is working so i guess thats not it

    can you think of anything that would make it stop working all of a sudden ?
     
    buuxy, May 7, 2009 IP