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.

cpanel overwriting php.ini

Discussion in 'General Discussion' started by tifosi, Jun 25, 2007.

  1. tifosi

    tifosi Registered

    Joined:
    Jun 25, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    This has been happening since the upgrade to cpanel 11.x.

    Cpanel is continually overwriting php.ini nightly and altering the extension_dir configuration value to one which is wrong... using /usr/lib... instead of /usr/local/lib...

    Really I don't want CPANEL touching php.ini at all!

    php 5.2.3 was configured initially using cpanel and then I recomplied it with a custom configuration and included values for eaccelerator.

    I've tried numerous things... chmodding cpanels checkphpini & phpsanitycheck scripts, but they get updated prior to use.

    I just can't figure out where it's getting this extension_dir from since everything else uses /usr/local including php-prefix.

    any advice on where to find this...

    S
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    /scripts/updatephpconf

    What is the result of this:
    Code:
    php-config --extension-dir
    
     
  3. tifosi

    tifosi Registered

    Joined:
    Jun 25, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply

    the output is as expected: and --prefix is /usr/local

    /usr/local/lib/php/extensions/no-debug-non-zts-20060613

    But cpanel reset it to

    /usr/lib/php/extensions/no-debug-non-zts-20060613

    which then of course lost the path to the eaccelerator

    I've created a symbolic link as a workaround.
     
    #3 tifosi, Jun 25, 2007
    Last edited: Jun 25, 2007
  4. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    /usr/local is prefered over /usr now in 14684+


    It shouldn't change the ext dir unless it set to a dir that doesn't exist.



    sub get_extension_dir {
    my $path = get_directive('extension_dir');
    if ( !$path || $path eq './' || $path eq '/' || $path eq '.' ) {
    # this seems to break improperly installed ioncube
    set_extension_dir();
    $path = get_default_extension_dir();
    }
    return ($path ne './') ? $path : get_default_extension_dir();
    }
     
  5. tifosi

    tifosi Registered

    Joined:
    Jun 25, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    That was the problem I think.

    I set the extension_dir to "" which it has accepted in he past.

    I've now reset it to the compiled exension_dir of /usr/local.... & modified a few other paths and all is ok.

    Wonder if is used the /usr because there's a very old php4 manual install directory at that level even though the active php5 is in /usr/local

    Hopefully useful to others who may come across this.
     
    #5 tifosi, Jun 27, 2007
    Last edited: Jun 27, 2007
  6. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    Odd, ours did a change with last nights update also. It didn't change the directories, just the number of the extension directory it was looking for.
     
Loading...

Share This Page