Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    3

    Unhappy cpanel overwriting php.ini

    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. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,768
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    /scripts/updatephpconf

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

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    3

    Default

    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.
    Last edited by tifosi; 06-25-2007 at 04:25 PM.

  4. #4
    cPanel Staff cpanelnick's Avatar
    Join Date
    Feb 2003
    Location
    Houston, TX
    Posts
    4,514

    Default

    /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. #5
    Registered User
    Join Date
    Jun 2007
    Posts
    3

    Default

    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.
    Last edited by tifosi; 06-27-2007 at 05:49 AM.

  6. #6
    Member
    Join Date
    Apr 2003
    Location
    Lewisville, Tx
    Posts
    968

    Default

    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.
    Kris
    NCServ, LLC.
    WebHosting - Dedicated Servers - Colocation
    sales@ncerv.com

Similar Threads & Tags
Similar threads

  1. Custom php.conf how to preserve cpanel from overwriting it?
    By palav0s in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 07-19-2011, 02:49 PM
  2. php.ini and override default php.ini
    By areh in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 08-24-2009, 06:45 PM
  3. Updating cpanel PHP changed main server php.ini
    By 4u123 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-06-2009, 03:46 PM
  4. Cant Overwriting Php.ini
    By reactorh in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-30-2008, 01:06 PM
  5. cP Release update overwriting cP php.ini w/reg_globals ON
    By MaraBlue in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 05-30-2008, 12:04 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube