Skip to main content

WHM: Can't install/update PHP PECL anymore

Comments

20 comments

  • cPRex Jurassic Moderator

    Hey there!  Have you tried running that

    pecl channel-update pecl.php.net

    command on the system yet to see if that update helps?  Are there any other details in the log at /usr/local/cpanel/logs/error_log that could be relevant?

    0
  • webmastergreg

    I just tried this command, but I don't have sufficient rights to do it in the cPanel terminal.

    But the response of the command is:

    Fatal error: Array and string offset access syntax with braces is no longer supported in /usr/local/lib/php/PEAR/Config.php on line 2095

    Anyway, the problem is the first one mentioned in my first post.

    Since it was working perfectly before, a cPanel update changed this, it should do the temporary PHP unloading by itself, because even that we are root on WHM we do not have the terminal in WHM but only in cPanel accounts, and so not enough rights to look at the root php.ini.

    0
  • cPRex Jurassic Moderator

    You would need to be using the root terminal in WHM, or a direct connection over SSH to run that.  I wouldn't expect that to work as a cPanel user using Terminal. 

    0
  • webmastergreg

    ok

    I'm admin on WHM but our hosting provider do not allow the root terminal access on it.

    But as I said I was able to install nor update PECL Module before...

    Thanks for reply cPRex

    Regards

    0
  • cPRex Jurassic Moderator

    Are you actually logging in as root or are you accessing WHM with another username?

    0
  • webmastergreg

    yes root

    0
  • cPRex Jurassic Moderator

    You'll have to speak with your hosting provider about this one - if they have limited what root can do on the system, we won't be able to help on our side.

    0
  • webmastergreg

    ok thanks anyway :)

    0
  • Joselo Suarez
    Good afternoon, I'm having the same problem. But I can log into TERMINAL as root. I run:
    pecl channel-update pecl.php.net
    
    and it gives me the following message:
    bash: pecl: command not found
    
    
    0
  • cPRex Jurassic Moderator

    You likely need to call the full path to pecl using this, which is an example specific to PHP 8.3:

    /opt/cpanel/ea-php83/root/usr/bin/pecl channel-update pecl.php.net

    You should then receive output similar to the following:

    Updating channel "pecl.php.net"
    Update of Channel "pecl.php.net" succeeded
    0
  • Joselo Suarez
    I no longer receive the channel change message. I ran the SQL Server manager installation,
    and at the end, I get this error:

    In file included from /root/tmp/pear/sqlsrv/shared/typedefs_for_linux.h:23,
                     from /root/tmp/pear/sqlsrv/shared/xplat_winnls.h:24,
                     from /root/tmp/pear/sqlsrv/shared/FormattedPrint.h:24,
                     from /root/tmp/pear/sqlsrv/shared/core_sqlsrv.h:41,
                     from /root/tmp/pear/sqlsrv/php_sqlsrv_int.h:25,
                     from /root/tmp/pear/sqlsrv/conn.cpp:24:
    /root/tmp/pear/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory
     #include 
              ^~~~~~~
    compilation terminated.
    make: *** [Makefile:209: conn.lo] Error 1
    ERROR: `make' failed  
    0
  • Joselo Suarez
    Please help. I'm trying to install the sqlsrv driver from:
    WHM -> Module Installers -> PHP PECL -> Manage and click update or install a new one.
    
    It gives me the following error message at the end of the process:
    
    In file included from /root/tmp/pear/sqlsrv/shared/typedefs_for_linux.h:23,
                     from /root/tmp/pear/sqlsrv/shared/xplat_winnls.h:24,
                     from /root/tmp/pear/sqlsrv/shared/FormattedPrint.h:24,
                     from /root/tmp/pear/sqlsrv/shared/core_sqlsrv.h:41,
                     from /root/tmp/pear/sqlsrv/php_sqlsrv_int.h:25,
                     from /root/tmp/pear/sqlsrv/conn.cpp:24:
    /root/tmp/pear/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory
     #include 
              ^~~~~~~
    compilation terminated.
    make: *** [Makefile:209: conn.lo] Error 1
    ERROR: `make' failed
    0
  • cPRex Jurassic Moderator

    Joselo Suarez - you'll need to run this first before sqlsrv can be installed:

    yum install unixODBC unixODBC-devel

    Can you try that and let me know if you still have issues?

    0
  • Joselo Suarez
    execute the indicated and an error is displayed:

    execute the indicated and an error is displayed:
    0
  • cPRex Jurassic Moderator

    What happens if you try just a general "yum update" on that system?

    0
  • Joselo Suarez
    Please indicate which command to execute to do so.
    0
  • Joselo Suarez
    I typed yum update and it gives me the same msg
    0
  • cPRex Jurassic Moderator

    You'll want to try this to fix yum:

    yum clean all
    yum makecache
    yum update

    See if things work after that - if not, we may need to try a repair.

    0
  • Joselo Suarez
    Run the 3 commands. Unfortunately, it gives the same message. We could try the repair.
    0
  • cPRex Jurassic Moderator

    After re-reading the errors you posted, I don't think a repair will help with this issue.

    It looks like you have a Microsoft repository that it is trying to use for the download, which doesn't exist.  Normally the unixODBC-devel package is provided directly by the operating system, so you shouldn't need that extra repo.

    I would try disabling that Microsoft repository and performing the installation command again.

    0

Please sign in to leave a comment.