SqLite3 and json_encode() fault

Mcat,

thanks for jumping on this.

pi@raspberrypi:~ $ ls -l /etc/php/7.0/mods-available/
ls: cannot access '/etc/php/7.0/mods-available/': No such file or directory

I take it that is the problem?

What could have caused that?

pi@noads:~ $ dpkg -S /etc/php/7.0/mods-available
php7.0-opcache, php7.0-sqlite3, php7.0-json, php7.0-readline, php7.0-common: /etc/php/7.0/mods-available

pi@noads:~ $ dpkg -L php7.0-json
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/json.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-json
/usr/share/bug/php7.0-json/control
/usr/share/bug/php7.0-json/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-json
/usr/share/php7.0-json
/usr/share/php7.0-json/json
/usr/share/php7.0-json/json/json.ini
/usr/share/doc/php7.0-json

pi@noads:~ $ dpkg -L php7.0-sqlite3
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/pdo_sqlite.so
/usr/lib/php/20151012/sqlite3.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-sqlite3
/usr/share/bug/php7.0-sqlite3/control
/usr/share/bug/php7.0-sqlite3/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-sqlite3
/usr/share/php7.0-sqlite3
/usr/share/php7.0-sqlite3/sqlite3
/usr/share/php7.0-sqlite3/sqlite3/pdo_sqlite.ini
/usr/share/php7.0-sqlite3/sqlite3/sqlite3.ini
/usr/share/doc/php7.0-sqlite3

pi@noads:~ $ php -m | grep 'json\|sqlite3'
json
sqlite3

pi@noads:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-json.ini
/etc/php/7.0/mods-available/json.ini

pi@noads:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-sqlite3.ini
/etc/php/7.0/mods-available/sqlite3.ini

pi@noads:~ $ cat /etc/php/7.0/mods-available/json.ini
; configuration for php json module
; priority=20
extension=json.so

pi@noads:~ $ cat /etc/php/7.0/mods-available/sqlite3.ini
; configuration for php sqlite3 module
; priority=20
extension=sqlite3.so

Thank you for the response deHakkelaar. I tried to follow your commands and it fails at

$ php -m | grep 'json|sqlite3'

The commands and output are as follows:

pi@raspberrypi:/ $ dpkg -S /etc/php/7.0/mods-available
php7.0-imap, php7.0-readline, php7.0-opcache, php7.0-zip, php7.0-xmlrpc, php7.0-xml, php7.0-mbstring, php7.0-gd, php7.0-mcrypt, php7.0-json, libapache2-mod-php, php-memcache, php7.0-curl, php7.0-sqlite3, php7.0-common, php7.0-intl, php7.0-mysql, php-imagick: /etc/php/7.0/mods-available
pi@raspberrypi:/ $ dpkg -L php7.0-json
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/json.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-json
/usr/share/bug/php7.0-json/control
/usr/share/bug/php7.0-json/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-json
/usr/share/php7.0-json
/usr/share/php7.0-json/json
/usr/share/php7.0-json/json/json.ini
/usr/share/doc/php7.0-json
pi@raspberrypi:/ $ dpkg -L php7.0-sqlite3
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/pdo_sqlite.so
/usr/lib/php/20151012/sqlite3.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-sqlite3
/usr/share/bug/php7.0-sqlite3/control
/usr/share/bug/php7.0-sqlite3/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-sqlite3
/usr/share/php7.0-sqlite3
/usr/share/php7.0-sqlite3/sqlite3
/usr/share/php7.0-sqlite3/sqlite3/pdo_sqlite.ini
/usr/share/php7.0-sqlite3/sqlite3/sqlite3.ini
/usr/share/doc/php7.0-sqlite3
pi@raspberrypi:/ $ php -m | grep 'json|sqlite3'

pi@raspberrypi:/ $ which php
/usr/bin/php
pi@raspberrypi:/ $ which php7.0
/usr/bin/php7.0

I dont seem to have /etc/php7.0 which is what pihole seems to be looking for.

shall i just move it?

Any other ideas i can try?

thanks guys.

Below one will reinstall the two PHP modules and restore the /etc/php/7.0/mods-available folder:

sudo apt install --reinstall php7.0-json php7.0-sqlite3

And below one should enable the mods and create appropriate symlinks:

sudo phpenmod json sqlite3

