PHP 7.0 on Ubuntu 16 - pdo_mysql.so: undefined symbol: mysqlnd_connect - pdo

I'm gettind this PDOException could not find driver
here is my /etc/php/7.0/apache2/php.ini file
;extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
and when I run php in my server I get this warning PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: mysqlnd_connect in Unknown on line 0

I had to make sure that /usr/lib/php/20151012/mysqlnd.so exists and my modules were been enabled by the /etc/php/7.0/mods-available directory, there were multiple .ini files, except for mysqlnd.ini
so I created it
sudo nano mysqlnd.ini
and put this content:
; configuration for php common module
; priority=10
extension=mysqlnd.so
restarted apache
sudo service apache2 restart

Related

How can I solve this problem of installation xampp on fedora?

When I run xampp on fedora this error is showing up on application log
Starting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
Stderr:
httpd: Syntax error on line 522 of /opt/lampp/etc/httpd.conf: Syntax error on line 10 of /opt/lampp/etc/extra/httpd-xampp.conf: Cannot load modules/libphp7.so into server: libnsl.so.1: cannot open shared object file: No such file or directory
can anyone tell me how can I solve this?
it seems you're missing libnsl. install it through this command:
sudo dnf install libnsl
In case this doesn't work you can then download it manually:
Visit https://pkgs.org/
In the search box (pkgs.org of course) type libnsl.so.1 and choose the appropriate OS. The version shown might be higher e.g libnsl-2.28-9.fc29.x86_64.rpm, but it doesn't matter, the file needed is also included in this very package.
In the terminal, navigate to the directory where the .rpm was downloaded.
Type the following command to install it:
sudo rpm libnsl-2.XX-X.fc29.x86_64.rpm
Upon completion everything should be working fine.
A quick Google search returns this: https://www.reddit.com/r/Fedora/comments/8hlhlv/xampp_with_fedora_28/
The suggested fix is installing libnsl from this source:
https://www.rpmfind.net/linux/rpm2html/search.php?query=libnsl.so.1%28%29%2864bit%29&submit=Search+...&system=fedora&arch=

PHP Warning: PHP Startup: Unable to load dynamic library on Ubuntu

some background information:
Ubuntu 14.04 minimal and upgraded php from verion 5.x to 7.2
and now I get every 30 minutes an email from the cron daemon with the following subject:
Cron <root#v52775> [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi
and following content:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_intl.dll' - /usr/lib/php/20131226/php_intl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_mysql.dll' - /usr/lib/php/20131226/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_mysqli.dll' - /usr/lib/php/20131226/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
I'm a little bit confused because I don't know how i get this .dll files and not any .so.
I look at the php info, so the intl and mysqli module are active. The same information I get when I write php -m on my terminal.
But not the mysql extension! I disabled the older php version, only php 7.2 is running on my system.
The another confusing is the path. I'm not sure but in the e-mail from the cronjob ist the path /usr/lib/php/20131226/php_* but the php info shows me 20170718. I put a screenshot here.
screenshot php info extention
How I can fix it, I hope someone can help me?
Please ask me if you need more information :)
I fix it!
I do sudo apt-get remove "php*" and install php once again. After that you get a email with a lot of warnings like that.
PHP Warning: PHP Startup: Unable to load dynamic library 'xml.so' (tried: /usr/lib/php/20170718/xml.so (/usr/lib/php/20170718/xml.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/xml.so.so (/usr/lib/php/20170718/xml.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
This can be easily fixed by installing the missing modules.

Apache http server, Solaris 8

While starting the apache http server, I am getting the below error:
httpd: Syntax error on line 67 of /isgwtld/lsam/apache/conf/httpd.conf: Cannot load modules/mod_wl_22.so into server: ld.so.1: httpd: fatal: relocation error: file /isgwtld/lsam/apache/modules/mod_wl_22.so: symbol unixd_set_global_mutex_perms: referenced symbol not found
Configuration used currently:
OS: Solaris 8
APACHE HTTP SERVER : 2.4.27
weblogic: 10.3.0
Probably you are using an old version of the module or a mod_wl module compiled for an older httpd version (2.0 or 2.2).
In my case, I solved using an updated mod_wl version compiled for apache 2.4.

Transport Layer Security module fails to load

I am using Ubuntu 12.04 LTS, and Apache 2.4.
I've installed TLS by following the steps on this link: https://help.ubuntu.com/community/GnuTLS
When restarting Apache I get the following error:
apache2: Syntax error on line 212 of /etc/apache2/apache2.conf:
Syntax error on line 1 of /etc/apache2/mods-enabled/gnutls.load:
Cannot load /usr/lib/apache2/modules/mod_gnutls.so into server:
/usr/lib/apache2/modules/mod_gnutls.so: undefined symbol: unixd_config
If I remove the #gnutls.conf file from the /etc/apache2/mods-enabled directory Apache restarts.
What is causing the module not to load?
Your level of mod_gnutls isn't aware of Apache 2.4, one breaking change in 2.4 is the symbol unixd_config is replaced by ap_unixd_config. There will probably be a slew of similar issues.

Configuration http not running after installing mod_jk.so

I installed: mod_jk-1.2.31-httpd-2.2.x.so
When restart httpd after updateing mod_jk
/sbin/service http stop
ERROR:
httpd: syntax error on line 30 of /usr/local/apache/conf/httpd.conf: syntax error on line 2 of /usr/local/apache/conf.d/mod_jk.conf: cannot load /usr/local/apache/modules/mod_jk.so into server: /usr/local/apache/modules/mod_jk.so: wrong ELF class: ELFCLASS32
Found the correct compiled version for 64bit system.