You are not logged in.

#1 2024-09-12 02:11:05

rmxburhan
Member
Registered: 2024-09-11
Posts: 2

php74 unable to load mysqli and pdo_mysql

PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib/php74/modules/mysqli.so (/usr/lib/php74/modules/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php74/modules/mysqli.so.so (/usr/lib/php74/modules/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php74/modules/pdo_mysql.so (/usr/lib/php74/modules/pdo_mysql.so: undefined symbol: pdo_parse_params), /usr/lib/php74/modules/pdo_mysql.so.so (/usr/lib/php74/modules/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PDO
PDO support => enabled
PDO drivers => mysql
PDO Driver for MySQL => enabled

hi I just installed php74 from aur repository and install some extensions I needed and setup the apache cofig but when I run the PHP the above error is show up.

this is php74 -m

[PHP Modules]
Core
date
filter
hash
libxml
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
readline
Reflection
session
SPL
standard
xml
zlib

I have made a infophp file and run in on apache and it was shown that pdo is used and shown in the info page

I am new in arch, btw

Last edited by rmxburhan (2024-09-12 02:11:28)

Offline

#2 2024-09-12 07:05:11

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,327
Website

Re: php74 unable to load mysqli and pdo_mysql

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2024-09-12 08:39:06

cryptearth
Member
Registered: 2024-02-03
Posts: 772

Re: php74 unable to load mysqli and pdo_mysql

is there any reason for specific version 7.4 instead of current?

Offline

#4 2024-09-12 12:40:36

rmxburhan
Member
Registered: 2024-09-11
Posts: 2

Re: php74 unable to load mysqli and pdo_mysql

currently my task at job is migrating from old website to a new technologies and it requires php7 to run it

Offline

#5 2024-09-12 13:06:19

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,794

Re: php74 unable to load mysqli and pdo_mysql

Is php74-pdo installed ?

If yes, is mariadb installed & configured ?
see https://wiki.archlinux.org/title/PHP#MySQL/MariaDB


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2024-09-12 13:54:03

cryptearth
Member
Registered: 2024-02-03
Posts: 772

Re: php74 unable to load mysqli and pdo_mysql

rmxburhan wrote:

it requires php7 to run it

I doubt that

usually most languages are quite good in forward-compatibility
so - is there any code that specifically requires php7 which does not work with current php8?
or was php7 just the current major back when the code was written / last revised and all works correctly with current php8?

just because someone states "requires language X in specific version Y.Z" in most cases doesn't even mean "requires at least major Y" but often just "written in language X"

to save yourself further stress: check if you really need php7(.4) or if the code works correctly with php8
if and only if you really need php7 it would be even worth to deal with it - unless it's just simpler to rewrite the problematic code

same goes for any dependencies and libraries: check if any really needs the older version and check for updates compatible with current php (lib updates should be designed as drop-in replacements - unless a new major version was released)

to me this sounds like an XY-problem: someone who doesn't know better tasked you as a developer to revise some old code and gave you what they had
you as the tasked developer should know better - as in the end from what I get it's your job the deliver something more up-to-date - work smart not hard

... unless you get payed by the hour ... but I guess if so you wouldn't ask such kind of questions

Offline

Board footer

Powered by FluxBB