After reinstalling and enabling, post outcome for all the commands from my first posting pls ?

EDIT: And post outcome for below one just to be sure ?

php -m

EDIT2: after enabling the two mods, you most always have to restart the web daemon to apply:

sudo service lighttpd restart

1 Like

Edited. New output to follow

sudo apt purge php7.0-json php7.0-sqlite3

sudo apt install php7.0-json php7.0-sqlite3

sudo phpenmod json sqlite3

?

And the commands from my first posting ?

This is the output from the commands:

pi@raspberrypi:~ $ sudo apt install --reinstall php7.0-json php7.0-sqlite3
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 5 not upgraded.
Need to get 0 B/35.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 123956 files and directories currently installed.)
Preparing to unpack .../php7.0-json_7.0.33-0+deb9u3_armhf.deb ...
Unpacking php7.0-json (7.0.33-0+deb9u3) over (7.0.33-0+deb9u3) ...
Preparing to unpack .../php7.0-sqlite3_7.0.33-0+deb9u3_armhf.deb ...
Unpacking php7.0-sqlite3 (7.0.33-0+deb9u3) over (7.0.33-0+deb9u3) ...
Setting up php7.0-sqlite3 (7.0.33-0+deb9u3) ...
Not replacing deleted config file /etc/php/7.0/mods-available/sqlite3.ini
WARNING: Module sqlite3 ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module sqlite3 ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module sqlite3 ini file doesn't exist under /etc/php/7.0/mods-available
php_invoke: Enable module sqlite3 for apache2 sapi
php_invoke: Enable module sqlite3 for cgi sapi
php_invoke: Enable module sqlite3 for cli sapi
Not replacing deleted config file /etc/php/7.0/mods-available/pdo_sqlite.ini
WARNING: Module pdo_sqlite ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module pdo_sqlite ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module pdo_sqlite ini file doesn't exist under /etc/php/7.0/mods-available
php_invoke: Enable module pdo_sqlite for apache2 sapi
php_invoke: Enable module pdo_sqlite for cgi sapi
php_invoke: Enable module pdo_sqlite for cli sapi
Setting up php7.0-json (7.0.33-0+deb9u3) ...
Not replacing deleted config file /etc/php/7.0/mods-available/json.ini
WARNING: Module json ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module json ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module json ini file doesn't exist under /etc/php/7.0/mods-available
php_invoke: Enable module json for apache2 sapi
php_invoke: Enable module json for cgi sapi
php_invoke: Enable module json for cli sapi
Processing triggers for libapache2-mod-php7.0 (7.0.33-0+deb9u3) ...
pi@raspberrypi:~ $ sudo phpenmod json sqlite3
WARNING: Module json ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module json ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module json ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module sqlite3 ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module sqlite3 ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module sqlite3 ini file doesn't exist under /etc/php/7.0/mods-available
pi@raspberrypi:~ $ php -m
[PHP Modules]
Core
date
filter
hash
libxml
openssl
pcntl
pcre
Reflection
session
SPL
standard
zlib

[Zend Modules]
pi@raspberrypi:~ $ sudo service lighttpd restart

I then issued the previous commands as follows:

pi@raspberrypi:~ $ dpkg -S /etc/php/7.0/mods-available
php7.0-sqlite3, libapache2-mod-php, php7.0-json, php7.0-readline, php7.0-opcache, php7.0-common: /etc/php/7.0/mods-available
pi@raspberrypi:~ $ dpkg -L php7.0-json
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/json.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-json
/usr/share/bug/php7.0-json/control
/usr/share/bug/php7.0-json/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-json
/usr/share/php7.0-json
/usr/share/php7.0-json/json
/usr/share/php7.0-json/json/json.ini
/usr/share/doc/php7.0-json
pi@raspberrypi:~ $ dpkg -L php7.0-sqlite3
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/pdo_sqlite.so
/usr/lib/php/20151012/sqlite3.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-sqlite3
/usr/share/bug/php7.0-sqlite3/control
/usr/share/bug/php7.0-sqlite3/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-sqlite3
/usr/share/php7.0-sqlite3
/usr/share/php7.0-sqlite3/sqlite3
/usr/share/php7.0-sqlite3/sqlite3/pdo_sqlite.ini
/usr/share/php7.0-sqlite3/sqlite3/sqlite3.ini
/usr/share/doc/php7.0-sqlite3
pi@raspberrypi:~ $ php -m | grep 'json|sqlite3'
pi@raspberrypi:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-json.ini
pi@raspberrypi:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-sqlite3.ini
pi@raspberrypi:~ $ cat /etc/php/7.0/mods-available/json.ini
cat: /etc/php/7.0/mods-available/json.ini: No such file or directory
pi@raspberrypi:~ $ cat /etc/php/7.0/mods-available/sqlite3.ini
cat: /etc/php/7.0/mods-available/sqlite3.ini: No such file or directory

