The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP script not executing after updating WHM

Discussion in 'General Discussion' started by Senor, Sep 18, 2008.

  1. Senor

    Senor Member

    Joined:
    Jun 12, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Greetings!

    I recently did a WHM/cPanel update and found that calling an external PHP script no longer works.

    For example:

    I have a page that submits data to a PHP script. At the end of that script, I call a 2nd PHP script with the exec command:

    PHP:
    exec('php -q /path/to/my/script.php');

    Unfortunately, that no longer works. If I log in as root and run the same command, it works just fine. I suspect it's because PHP/Apache runs as a different user (nobody?) and is unable to execute the script. I am unsure why this changed with this update and not any of the others.

    I'm wondering if it can be fixed by simply changing the permissions on the file, but before I do that, I figured I'd ask here first so I don't screw something up.

    Thanks,
    Jay
     
  2. rkm11

    rkm11 Active Member

    Joined:
    May 30, 2007
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Where are both of these files located?

    Did you recompile apache (maybe with suPHP support)? What version of PHP are you running? Did you change to a new release type (stable, release, current, edge.. etc)?
     
  3. Senor

    Senor Member

    Joined:
    Jun 12, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    The files are located in the same directory.

    I did recompile apache to include curl support, version 5.2.6
    Code:
    jay@web [~]# php -v
    PHP 5.2.6 (cli) (built: Sep 11 2008 13:22:27) 
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    I stayed with the same release type (stable).

    Thank you for your response.
     
  4. Senor

    Senor Member

    Joined:
    Jun 12, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Anyone else have any thoughts?
     
Loading...

Share This Page