Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    348
    Likes Received:
    23
    Trophy Points:
    168
    Location:
    Spokane, Washington
    cPanel Access Level:
    Root Administrator
    What are popen and proc_open used for?

    Do popen and proc_open need to be disbled in PHP5?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    166
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    348
    Likes Received:
    23
    Trophy Points:
    168
    Location:
    Spokane, Washington
    cPanel Access Level:
    Root Administrator
    I heard that PHP4 needed to be disabled due to security but I am not sure with PHP5.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    166
    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.).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    348
    Likes Received:
    23
    Trophy Points:
    168
    Location:
    Spokane, Washington
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    56
    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,608
    Likes Received:
    32
    Trophy Points:
    238
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice