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.

PHP5 INI File Questions

Discussion in 'General Discussion' started by vlee, Apr 14, 2011.

  1. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    272
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Las Vegas, Nevada, United Stat
    cPanel Access Level:
    Root Administrator
    What are popen and proc_open used for?

    Do popen and proc_open need to be disbled in PHP5?
     
  2. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
  3. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    272
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Las Vegas, Nevada, United Stat
    cPanel Access Level:
    Root Administrator
    I heard that PHP4 needed to be disabled due to security but I am not sure with PHP5.
     
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I'm not aware of any such bug or flaw in proc_open/popen in PHP4 that would warrant it being disabled in that version but not in PHP5.

    Ultimately you have to weigh needs vs security in deciding whether to disable these functions (and others like exec(), system(), etc.).
     
  5. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    272
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Las Vegas, Nevada, United Stat
    cPanel Access Level:
    Root Administrator
    Very cool.

    I have disabled only these show_source, system, passthru in PHP5

    Current Configuration

    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler cgi
    Apache suEXEC on
     
  6. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    in order to be able to disable function
    Code:
    pico /usr/local/lib/php.ini
    search to disable_functions and add your functions then restart your apache
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I wanted to note that it is better to use vi over pico or nano for editing files. vi will let you know if another user on the system has the same file opened. Also, pico or nano can corrupt long lines, which will not happen with vi

    Finally, please ensure to copy any file before editing it to ensure you have a backup of the original file:

    Code:
    cp /usr/local/lib/php.ini /usr/local/lib/php.ini.bak110414
     
Loading...

Share This Page