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.

two php extensions directories - bug?

Discussion in 'General Discussion' started by lastguru, Mar 27, 2011.

  1. lastguru

    lastguru Member

    Joined:
    Jul 29, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I have recently discovered that there are two php extensions directories - one that is actually used (/usr/local/lib/php/extensions/no-debug-non-zts-20090626) and the one that has all the custom extensions actually installed (/usr/lib/php/extensions/no-debug-non-zts-20090626). After spending some time trying to install memcache extension, i found that it is installed in a wrong directory, so I linked the later to the former. No idea if it will not break anything else, but at least it is working for now...

    It seems that many people on this forum know about this issue, but I still have not found any cPanel official reply to that. In my opinion, it is a bug, as it doesn't allow to install any php extensions normal way (i.e., through cPanel interface) and leads to unintelligible problems with php extensions. If both directories are needed to be separate, then please, cPanel, provide a fix for extension installer to use the correct one!
     
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Do you have two PHP versions on the server. What is the output of these commands run on SSH.

    Code:
    php -i |grep extension_dir
    rpm -qa |grep -i php
    php -v
    whereis php
     
  3. lastguru

    lastguru Member

    Joined:
    Jul 29, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Upon executing this command, i see the following:

    Code:
    # php -i |grep extension_dir
    extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20090626 => /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    sqlite3.extension_dir => no value => no value
    
    And no, I don't have and don't need two PHP versions. I just have 5.3.6.
     
  4. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    /usr/local/lib/php/extensions/no-debug-non-zts-20090626 is then the default extensions directory for your php install. Other might be a rogue directory. You could rename/move it and see if everything works. You could run the other rpm command to see if someone installed some php rpms that could have messed up the install.

     
  5. 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
    If you do not find PHP rpm versions and believe this to be a bug, please report it and provide login access to the machine in the bug report. We have a link at the top of the forum for reporting bugs, since that is the official channel to report believed bugs to our staff and developers. The direct url is also http://go.cpanel.net/bugs
     
  6. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    I have it that way on all my servers, just recently received a server with a fresh cPanel install, and both directories are there. Not sure the reason for it though.

    I installed both pecl imagick and apc and it uses the usr/lib/php/extensions directory and if you don't symlink it or copy the .so files to the /usr/local/lib/php/extensions/... directory, you'll receive php errors.
     
  7. britsenigma

    britsenigma Well-Known Member

    Joined:
    Dec 14, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Got this problem as well currently.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,698
    Likes Received:
    657
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  9. britsenigma

    britsenigma Well-Known Member

    Joined:
    Dec 14, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Well, I've got no problems currently, fixed it myself, I did have, for some reason, php wasn't finding the modules in either of those directories, which is why I posted earlier.

    However, it's working now, and I cleared the directories before using Easy Apache again. But as you can see, it installs those files to two locations, but the later looks like they were all copied after the install, as the modified times are identical. Also noticed easy apache leaves 5.2 files in place if you swap to 5.3 php.

    As for submitting bugs, I Don't have time to wait for an answer, I google to find solutions to my problems. Why have a bug tracking system no one can see, not saying you can't have an internal one. But, at least with a forum, other people who run into the same problem, are likely to end up on this page. Which reduces your ticket burden, just my 2 cents. Clipboard02.jpg
     
Loading...

Share This Page