Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    18

    Default PHP script not executing after updating WHM

    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 Code:
    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. #2
    Member rkm11's Avatar
    Join Date
    May 2007
    Posts
    31

    Default

    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. #3
    Member
    Join Date
    Jun 2007
    Posts
    18

    Default

    Quote Originally Posted by rkm11 View Post
    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)?
    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. #4
    Member
    Join Date
    Jun 2007
    Posts
    18

    Default

    Anyone else have any thoughts?

Similar Threads & Tags
Similar threads

  1. Replies: 4
    Last Post: 10-09-2010, 10:26 AM
  2. Replies: 0
    Last Post: 09-24-2010, 02:33 AM
  3. Executing a script after main cpbackup has finished.
    By Jinovich in forum Data Protection
    Replies: 1
    Last Post: 01-22-2010, 05:40 PM
  4. Executing a Perl script
    By oinkmedia in forum Themes and Branding
    Replies: 0
    Last Post: 07-20-2003, 05:07 PM
  5. Executing a Perl script
    By oinkmedia in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-20-2003, 05:06 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube