Hello, will top post here. PHP 8 doesn't have function mysql_connect() you need to convert your code to mysqli_connect() Google is your friend https://www.google.com/search?client=firefox-b-d&q=php8+call+to+undefined+function+mysql_connect%28%29 Greeting Becki Am 20.11.2022 um 10:10 schrieb Boyd Lynn Gerber:
Hello,
OpenSUSE Leap 15.4 PHP 8.0.10, I needed to upgrade to PHP 8 becuase on my wordpress sites I needed php 7.2.30 or greater. PHP 7.4.25 is was installed. In my /etc/php7/apache2/php.ini files I had
extension=mysqli extension=pdo_mysql
All my wordpress sites worked and phpinfo displayed mysqli Sadly after upgrading to PHP 8 It isn't found.
Pastebin will not allow the contents of
In my https://www.zenez.com/cgi-bin/phpinfo.php
Pastebin’s SMART filters have detected potentially offensive or questionable content in your Paste. The content you are trying to publish has been deemed potentially offensive or questionable by our filters, because of this you’re receiving this warning. This Paste can only be published with the visibility set to "Private".
I have in my
/etc/php8/apache2/php.ini
extension=mysqli extension=pdo_mysql
Just as before but in the php7 directory. My system has
/usr/lib64/php8/extensions/mysqli.so
But all my wordpress sites which haven't changed are getting this erro.
PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in ...
Obvioulsy, my system isn't loading the extiontion. Note one my apache2handler php8 isn't found, but in /etc/sysconfig/apache2, I have
APACHE_MODULES="suexec authz_host actions alias auth_basic authn_file authz_groupfile authz_user autoindex cgi dir env include log_config mime negotiation setenvif status userdir asis cache headers imagemap logio proxy proxy_http rewrite ssl perl wsgi-python3 itidy socache_shmcb wsgi wordpress proxy_wstunnel authn_core version authz_core mailman reqtimeout php8-fpm apache2-mod_php proxy_fcgi php php8"
PHP Additional files parsed does have
/etc/php8/conf.d/mysqli.ini
which has
; comment out next line to disable mysqli extension in php extension=mysqli.so
So it should be loaded.
Any ideas on how to resolve the issue?
Thanks in advance.
Regards,