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.

PHPSuexec Problem

Discussion in 'General Discussion' started by MN-Robert, Jul 27, 2003.

  1. MN-Robert

    MN-Robert Well-Known Member

    Joined:
    Feb 19, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    One of our users is having problem calling an include. He has a php script and uses Virtual To include cgi scripts. However since we installed phpsuexec this is no longer working what command/work around would work in this situation?

    cPanel.net Support Ticket Number:
     
  2. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    From what I have seen it is almost easier to make sure all your scripts are either PHP or CGI.. but of course this is not perfect world...

    My best suggestion is to be sure you are using an absolute path with it.

    So, he is calling the PHP script from the CGI or is it the other way around?

    cPanel.net Support Ticket Number:
     
  3. MN-Robert

    MN-Robert Well-Known Member

    Joined:
    Feb 19, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    He is calling a cgi script from a php script

    He has tried:

    virtual (which gives a error)
    exec("/home/XXX/public_html/cgi-bin/news/viewnews.cgi"); (which just prints the text)


    cPanel.net Support Ticket Number:
     
  4. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Here is small script that will get the output from some url/script....

    PHP:
    <? 

    $file "http://www.someurl.ext/file.cgi"
    $open fopen($file"r"); 
    $search fread($open20000); 
    fclose($open); 

    ?>

    I have used similar scripts for different things, but would work in place of what you were trying.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page