I am trying to run the zf.sh (Zend tool) script to create a new Zend project but I get this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/php_curl.iso' - /usr/lib/php5/20090626/php_curl.iso: cannot open shared object file: No such file or directory in Unknown on line 0
I ran an ls -la of that directory and have:
16:31.57 [00h00m00s] root#vps:/usr/lib/php5/20090626# ls -la
total 752
drwxr-xr-x 2 root root 4096 Sep 11 15:00 .
drwxr-xr-x 4 root root 4096 Sep 3 10:34 ..
-rw-r--r-- 1 root root 67936 Aug 23 15:16 curl.so <---- Curl installed
-rw-r--r-- 1 root root 116856 Aug 23 15:16 gd.so
-rw-r--r-- 1 root root 47280 Aug 23 15:16 mcrypt.so
-rw-r--r-- 1 root root 135864 Aug 23 15:16 mysqli.so
-rw-r--r-- 1 root root 55424 Aug 23 15:16 mysql.so
-rw-r--r-- 1 root root 31120 Aug 23 15:16 pdo_mysql.so
-rw-r--r-- 1 root root 100776 Aug 23 15:16 pdo.so
-rw-r--r-- 1 root root 166496 Aug 19 2010 suhosin.so
in my PHP ini file (/etc/php5/apache2/php.ini)
I have:
extension=curl.so
Why am I getting the above error. I am running a Debian server :)
Related
I am running into a problem loading MySQL PHP extensions when starting HTTPD and PHP is enabled. I am running a Slackware 14.2 distro. I recently began investigating using PHP with my web server for authentication purposes against a MySQL database. I enabled PHP in my HTTPD.conf file, restarted HTTPD and a simple .php script renders the Hello world portion from the PHP tags as it should.
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>
However when I run a php login script that tries to access MariaDB to grab usernames and passwords I get the following in my HTTPD error log.
[Sun Jun 14 18:18:59.734808 2020] [php7:error] [pid 2830:tid 140204551653120] [client XXX:59322] PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in XXX.php:10\nStack trace:\n#0 XXX/login.php(12): require_once()\n#1 {main}\n thrown in XXX/config.php on line 10, referer: http://www.divemanagement2.com/
When I check the php version I get the following result:
PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib64/php/extensions/mysqli.so (/usr/lib64/php/extensions/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib64/php/extensions/mysqli.so.so (/usr/lib64/php/extensions/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/lib64/php/extensions/pdo_mysql.so (/usr/lib64/php/extensions/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib64/php/extensions/pdo_mysql.so.so (/usr/lib64/php/extensions/pdo_mysql.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 'wddx.so' (tried: /usr/lib64/php/extensions/wddx.so (/usr/lib64/php/extensions/wddx.so: cannot open shared object file: No such file or directory), /usr/lib64/php/extensions/wddx.so.so (/usr/lib64/php/extensions/wddx.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.7 (cli) (built: Jun 9 2020 15:34:50) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.7, Copyright (c), by Zend Technologies
Here are the extensions I have enabled in php.ini
extension=bcmath.so
extension=bz2.so
extension=calendar.so
extension=ctype.so
extension=curl.so
extension=dba.so
extension=dom.so
extension=enchant.so
extension=exif.so
extension=ftp.so
extension=gd.so
extension=gettext.so
extension=gmp.so
extension=iconv.so
extension=intl.so
extension=ldap.so
extension=mbstring.so
; extension=mysql.so
extension=mysqli.so
extension=odbc.so
extension=openssl.so
zend_extension=opcache.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=pdo_odbc.so
extension=pspell.so
extension=shmop.so
extension=snmp.so
extension=soap.so
extension=sqlite3.so
extension=tokenizer.so
extension=wddx.so
extension=xmlreader.so
extension=xsl.so
extension=zip.so
extension=zlib.so
Note -- I have commented out mysql.so account I have read that after ver 5 mysql.so has been deprecated for mysqli.so and I am running PHP version 7. Please advise if this is not true.
What I don't understand is the output from php -i advising that it cannot load the mysqli.so extension as it is here in /usr/lib64/php/extensions:
# ls -l
total 4764
-rwxr-xr-x 1 root root 39360 Jun 9 15:35 bcmath.so*
-rwxr-xr-x 1 root root 27288 Jun 9 15:35 bz2.so*
-rwxr-xr-x 1 root root 35160 Jun 9 15:35 calendar.so*
-rwxr-xr-x 1 root root 14520 Jun 9 15:35 ctype.so*
-rwxr-xr-x 1 root root 101496 Jun 9 15:35 curl.so*
-rwxr-xr-x 1 root root 65248 Jun 9 15:35 dba.so*
-rwxr-xr-x 1 root root 167960 Jun 9 15:35 dom.so*
-rwxr-xr-x 1 root root 27160 Jun 9 15:35 enchant.so*
-rwxr-xr-x 1 root root 92960 Jun 9 15:35 exif.so*
-rwxr-xr-x 1 root root 64376 Jun 9 15:35 ftp.so*
-rwxr-xr-x 1 root root 114072 Jun 9 15:35 gd.so*
-rwxr-xr-x 1 root root 14648 Jun 9 15:35 gettext.so*
-rwxr-xr-x 1 root root 76992 Jun 9 15:35 gmp.so*
-rwxr-xr-x 1 root root 52000 Jun 9 15:35 iconv.so*
-rwxr-xr-x 1 root root 489880 Jun 9 15:35 intl.so*
-rwxr-xr-x 1 root root 97632 Jun 9 15:35 ldap.so*
-rwxr-xr-x 1 root root 1063608 Jun 9 15:35 mbstring.so*
-rwxr-xr-x 1 root root 142400 Jun 9 15:35 mysqli.so*
-rwxr-xr-x 1 root root 269520 Jun 9 15:35 mysqlnd.so*
-rwxr-xr-x 1 root root 76864 Jun 9 15:35 odbc.so*
-rwxr-xr-x 1 root root 561856 Jun 9 15:35 opcache.so*
-rwxr-xr-x 1 root root 174040 Jun 9 15:35 openssl.so*
-rwxr-xr-x 1 root root 109880 Jun 9 15:35 pdo.so*
-rwxr-xr-x 1 root root 35456 Jun 9 15:35 pdo_mysql.so*
-rwxr-xr-x 1 root root 31448 Jun 9 15:35 pdo_odbc.so*
-rwxr-xr-x 1 root root 35736 Jun 9 15:35 pdo_sqlite.so*
-rwxr-xr-x 1 root root 27064 Jun 9 15:35 pspell.so*
-rwxr-xr-x 1 root root 14648 Jun 9 15:35 shmop.so*
-rwxr-xr-x 1 root root 56312 Jun 9 15:35 snmp.so*
-rwxr-xr-x 1 root root 315584 Jun 9 15:35 soap.so*
-rwxr-xr-x 1 root root 64832 Jun 9 15:35 sqlite3.so*
-rwxr-xr-x 1 root root 60480 Jun 9 15:35 tidy.so*
-rwxr-xr-x 1 root root 22904 Jun 9 15:35 tokenizer.so*
-rwxr-xr-x 1 root root 35512 Jun 9 15:35 xmlreader.so*
-rwxr-xr-x 1 root root 85080 Jun 9 15:35 xmlrpc.so*
-rwxr-xr-x 1 root root 35704 Jun 9 15:35 xsl.so*
-rwxr-xr-x 1 root root 72824 Jun 9 15:35 zip.so*
-rwxr-xr-x 1 root root 52224 Jun 9 15:35 zlib.so*
Can anyone explain to me why the mysqli extension will not load even though it exists in the exact directory that is being searched on initialization? Thanks for any and all help.
I think I am having problems with the max children limit for php-fpm. I am trying to find something in the logs. Where can I find php-fpm.log on my server? Running phpinfo() shows this:
I cannot find anything related to php-fpm in /var/log/.
I am also trying to find the php-fpm.conf that is mentioned at https://www.php.net/manual/en/install.fpm.configuration.php. Thank you.
UPDATE 1: I found at https://github.com/rlerdorf/php7dev/issues/48 that it asks to edit /usr/local/etc/php-fpm.d/www.conf. In my case, I cannot find that file:
root#jai [/usr/local/etc]# pwd
/usr/local/etc
root#jai [/usr/local/etc]# ls -al
total 8
drwxr-xr-x. 2 root root 4096 Sep 23 2011 ./
drwxr-xr-x. 15 root root 4096 Apr 7 15:02 ../
Do I need to create it at /usr/local/etc/php-fpm.d/www.conf?
UPDATE 2: I see I have a folder called ApachePHPFPM but the file inside (default_accounts_to_fpm) is empty:
root#jai [/var/cpanel/ApachePHPFPM]# pwd
/var/cpanel/ApachePHPFPM
root#jai [/var/cpanel/ApachePHPFPM]# ls -al
total 16
drwxr-xr-x 2 root root 4096 Mar 26 04:44 ./
drwx--x--x 108 root root 12288 Apr 17 13:44 ../
-rw-r--r-- 1 root root 0 Mar 26 04:44 default_accounts_to_fpm
root#jai [/var/cpanel/ApachePHPFPM]#
UPDATE 3: My server had this file:
/usr/local/cpanel/etc/php-fpm.conf
The file contains this:
; Error log file
; Default Value: /var/log/php-fpm.log
error_log = /usr/local/cpanel/logs/php-fpm/error.log
That means that my error logs for php-fpm are located in this file: /usr/local/cpanel/logs/php-fpm/error.log.
I navigated to /usr/local/cpanel/logs/php-fpm/ but I could not find error.log:
root#jai [/usr/local/cpanel/etc]# cd /usr/local/cpanel/logs/php-fpm/
root#jai [/usr/local/cpanel/logs/php-fpm]# ls -al
total 8
drwx------ 2 root root 4096 Mar 30 2018 ./
drwx--x--x 6 root root 4096 Apr 16 15:24 ../
root#jai [/usr/local/cpanel/logs/php-fpm]#
In /opt/cpanel/ea-php73/root/etc/php-fpm.conf I found this line:
error_log = /opt/cpanel/ea-php73/root/usr/var/log/php-fpm/error.log
I see the error log files there:
root#jai [/opt/cpanel/ea-php73/root/usr/var/log/php-fpm]# pwd
/opt/cpanel/ea-php73/root/usr/var/log/php-fpm
root#jai [/opt/cpanel/ea-php73/root/usr/var/log/php-fpm]# ls -al
total 151456
drwxrwx--- 2 nobody root 4096 Apr 14 17:36 ./
drwxr-xr-x 3 root root 4096 Mar 26 04:42 ../
-rw------- 1 root root 31536068 Apr 17 17:05 error.log
-rw------- 1 root root 32102325 Mar 29 03:26 error.log-20200329
-rw------- 1 root root 51453659 Apr 5 03:36 error.log-20200405
-rw------- 1 root root 39966549 Apr 12 02:55 error.log-20200412
root#jai [/opt/cpanel/ea-php73/root/usr/var/log/php-fpm]#
This question already has answers here:
how to enable sqlite3 for php?
(16 answers)
PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' with Jenkins
(3 answers)
Unable to load pdo_sqlite.so extension
(6 answers)
Closed 3 years ago.
I just started dabbling in PHP and the Zend 3 framwork for my new job. I wanted to train myself in the framework since this is what they use.
I have followed the tutorial from here in which you are faced with creating a module for the framework. In their example they use SQLite for the simple database actions that the task is set up for. Here in lies my problem. I have implemented the example code up until the point where I should first see all albums inserted into the database. That is when I get the error:
File:
.../vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Connection.php:282
Message:
Connect Error: could not find driver
Fair - I then googled and found that in my php.ini file I must uncomment the extension=pdo_sqlite line. Which I have done. I have also installed the package php7.3-sqlite package and everything, that I can find is needed for this to run.
I'm not using apache or nginx for this, I'm simply using PHP's own built-in webserver for this simple tutorial.
When I run my command: php -S me.localhost:1337 -t public public/index.php from my workspace directory I get:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib/php/20180731/pdo_sqlite (/usr/lib/php/20180731/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/20180731/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver)) in Unknown on line 0
And:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/20180731/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name), /usr/lib/php/20180731/pdo_sqlite.so.so (/usr/lib/php/20180731/pdo_sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I checked my filesystem and the filepath: /usr/lib/php/20180731/pdo_sqlite.so does exist.
ls -la /usr/lib/php/20180731/
total 6792
drwxr-xr-x 2 root root 4096 Mar 13 16:34 .
drwxr-xr-x 4 root root 4096 Mar 13 16:31 ..
-rw-r--r-- 1 root root 30824 Mar 7 21:31 calendar.so
-rw-r--r-- 1 root root 14440 Mar 7 21:31 ctype.so
-rw-r--r-- 1 root root 84072 Mar 7 21:31 exif.so
-rw-r--r-- 1 root root 5425264 Mar 7 21:31 fileinfo.so
-rw-r--r-- 1 root root 59496 Mar 7 21:31 ftp.so
-rw-r--r-- 1 root root 14440 Mar 7 21:31 gettext.so
-rw-r--r-- 1 root root 43112 Mar 7 21:31 iconv.so
-rw-r--r-- 1 root root 43112 Mar 7 21:31 json.so
-rw-r--r-- 1 root root 506352 Mar 7 21:31 opcache.so
-rw-r--r-- 1 root root 108648 Mar 7 21:31 pdo.so
-rw-r--r-- 1 root root 30824 Mar 7 21:31 pdo_sqlite.so
-rw-r--r-- 1 root root 268392 Mar 7 21:31 phar.so
-rw-r--r-- 1 root root 34920 Mar 7 21:31 posix.so
-rw-r--r-- 1 root root 30824 Mar 7 21:31 readline.so
-rw-r--r-- 1 root root 14440 Mar 7 21:31 shmop.so
-rw-r--r-- 1 root root 88168 Mar 7 21:31 sockets.so
-rw-r--r-- 1 root root 51304 Mar 7 21:31 sqlite3.so
-rw-r--r-- 1 root root 14440 Mar 7 21:31 sysvmsg.so
-rw-r--r-- 1 root root 10344 Mar 7 21:31 sysvsem.so
-rw-r--r-- 1 root root 14440 Mar 7 21:31 sysvshm.so
-rw-r--r-- 1 root root 18536 Mar 7 21:31 tokenizer.so
As you can see the ls -la output states that the files exist. I really don't know what to do from here. I have tried many things, even purging my php installation and installed ONLY php 7.3. Hop you can help.
all I struggle with one permission problem with my wordpress.
As you can see
ls -la wp-content/themes/impreza/
total 144
drwxr-xr-x 9 root root 4096 Oct 7 16:49 .
drwxr-xr-x 4 root root 4096 Oct 7 11:21 ..
-rwxr-xr-x 1 root root 330 Oct 7 10:33 404.php
-rwxr-xr-x 1 root root 340 Oct 7 10:33 archive.php
-rwxr-xr-x 1 root root 339 Oct 7 10:33 author.php
-rwxr-xr-x 1 root root 349 Oct 7 10:33 comments.php
drwxr-xr-x 2 root root 4096 Oct 7 16:48 config
drwxr-xr-x 2 root root 4096 Oct 7 10:33 css
drwxr-xr-x 10 root root 4096 Oct 7 10:33 demo-import
-rwxr-xr-x 1 root root 337 Oct 7 10:33 footer.php
-rwxr-xr-x 1 root root 355 Oct 7 10:33 forum.php
drwxr-xr-x 15 root root 4096 Oct 7 10:34 framework
drwxr-xr-x 3 root root 4096 Oct 7 10:34 functions
-rwxr-xr-x 1 root root 1105 Oct 7 10:33 functions.php
-rwxr-xr-x 1 root root 337 Oct 7 10:33 header.php
-rwxr-xr-x 1 root root 359 Oct 7 10:33 header-shop.php
-rwxr-xr-x 1 root root 361 Oct 7 10:33 index.php
drwxr-xr-x 2 root root 4096 Oct 7 10:33 js
-rwxr-xr-x 1 root root 325 Oct 7 10:33 page.php
-rwxr-xr-x 1 root root 18970 Oct 7 10:33 screenshot.png
-rwxr-xr-x 1 root root 388 Oct 7 10:33 searchform.php
-rwxr-xr-x 1 root root 344 Oct 7 10:33 search.php
-rwxr-xr-x 1 root root 645 Oct 7 10:33 single.php
-rwxr-xr-x 1 root root 365 Oct 7 10:33 single-us_portfolio.php
-rwxr-xr-x 1 root root 288 Oct 7 10:33 style.css
-rwxr-xr-x 1 root root 15056 Oct 7 16:49 us-logo.png
drwxr-xr-x 3 root root 4096 Oct 7 10:34 vendor
-rwxr-xr-x 1 root root 4341 Oct 7 10:33 wpml-config.xml
in my themes folder everything is with equals permissions but I can't access them all. For example
NOT VISIBLE - http://www.aniabuchi.com/wp-content/themes/impreza/us-logo.png
VISIBLE - http://www.aniabuchi.com/wp-content/themes/impreza/screenshot.png
The theme itself has activeted, but when I've try to active the plugins it say also "Please adjust file permissions to allow plugins installation".
This is my second wordpress installation and the only difference I've made is to use only one wp-contents folder
/* Default value for some constants if they have not yet been set
by the host-specific config files */
if (!defined('ABSPATH'))
define('ABSPATH', '/var/www/aniabuchi/');
if (!defined('WP_CORE_UPDATE'))
define('WP_CORE_UPDATE', false);
define('DB_HOST', 'localhost');
if (!defined('WP_CONTENT_DIR') && !defined('DONT_SET_WP_CONTENT_DIR'))
define('WP_CONTENT_DIR', '/var/www/aniabuchi/wp-content');
try to make images 777 to see if you can access them.
for plugin, you should check your "wp-content/plugins" folder permission, not themes.
You need to make sure the owner assigned to the files and directories is the web server user, otherwise wordpress will fail all plugin installations or updates regardless of file/folder permissions. On ubuntu/debian it's usually www-data, and on centos/rhel/fedora it's apache.
Try this and check - it might do the trick:
# chmod 755 -R <path_to_your_webroot_folder>
# chown root:root -R <path_to_your_webroot_folder>
From cron I see:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/mongo.so' - /usr/lib/php5/20131226/mongo.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 '/usr/lib/php5/20121212/mcrypt.so' - /usr/lib/php5/20121212/mcrypt.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 '/usr/lib/php5/20121212/mcrypt.so' - /usr/lib/php5/20121212/mcrypt.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 '/usr/lib/php5/20121212/mcrypt.so' - /usr/lib/php5/20121212/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
mongo and mcrypt are installed and current.
I also tried:
sudo ldconfig -v
to no avail. The directory /usr/lib/php5/20131226/ shows:
-rw-r--r-- 1 root root 89240 Oct 27 21:40 curl.so
-rw-r--r-- 1 root root 114136 Oct 27 21:40 gd.so
-rw-r--r-- 1 root root 39832 Jan 27 2015 json.so
-rw-r--r-- 1 root root 47936 Jan 27 2015 mcrypt.so
-rw-r--r-- 1 root root 380400 Jan 27 2015 mongo.so
-rw-r--r-- 1 root root 159464 Oct 27 21:40 mysqli.so
-rw-r--r-- 1 root root 60504 Oct 27 21:40 mysql.so
-rw-r--r-- 1 root root 159896 Oct 27 21:40 opcache.so
-rw-r--r-- 1 root root 36168 Oct 27 21:40 pdo_mysql.so
-rw-r--r-- 1 root root 118216 Oct 27 21:40 pdo.so
-rw-r--r-- 1 root root 31576 Oct 27 21:40 readline.so
-rw-r--r-- 1 root root 853376 Jan 27 2015 xdebug.so
as I expect. I am running nginx and not apache, so what gives. Can anyone point me in the right direction? I have been looking at this for a few days and am sick of my log files filled with this error.
mongo is compiled into as well. So where is this comming from?
Thanks!