pi@raspberrypi:~ $ sudo apt purge php7.0-json php7.0-sqlite3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dh-php imagemagick-6-common libexporter-tiny-perl liblist-moreutils-perl liblqr-1-0 libmagickcore-6.q16-3 libmagickwand-6.q16-3 libpcre3-dev libpcre32-3
libpcrecpp0v5 libssl-dev libssl-doc shtool xml2
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libapache2-mod-php* libapache2-mod-php7.0* php-cgi* php-imagick* php-memcache* php-pear* php-sqlite3* php7.0* php7.0-cgi* php7.0-cli* php7.0-dev*
php7.0-json* php7.0-sqlite3* pkg-php-tools*
0 upgraded, 0 newly installed, 14 to remove and 5 not upgraded.
After this operation, 20.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 123956 files and directories currently installed.)
Removing libapache2-mod-php (1:7.0+49) ...
Removing php7.0 (7.0.33-0+deb9u3) ...
Removing php-memcache (3.0.9~20160311.4991c2f-5) ...
WARNING: Module memcache ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module memcache ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module memcache ini file doesn't exist under /etc/php/7.0/mods-available
Removing php-imagick (3.4.3~rc2-2) ...
WARNING: Module imagick ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module imagick ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module imagick ini file doesn't exist under /etc/php/7.0/mods-available
Removing libapache2-mod-php7.0 (7.0.33-0+deb9u3) ...
Module php7.0 disabled.
apache2_invoke prerm: Disable module php7.0
apache2_reload: Your configuration is broken. Not restarting Apache 2
apache2_reload: /usr/sbin/apache2ctl: 198: /usr/sbin/apache2ctl: /usr/sbin/apache2: not found
Removing php-cgi (1:7.0+49) ...
Removing pkg-php-tools (1.35) ...
Removing php-pear (1:1.10.1+submodules+notgz-9+deb9u1) ...
Removing php-sqlite3 (1:7.0+49) ...
Removing php7.0-cgi (7.0.33-0+deb9u3) ...
apache2_invoke php7.0-cgi prerm: No action required
Removing php7.0-dev (7.0.33-0+deb9u3) ...
Removing php7.0-cli (7.0.33-0+deb9u3) ...
Removing php7.0-json (7.0.33-0+deb9u3) ...
Removing php7.0-sqlite3 (7.0.33-0+deb9u3) ...
Processing triggers for man-db (2.7.6.1-2) ...
(Reading database ... 123323 files and directories currently installed.)
Purging configuration files for php-imagick (3.4.3~rc2-2) ...
Purging configuration files for php7.0-cgi (7.0.33-0+deb9u3) ...
apache2_invoke php7.0-cgi postrm: No action required
Purging configuration files for libapache2-mod-php7.0 (7.0.33-0+deb9u3) ...
apache2_invoke postrm: Purging state for php7.0
Purging configuration files for php7.0-cli (7.0.33-0+deb9u3) ...
Purging configuration files for php7.0-sqlite3 (7.0.33-0+deb9u3) ...
Purging configuration files for php-memcache (3.0.9~20160311.4991c2f-5) ...
Purging configuration files for php7.0-json (7.0.33-0+deb9u3) ...
Purging configuration files for php-pear (1:1.10.1+submodules+notgz-9+deb9u1) ...
pi@raspberrypi:~ $ sudo apt install php7.0-json php7.0-sqlite3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dh-php imagemagick-6-common libexporter-tiny-perl liblist-moreutils-perl liblqr-1-0 libmagickcore-6.q16-3 libmagickwand-6.q16-3 libpcre3-dev libpcre32-3
libpcrecpp0v5 libssl-dev libssl-doc shtool xml2
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
php7.0-json php7.0-sqlite3
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/35.4 kB of archives.
After this operation, 156 kB of additional disk space will be used.
Selecting previously unselected package php7.0-json.
(Reading database ... 123317 files and directories currently installed.)
Preparing to unpack .../php7.0-json_7.0.33-0+deb9u3_armhf.deb ...
Unpacking php7.0-json (7.0.33-0+deb9u3) ...
Selecting previously unselected package php7.0-sqlite3.
Preparing to unpack .../php7.0-sqlite3_7.0.33-0+deb9u3_armhf.deb ...
Unpacking php7.0-sqlite3 (7.0.33-0+deb9u3) ...
Setting up php7.0-sqlite3 (7.0.33-0+deb9u3) ...

