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 configuration Editor issue

Discussion in 'Security' started by minosjl, Dec 24, 2011.

  1. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello all,

    When i tried to edit the php configuration from WHM Main****>>****Service Configuration****>>****PHP Configuration Editor, i am getting the following error while trying to save.

    ------
    Error setting directives!
    ------

    Also cPanel log shows the following error

    ---------
    info [whostmgr] Skipping unknown PHP ini directive directive
    info [whostmgr] Skipping unknown PHP ini directive foo
    ---------

    Can any one help on this ?

    Thank you.
     
  2. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    hi,

    The issue was because of the invalid php directive memory_limit . The limit is set to -1 for unlimited memory usage. Is it really possible ? .The server is already having suhosin installed but i think its not because of suhosin because i tried the same setting by un installing the suhosin.

    It will be great some one update the root cause of the issue...

    Thank you.
     
  3. 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
    The -1 memory_limit value is valid per PHP's own site:

    Found at PHP: Description of core php.ini directives - Manual

    So, yes, -1 is allowed. Normally, you can determine the correct available settings for php.ini values at PHP's site.

    Now, is the issue that WHM's PHP Configuration Editor isn't allowing -1 to be set for that value even though the value is valid? What cPanel version are you using on your machine?

    Code:
    cat /usr/local/cpanel/version
     
  4. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    hi,

    Latest cPanel version, i have read the php Manual page and i can see that the php must me compiled with the option --enable-memory-limit . Is that done in case of cPanel servers.

    Thank you.
     
  5. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Sorry for the last update, i think its not needed its for prior to 5.2.x php versions , any way the cPanel version is latest.
     
  6. 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 do not understand your question on the last post. Please rephrase it.
     
  7. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    forget the last post, the cPanel version is the latest one.

    Thank you
     
  8. 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
    When stating something is the latest version, typically the version would need to be noted. Right now, 3 tiers are running cPanel 11.30.5.3 (CURRENT, RELEASE, STABLE) and one tier is running cPanel 11.31.5.3 (EDGE). What is your latest version?

    Next, if the question involves the PHP version, that compile time option for --enable-memory-limit is no longer need for PHP 5.2.1+ versions. We do not provide any version lower than 5.2.9, so the compile time flag is not required. Please re-read the link I provided:

    If you were running a version of PHP below 5.2.1, then that compile time flag would be required. You cannot be running a version lower than 5.2.9 using our EasyApache script.

    So, again, is the issue that WHM's PHP Configuration Editor isn't allowing -1 to be set for that value even though the value is valid? Basically, can you set it to -1 manually in /usr/local/lib/php.ini file and have it work in a phpinfo page as a value?
     
  9. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    11.30.5.3 RELEASE is the version. The problem is only for the WHM's PHP Configuration Editor means i am not able to put the -1 value through WHM's PHP Configuration Editor but i can manually edit the memory_limit in /usr/local/lib/php.ini file and the changes is also reflects in phpinfo page.

    Thank you.
     
Loading...

Share This Page