You are not logged in.

#1 2022-01-26 04:01:53

Pena
Member
Registered: 2019-10-04
Posts: 78

[solved]How to update php module's

So a few days ago i updated my system due to npm breaking and as usual php broke following that, apparently mysql driver isn't compatible with my php version anymore, i tried doing paru -S php81-mysql  but instead of updating the actual folders where php is it just does this weird thing where it creates a new php directory named php81.... The wiki doesn't seem to help much just telling me what i pretty much knew what to do. what's the blunder? i even tried replacing the /usr/lib/php modules with the ones on php81 but it still complains like i didnt do anything...

when i run anything php related:

PHP Warning:  PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20200930
PHP    compiled with module API=20210902
These options need to match
 in Unknown on line 0

heres the "header" of php --info

PHP Warning:  PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20200930
PHP    compiled with module API=20210902
These options need to match
 in Unknown on line 0
phpinfo()
PHP Version => 8.1.2

System => Linux micron 5.15.16-1-lts #1 SMP Thu, 20 Jan 2022 13:15:13 +0000 x86_64
Build Date => Jan 19 2022 17:12:32
Build System => Linux pierre 5.16.1-arch1-1 #1 SMP PREEMPT Sun, 16 Jan 2022 11:39:23 +0000 x86_64 GNU/Linux
Configure Command =>  './configure'  '--srcdir=../php-8.1.2' '--config-cache' '--prefix=/usr' '--sbindir=/usr/bin' '--sysconfdir=/etc/php' '--localstatedir=/var' '--with-layout=GNU' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--disable-rpath' '--mandir=/usr/share/man' '--disable-gcc-global-regs' '--enable-cgi' '--enable-fpm' '--with-fpm-systemd' '--with-fpm-acl' '--with-fpm-user=http' '--with-fpm-group=http' '--enable-embed=shared' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-dba=shared' '--enable-exif=shared' '--enable-ftp=shared' '--enable-gd=shared' '--enable-intl=shared' '--enable-mbstring' '--enable-pcntl' '--enable-shmop=shared' '--enable-soap=shared' '--enable-sockets=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-bz2=shared' '--with-curl=shared' '--with-db4=/usr' '--with-enchant=shared' '--with-external-gd' '--with-external-pcre' '--with-ffi=shared' '--with-gdbm' '--with-gettext=shared' '--with-gmp=shared' '--with-iconv=shared' '--with-imap-ssl' '--with-imap=shared' '--with-kerberos' '--with-ldap=shared' '--with-ldap-sasl' '--with-mhash' '--with-mysql-sock=/run/mysqld/mysqld.sock' '--with-mysqli=shared,mysqlnd' '--with-openssl' '--with-password-argon2' '--with-pdo-dblib=shared,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=shared' '--with-pspell=shared' '--with-readline' '--with-snmp=shared' '--with-sodium=shared' '--with-sqlite3=shared' '--with-tidy=shared' '--with-unixODBC=shared' '--with-xsl=shared' '--with-zip=shared' '--with-zlib' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php
Loaded Configuration File => /etc/php/php.ini
Scan this dir for additional .ini files => /etc/php/conf.d
Additional .ini files parsed => /etc/php/conf.d/pecl-database-mysql-git.ini,
/etc/php/conf.d/xdebug.ini

PHP API => 20210902
PHP Extension => 20210902
Zend Extension => 420210902
Zend Extension Build => API420210902,NTS
PHP Extension Build => API20210902,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.1.2, Copyright (c) Zend Technologies


 _______________________________________________________________________

Last edited by Pena (2022-01-27 00:22:27)

Offline

#2 2022-01-26 04:30:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,543
Website

Re: [solved]How to update php module's

What actual extension are you trying to load (what is specified in your php.ini)?  The mysql extension was removed quite a while ago, and if you've just been shuffling around .so files in the extension directory, that would explain this problem and likely all the others you vaguely referred to.  Your php.ini should load mysqli and / or pdo_mysql, but not mysql.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-01-26 09:55:57

Pena
Member
Registered: 2019-10-04
Posts: 78

Re: [solved]How to update php module's

Trilby wrote:

What actual extension are you trying to load (what is specified in your php.ini)?  The mysql extension was removed quite a while ago, and if you've just been shuffling around .so files in the extension directory, that would explain this problem and likely all the others you vaguely referred to.  Your php.ini should load mysqli and / or pdo_mysql, but not mysql.

in my php.ini i was only using zip curl xdebug mysqli pdo_mysql, although i disable the former two to see if it starts working but it didn't

Offline

#4 2022-01-26 13:34:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,543
Website

Re: [solved]How to update php module's

No, don't disable them - those are the ones that should be enabled.

What does `pacman -Qkk php` report?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-01-26 14:01:24

Pena
Member
Registered: 2019-10-04
Posts: 78

Re: [solved]How to update php module's

Trilby wrote:

No, don't disable them - those are the ones that should be enabled.

What does `pacman -Qkk php` report?

ficheiro de cópia de segurança: php: /etc/php/php.ini (Hora da modificação não corresponde)
ficheiro de cópia de segurança: php: /etc/php/php.ini (Tamanho não corresponde)
ficheiro de cópia de segurança: php: /etc/php/php.ini (MD5 checksum mismatch)
ficheiro de cópia de segurança: php: /etc/php/php.ini (SHA256 checksum mismatch)
php: 401 ficheiros no total, 0 ficheiro alterados