Creating config file /etc/php/7.0/mods-available/sqlite3.ini with new version

Creating config file /etc/php/7.0/mods-available/pdo_sqlite.ini with new version
Setting up php7.0-json (7.0.33-0+deb9u3) ...

Creating config file /etc/php/7.0/mods-available/json.ini with new version
pi@raspberrypi:~ $ sudo phpenmod json sqlite3
pi@raspberrypi:~ $

Shall i run the original commands now mate?

Yes the ones from 1st posting of mine?

pi@raspberrypi:~ $ dpkg -S /etc/php/7.0/mods-available
php7.0-sqlite3, php7.0-json, php7.0-readline, php7.0-opcache, php7.0-common: /etc/php/7.0/mods-available
pi@raspberrypi:~ $ dpkg -L php7.0-json
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/json.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-json
/usr/share/bug/php7.0-json/control
/usr/share/bug/php7.0-json/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-json
/usr/share/php7.0-json
/usr/share/php7.0-json/json
/usr/share/php7.0-json/json/json.ini
/usr/share/doc/php7.0-json
pi@raspberrypi:~ $ dpkg -L php7.0-sqlite3
/.
/etc
/etc/php
/etc/php/7.0
/etc/php/7.0/mods-available
/usr
/usr/lib
/usr/lib/php
/usr/lib/php/20151012
/usr/lib/php/20151012/pdo_sqlite.so
/usr/lib/php/20151012/sqlite3.so
/usr/share
/usr/share/bug
/usr/share/bug/php7.0-sqlite3
/usr/share/bug/php7.0-sqlite3/control
/usr/share/bug/php7.0-sqlite3/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php7.0-sqlite3
/usr/share/php7.0-sqlite3
/usr/share/php7.0-sqlite3/sqlite3
/usr/share/php7.0-sqlite3/sqlite3/pdo_sqlite.ini
/usr/share/php7.0-sqlite3/sqlite3/sqlite3.ini
/usr/share/doc/php7.0-sqlite3
pi@raspberrypi:~ $ php -m | grep 'json|sqlite3'
bash: php: command not found
pi@raspberrypi:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-json.ini
pi@raspberrypi:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-sqlite3.ini
pi@raspberrypi:~ $ cat /etc/php/7.0/mods-available/json.ini
; configuration for php json module
; priority=20
extension=json.so
pi@raspberrypi:~ $ cat /etc/php/7.0/mods-available/sqlite3.ini
; configuration for php sqlite3 module
; priority=20
extension=sqlite3.so

pi@noads:~ $ whereis php
php: /usr/bin/php7.0 /usr/bin/php /usr/lib/php /etc/php /usr/share/php7.0-readline /usr/share/php7.0-json /usr/share/php7.0-opcache /usr/share/php7.0-common /usr/share/php7.0-sqlite3 /usr/share/man/man1/php.1.gz

pi@noads:~ $ readlink -f /usr/bin/php
/usr/bin/php7.0

pi@noads:~ $ dpkg -S /usr/bin/php7.0
php7.0-cli: /usr/bin/php7.0

Try reinstall that package:

sudo apt install --reinstall php7.0-cli

And you'll need the one used for CGI too:

sudo apt install --reinstall php7.0-cgi

1 Like

pi@raspberrypi:~ $ whereis php
php: /usr/lib/php /etc/php /usr/share/php7.0-sqlite3 /usr/share/php7.0-common /usr/share/php7.0-curl /usr/share/php7.0-zip /usr/share/php7.0-json /usr/share/php7.0-opcache /usr/share/php7.0-readline /usr/share/php7.0-imap /usr/share/php7.0-xmlrpc /usr/share/php7.0-mcrypt /usr/share/php7.0-mbstring /usr/share/php7.0-intl /usr/share/php7.0-mysql /usr/share/php7.0-xml /usr/share/php7.0-gd
pi@raspberrypi:~ $ readlink -f /usr/bin/php
/usr/bin/php
pi@raspberrypi:~ $ dpkg -S /usr/bin/php7.0
dpkg-query: no path found matching pattern /usr/bin/php7.0
pi@raspberrypi:~ $ sudo apt install --reinstall php7.0-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dh-php imagemagick-6-common libexporter-tiny-perl liblist-moreutils-perl liblqr-1-0 libmagickcore-6.q16-3 libmagickwand-6.q16-3 libpcre3-dev libpcre32-3
libpcrecpp0v5 libssl-dev libssl-doc shtool xml2
Use 'sudo apt autoremove' to remove them.
Suggested packages:
php-pear
The following NEW packages will be installed:
php7.0-cli
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/1,052 kB of archives.
After this operation, 3,171 kB of additional disk space will be used.
Selecting previously unselected package php7.0-cli.
(Reading database ... 123337 files and directories currently installed.)
Preparing to unpack .../php7.0-cli_7.0.33-0+deb9u3_armhf.deb ...
Unpacking php7.0-cli (7.0.33-0+deb9u3) ...
Setting up php7.0-cli (7.0.33-0+deb9u3) ...
update-alternatives: using /usr/bin/php7.0 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.0 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.0 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.0/cli/php.ini with new version
php_invoke: Enable module exif for cli sapi
php_invoke: Enable module intl for cli sapi
php_invoke: Enable module simplexml for cli sapi
php_invoke: Enable module iconv for cli sapi
php_invoke: Enable module ctype for cli sapi
php_invoke: Enable module gettext for cli sapi
php_invoke: Enable module shmop for cli sapi
php_invoke: Enable module ftp for cli sapi
php_invoke: Enable module phar for cli sapi
php_invoke: Enable module mcrypt for cli sapi
php_invoke: Enable module calendar for cli sapi
php_invoke: Enable module mbstring for cli sapi
php_invoke: Enable module opcache for cli sapi
php_invoke: Enable module xmlwriter for cli sapi
php_invoke: Enable module zip for cli sapi
php_invoke: Enable module curl for cli sapi
php_invoke: Enable module xml for cli sapi
php_invoke: Enable module sysvshm for cli sapi
php_invoke: Enable module pdo for cli sapi
php_invoke: Enable module sysvmsg for cli sapi
php_invoke: Enable module pdo_mysql for cli sapi
php_invoke: Enable module xmlrpc for cli sapi
php_invoke: Enable module dom for cli sapi
php_invoke: Enable module readline for cli sapi
php_invoke: Enable module tokenizer for cli sapi
php_invoke: Enable module wddx for cli sapi
php_invoke: Enable module sockets for cli sapi
php_invoke: Enable module xmlreader for cli sapi
php_invoke: Enable module mysqli for cli sapi
php_invoke: Enable module mysqlnd for cli sapi
php_invoke: Enable module imap for cli sapi
php_invoke: Enable module gd for cli sapi
php_invoke: Enable module fileinfo for cli sapi
php_invoke: Enable module sysvsem for cli sapi
php_invoke: Enable module posix for cli sapi
php_invoke: Enable module xsl for cli sapi
Processing triggers for man-db (2.7.6.1-2) ...
pi@raspberrypi:~ $ sudo apt install --reinstall php7.0-cgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dh-php imagemagick-6-common libexporter-tiny-perl liblist-moreutils-perl liblqr-1-0 libmagickcore-6.q16-3 libmagickwand-6.q16-3 libpcre3-dev libpcre32-3
libpcrecpp0v5 libssl-dev libssl-doc shtool xml2
Use 'sudo apt autoremove' to remove them.
Suggested packages:
php-pear
The following NEW packages will be installed:
php7.0-cgi
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/1,019 kB of archives.
After this operation, 6,174 kB of additional disk space will be used.
Selecting previously unselected package php7.0-cgi.
(Reading database ... 123352 files and directories currently installed.)
Preparing to unpack .../php7.0-cgi_7.0.33-0+deb9u3_armhf.deb ...
Unpacking php7.0-cgi (7.0.33-0+deb9u3) ...
Setting up php7.0-cgi (7.0.33-0+deb9u3) ...
update-alternatives: using /usr/bin/php-cgi7.0 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php7.0 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode

Creating config file /etc/php/7.0/cgi/php.ini with new version
php_invoke: Enable module exif for cgi sapi
php_invoke: Enable module intl for cgi sapi
php_invoke: Enable module simplexml for cgi sapi
php_invoke: Enable module iconv for cgi sapi
php_invoke: Enable module ctype for cgi sapi
php_invoke: Enable module gettext for cgi sapi
php_invoke: Enable module shmop for cgi sapi
php_invoke: Enable module ftp for cgi sapi
php_invoke: Enable module phar for cgi sapi
php_invoke: Enable module mcrypt for cgi sapi
php_invoke: Enable module calendar for cgi sapi
php_invoke: Enable module mbstring for cgi sapi
php_invoke: Enable module opcache for cgi sapi
php_invoke: Enable module xmlwriter for cgi sapi
php_invoke: Enable module zip for cgi sapi
php_invoke: Enable module curl for cgi sapi
php_invoke: Enable module xml for cgi sapi
php_invoke: Enable module sysvshm for cgi sapi
php_invoke: Enable module pdo for cgi sapi
php_invoke: Enable module sysvmsg for cgi sapi
php_invoke: Enable module pdo_mysql for cgi sapi
php_invoke: Enable module xmlrpc for cgi sapi
php_invoke: Enable module dom for cgi sapi
php_invoke: Enable module readline for cgi sapi
php_invoke: Enable module tokenizer for cgi sapi
php_invoke: Enable module wddx for cgi sapi
php_invoke: Enable module sockets for cgi sapi
php_invoke: Enable module xmlreader for cgi sapi
php_invoke: Enable module mysqli for cgi sapi
php_invoke: Enable module mysqlnd for cgi sapi
php_invoke: Enable module imap for cgi sapi
php_invoke: Enable module gd for cgi sapi
php_invoke: Enable module fileinfo for cgi sapi
php_invoke: Enable module sysvsem for cgi sapi
php_invoke: Enable module posix for cgi sapi
php_invoke: Enable module xsl for cgi sapi
Processing triggers for man-db (2.7.6.1-2) ...
pi@raspberrypi:~ $

Plus:

sudo phpenmod json sqlite3

sudo service lighttpd restart

php -m | grep 'json\|sqlite3'

readlink -f /etc/php/7.0/cgi/conf.d/20-json.ini

readlink -f /etc/php/7.0/cgi/conf.d/20-sqlite3.ini

pi@raspberrypi:~ $ sudo phpenmod json sqlite3
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo service lighttpd restart
pi@raspberrypi:~ $ php -m | grep 'json|sqlite3'
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_sqlite.so' - /usr/lib/php/20151012/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver in Unknown on line 0
json
sqlite3
pi@raspberrypi:~ $
pi@raspberrypi:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-json.ini
/etc/php/7.0/mods-available/json.ini
pi@raspberrypi:~ $
pi@raspberrypi:~ $ readlink -f /etc/php/7.0/cgi/conf.d/20-sqlite3.ini
/etc/php/7.0/mods-available/sqlite3.ini
pi@raspberrypi:~ $

deHakkelaar it has dropped in. Thank you very much.

If it is not to much trouble could you summarise what you think the issue was so i have a better understanding?

Regards

Dan

Its just a warning :wink:

Not sure, got stuck in versions and dependencies.
Other software installs might have done something like I noticed remnants of Apache.

deHakkelaar thank you again.

I had been running it as a web server a while ago and also as a VPN server.

you are a legend!!!!!!!!

Which comment should i mark as the resolution?

1 Like

This was probably solution:

sudo apt purge php7.0-json php7.0-sqlite3

sudo apt install php7.0-json php7.0-sqlite3

sudo apt install --reinstall php7.0-cli php7.0-cgi

sudo phpenmod json sqlite3

sudo service lighttpd restart

Cheers!

EDIT: For others that read this, it probably is sufficient to purge only the php7.0-json & php7.0-sqlite3 packages using dpkg -P and not pulling down other dependencies when running apt purge:

sudo dpkg -P php7.0-json php7.0-sqlite3

And try reinstall the two:

sudo apt install --reinstall php7.0-json php7.0-sqlite3

And proceed with the other steps above.

1 Like

9 posts were split to a new topic: Long Term Data Not Displaying

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.