(modification hour doesn't match)
(size is Incorrect)
(401 files in total)
(0 files altered)

Offline

#6 2022-01-26 15:46:53

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: [solved]How to update php module's

It is odd that you are talking about packages named php81 and php81-mysql as such packages do not exist in our repos. There are some in the AUR for some reason though. Are you using these or both (which could be problematic)

Offline

#7 2022-01-26 16:01:26

Pena
Member
Registered: 2019-10-04
Posts: 78

Re: [solved]How to update php module's

Pierre wrote:

It is odd that you are talking about packages named php81 and php81-mysql as such packages do not exist in our repos. There are some in the AUR for some reason though. Are you using these or both (which could be problematic)

well before it stopped working i used only php but when i updated php i went to this https://wiki.archlinux.org/title/PHP#PH … ize_module section and just looked for a module that hopefully just replaced the files needed for it to run (which it didn't)

Offline

#8 2022-01-26 17:20:40

Pena
Member
Registered: 2019-10-04
Posts: 78

Re: [solved]How to update php module's

Pierre wrote:

It is odd that you are talking about packages named php81 and php81-mysql as such packages do not exist in our repos. There are some in the AUR for some reason though. Are you using these or both (which could be problematic)

forgot to add that although i have both installed php seems to be using the php in the official repo's although i overwrote /usr/lib/php/modules with the php81 lib64 too and /etc/php too
as you can see im desperate for a just werks on this side

Offline

#9 2022-01-26 21:52:53

seth
Member
Registered: 2012-09-03
Posts: 51,468

Re: [solved]How to update php module's

tried doing paru -S php81-mysql  but instead of updating the actual folders where php is it just does this weird thing where it creates a new php directory named php81....

i have both installed php seems to be using the php in the official repo's although i overwrote /usr/lib/php/modules with the php81 lib64 too and /etc/php too

just werks

Post the outputs of

pacman -Qs php
pacman -Qikk php

Then stop all of this nonsense.
Remove the php81* pacakges you installed from the AUR, re-install php and since I gather your ultimate desire is mysql, fix your php.ini, https://wiki.archlinux.org/title/PHP#MySQL/MariaDB
If that is for some reason not possible, first check that it actually not is and then explain why.

DO NOT COPY AND SYMLINK AROUND RANDOM BINARIES.

Online

#10 2022-01-27 00:22:03

Pena
Member
Registered: 2019-10-04
Posts: 78

Re: [solved]How to update php module's

seth wrote:

tried doing paru -S php81-mysql  but instead of updating the actual folders where php is it just does this weird thing where it creates a new php directory named php81....

i have both installed php seems to be using the php in the official repo's although i overwrote /usr/lib/php/modules with the php81 lib64 too and /etc/php too

just werks

Post the outputs of

pacman -Qs php
pacman -Qikk php

Then stop all of this nonsense.
Remove the php81* pacakges you installed from the AUR, re-install php and since I gather your ultimate desire is mysql, fix your php.ini, https://wiki.archlinux.org/title/PHP#MySQL/MariaDB
If that is for some reason not possible, first check that it actually not is and then explain why.

DO NOT COPY AND SYMLINK AROUND RANDOM BINARIES.

> Post the outputs of LANG=C pacman -Qs php

local/composer 2.2.5-1
    Dependency Manager for PHP
local/doxygen 1.9.3-1
    Documentation system for C++, C, Java, IDL and PHP
local/pecl-database-mysql-git 31.ca514c4-1
    PECL MySQL - support mysql_* functions on PHP7
local/php 8.1.2-1
    A general-purpose scripting language that is especially suited to web development
local/php-apache 8.1.2-1
    Apache SAPI for PHP
local/php81 8.1.2-3
    PHP. A general-purpose scripting language that is especially suited to web development
local/php81-mysql 8.1.2-3
    MySQL modules for php81
local/php81-openssl 8.1.2-3
    OpenSSL module for php81
local/php81-pdo 8.1.2-3
    pdo module for php81
local/xdebug 3.1.2-2
    PHP debugging extension

LANG=C pacman -Qikk php

Name            : php
Version         : 8.1.2-1
Description     : A general-purpose scripting language that is especially suited to web development
Architecture    : x86_64
URL             : https://www.php.net/
Licenses        : PHP
Groups          : None
Provides        : php-ldap=8.1.2
Depends On      : libxml2  curl  libzip  pcre2  argon2  oniguruma  db  gdbm
Optional Deps   : None
Required By     : composer  pecl-database-mysql-git  php-apache  xdebug
Optional For    : None
Conflicts With  : php-ldap
Replaces        : php-ldap
Installed Size  : 24.03 MiB
Packager        : Pierre Schmitz <pierre@archlinux.de>
Build Date      : Wed Jan 19 17:12:32 2022
Install Date    : Wed Jan 26 12:24:31 2022
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

backup file: php: /etc/php/php.ini (Modification time mismatch)
backup file: php: /etc/php/php.ini (Size mismatch)
backup file: php: /etc/php/php.ini (MD5 checksum mismatch)
backup file: php: /etc/php/php.ini (SHA256 checksum mismatch)
php: 401 total files, 0 altered files

also the issue was solved i should've removed the whole thing instead of just atempting to paru -S php again while having php81 removed although i haven't properly tested everything the ominous message is gone

Last edited by Pena (2022-01-27 00:23:03)

Offline

Board footer

Powered by FluxBB