screen shots attached. hope they shed light on the problem.
You're missing php packages:
At least php-json
and php-sqlite
Easiest would probably to run pihole -r
and choose repair
Thanks. But I have run pihole -r. A number of times. The same issue still happens.
Check if php7.3-json
and php7.3-sqlite3
are installed
dpkg -l php7.3-json
dpkg -l php7.3-sqlite3
If they are, reinstall them
sudo apt install --reinstall php7.3-json php7.3-sqlite3
And below one should enable the mods and create appropriate symlinks:
sudo phpenmod json sqlite3
And post outcome for below one just to be sure ?
php -m
after enabling the two mods, you most always have to restart the web daemon to apply:
sudo service lighttpd restart
(taken from SqLite3 and json_encode() fault - #12 by deHakkelaar, thanks to @deHakkelaar)
Thanks again. Both were installed but i reinstalled as requested. After restarting lighttpd still same issue. Output php -m. And web interface error attached
Regards
Peter
Could you post some more ?
php-cgi -v
update-alternatives --query php-cgi
phpquery -v 7.3 -s cgi -m sqlite3
phpquery -v 7.3 -s cgi -m json
apt list --installed '*php*'
Ps. Can you copy/paste text output instead of screenshots pls?
You can enclose the text output with the </>
button before posting here.
More convenient for us, cleaner to read and makes searching possible for others to find
I copy/pasted your output from that outputs.txt
file below and enclosed the code output with the </>
button for you:
pi@DNSserver:~ $ php-cgi -v
PHP 7.3.27-1~deb10u1 (cgi-fcgi) (built: Feb 13 2021 16:31:40)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.27-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
pi@DNSserver:~ $ update-alternatives --query php-cgi
Name: php-cgi
Link: /usr/bin/php-cgi
Slaves:
php-cgi.1.gz /usr/share/man/man1/php-cgi.1.gz
Status: auto
Best: /usr/bin/php-cgi7.3
Value: /usr/bin/php-cgi7.3
Alternative: /usr/bin/php-cgi7.3
Priority: 73
Slaves:
php-cgi.1.gz /usr/share/man/man1/php-cgi7.3.1.gz
pi@DNSserver:~ $ phpquery -v 7.3 -s cgi -m sqlite3
sqlite3 (Enabled for cgi by local administrator)
pi@DNSserver:~ $ phpquery -v 7.3 -s cgi -m sqlite3
sqlite3 (Enabled for cgi by local administrator)
pi@DNSserver:~ $ apt list --installed '*php*'
Listing... Done
php-cgi/stable,now 2:7.3+69 all [installed]
php-common/stable,now 2:69 all [installed]
php-intl/stable,now 2:7.3+69 all [installed]
php-json/stable,now 2:7.3+69 all [installed]
php-sqlite3/stable,now 2:7.3+69 all [installed]
php-xml/stable,now 2:7.3+69 all [installed]
php7.3-cgi/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-cli/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-common/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-intl/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-json/stable,now 7.3.27-1~deb10u1 armhf [installed]
php7.3-opcache/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-readline/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-sqlite3/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
php7.3-xml/stable,now 7.3.27-1~deb10u1 armhf [installed,automatic]
pi@DNSserver:~ $
Output for below one was missing though but output for that one seems irrelevant now:
I cant see anything wrong from the output.
Only thing wrong is the output for the php -m
command doesnt list those two installed PHP modules json
& sqlite3
.
Could you post output for below ones (need to install the tree
command with sudo apt install tree
) ?
php-cgi -m
grep php-cgi -R /etc/lighttpd/
tree /etc/php/7.3/
tree /etc/lighttpd/
Did you make any other alterations besides changing the lighttpd
port ?
Why did you alter the lighttpd
port ?
Do you have any other software installed besides Pi-hole that might have altered things ?
hello. thanks for the support.
not sure what this </> button is but I copy / paste the outputs requested below.
I installed Raspbian, then pihole. nothing else. changed the port from 80 to 8100 as I had read that online somewhere. then realised that updates overrode it, so pointless. now running on port 80 and working well other than no stats on the web interface.
Hope these outputs help the diagnosis.
regards
Peter
pi@DNSserver:~ $ php-cgi -m
[PHP Modules]
calendar
cgi-fcgi
Core
ctype
date
dom
exif
fileinfo
filter
ftp
gettext
hash
iconv
intl
libxml
openssl
pcntl
pcre
PDO
Phar
posix
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
pi@DNSserver:~ $ grep php-cgi -R /etc/lighttpd
/etc/lighttpd/conf-enabled/15-fastcgi-php.conf: "bin-path" => "/usr/bin/php-cgi",
/etc/lighttpd/conf-available/15-fastcgi-php.conf: "bin-path" => "/usr/bin/php-cgi",
pi@DNSserver:~ $
pi@DNSserver:~ $ tree /etc/php/7.3/
/etc/php/7.3/
|-- cgi
| |-- conf.d
| | |-- 10-opcache.ini -> /etc/php/7.3/mods-available/opcache.ini
| | |-- 10-pdo.ini -> /etc/php/7.3/mods-available/pdo.ini
| | |-- 15-xml.ini -> /etc/php/7.3/mods-available/xml.ini
| | |-- 20-calendar.ini -> /etc/php/7.3/mods-available/calendar.ini
| | |-- 20-ctype.ini -> /etc/php/7.3/mods-available/ctype.ini
| | |-- 20-dom.ini -> /etc/php/7.3/mods-available/dom.ini
| | |-- 20-exif.ini -> /etc/php/7.3/mods-available/exif.ini
| | |-- 20-fileinfo.ini -> /etc/php/7.3/mods-available/fileinfo.ini
| | |-- 20-ftp.ini -> /etc/php/7.3/mods-available/ftp.ini
| | |-- 20-gettext.ini -> /etc/php/7.3/mods-available/gettext.ini
| | |-- 20-iconv.ini -> /etc/php/7.3/mods-available/iconv.ini
| | |-- 20-intl.ini -> /etc/php/7.3/mods-available/intl.ini
| | |-- 20-json.ini -> /etc/php/7.3/mods-available/json.ini
| | |-- 20-pdo_sqlite.ini -> /etc/php/7.3/mods-available/pdo_sqlite.ini
| | |-- 20-phar.ini -> /etc/php/7.3/mods-available/phar.ini
| | |-- 20-posix.ini -> /etc/php/7.3/mods-available/posix.ini
| | |-- 20-readline.ini -> /etc/php/7.3/mods-available/readline.ini
| | |-- 20-shmop.ini -> /etc/php/7.3/mods-available/shmop.ini
| | |-- 20-simplexml.ini -> /etc/php/7.3/mods-available/simplexml.ini
| | |-- 20-sockets.ini -> /etc/php/7.3/mods-available/sockets.ini
| | |-- 20-sqlite3.ini -> /etc/php/7.3/mods-available/sqlite3.ini
| | |-- 20-sysvmsg.ini -> /etc/php/7.3/mods-available/sysvmsg.ini
| | |-- 20-sysvsem.ini -> /etc/php/7.3/mods-available/sysvsem.ini
| | |-- 20-sysvshm.ini -> /etc/php/7.3/mods-available/sysvshm.ini
| | |-- 20-tokenizer.ini -> /etc/php/7.3/mods-available/tokenizer.ini
| | |-- 20-wddx.ini -> /etc/php/7.3/mods-available/wddx.ini
| | |-- 20-xmlreader.ini -> /etc/php/7.3/mods-available/xmlreader.ini
| | |-- 20-xmlwriter.ini -> /etc/php/7.3/mods-available/xmlwriter.ini
| | -- 20-xsl.ini -> /etc/php/7.3/mods-available/xsl.ini |
-- php.ini
|-- cli
| |-- conf.d
| | |-- 10-opcache.ini -> /etc/php/7.3/mods-available/opcache.ini
| | |-- 10-pdo.ini -> /etc/php/7.3/mods-available/pdo.ini
| | |-- 15-xml.ini -> /etc/php/7.3/mods-available/xml.ini
| | |-- 20-calendar.ini -> /etc/php/7.3/mods-available/calendar.ini
| | |-- 20-ctype.ini -> /etc/php/7.3/mods-available/ctype.ini
| | |-- 20-dom.ini -> /etc/php/7.3/mods-available/dom.ini
| | |-- 20-exif.ini -> /etc/php/7.3/mods-available/exif.ini
| | |-- 20-fileinfo.ini -> /etc/php/7.3/mods-available/fileinfo.ini
| | |-- 20-ftp.ini -> /etc/php/7.3/mods-available/ftp.ini
| | |-- 20-gettext.ini -> /etc/php/7.3/mods-available/gettext.ini
| | |-- 20-iconv.ini -> /etc/php/7.3/mods-available/iconv.ini
| | |-- 20-intl.ini -> /etc/php/7.3/mods-available/intl.ini
| | |-- 20-json.ini -> /etc/php/7.3/mods-available/json.ini
| | |-- 20-pdo_sqlite.ini -> /etc/php/7.3/mods-available/pdo_sqlite.ini
| | |-- 20-phar.ini -> /etc/php/7.3/mods-available/phar.ini
| | |-- 20-posix.ini -> /etc/php/7.3/mods-available/posix.ini
| | |-- 20-readline.ini -> /etc/php/7.3/mods-available/readline.ini
| | |-- 20-shmop.ini -> /etc/php/7.3/mods-available/shmop.ini
| | |-- 20-simplexml.ini -> /etc/php/7.3/mods-available/simplexml.ini
| | |-- 20-sockets.ini -> /etc/php/7.3/mods-available/sockets.ini
| | |-- 20-sqlite3.ini -> /etc/php/7.3/mods-available/sqlite3.ini
| | |-- 20-sysvmsg.ini -> /etc/php/7.3/mods-available/sysvmsg.ini
| | |-- 20-sysvsem.ini -> /etc/php/7.3/mods-available/sysvsem.ini
| | |-- 20-sysvshm.ini -> /etc/php/7.3/mods-available/sysvshm.ini
| | |-- 20-tokenizer.ini -> /etc/php/7.3/mods-available/tokenizer.ini
| | |-- 20-wddx.ini -> /etc/php/7.3/mods-available/wddx.ini
| | |-- 20-xmlreader.ini -> /etc/php/7.3/mods-available/xmlreader.ini
| | |-- 20-xmlwriter.ini -> /etc/php/7.3/mods-available/xmlwriter.ini
| | -- 20-xsl.ini -> /etc/php/7.3/mods-available/xsl.ini |
-- php.ini
-- mods-available |-- calendar.ini |-- ctype.ini |-- dom.ini |-- exif.ini |-- fileinfo.ini |-- ftp.ini |-- gettext.ini |-- iconv.ini |-- intl.ini |-- json.ini |-- opcache.ini |-- pdo.ini |-- pdo_sqlite.ini |-- phar.ini |-- posix.ini |-- readline.ini |-- shmop.ini |-- simplexml.ini |-- sockets.ini |-- sqlite3.ini |-- sysvmsg.ini |-- sysvsem.ini |-- sysvshm.ini |-- tokenizer.ini |-- wddx.ini |-- xml.ini |-- xmlreader.ini |-- xmlwriter.ini
-- xsl.ini
5 directories, 89 files
pi@DNSserver:~ $
pi@DNSserver:~ $ tree /etc/lighttpd/
/etc/lighttpd/
|-- conf-available
| |-- 05-auth.conf
| |-- 10-accesslog.conf
| |-- 10-cgi.conf
| |-- 10-dir-listing.conf
| |-- 10-evasive.conf
| |-- 10-evhost.conf
| |-- 10-expire.conf
| |-- 10-fastcgi.conf
| |-- 10-flv-streaming.conf
| |-- 10-no-www.conf
| |-- 10-proxy.conf
| |-- 10-rewrite.conf
| |-- 10-rrdtool.conf
| |-- 10-simple-vhost.conf
| |-- 10-sockproxy.conf
| |-- 10-ssi.conf
| |-- 10-ssl.conf
| |-- 10-status.conf
| |-- 10-userdir.conf
| |-- 10-usertrack.conf
| |-- 11-extforward.conf
| |-- 15-fastcgi-php.conf
| |-- 90-debian-doc.conf
| |-- 90-javascript-alias.conf
| |-- 99-unconfigured.conf
| -- README |-- conf-enabled | |-- 10-fastcgi.conf -> ../conf-available/10-fastcgi.conf | |-- 15-fastcgi-php.conf -> ../conf-available/15-fastcgi-php.conf |
-- 90-javascript-alias.conf -> ../conf-available/90-javascript-alias.conf
|-- external.conf
|-- lighttpd.conf
`-- lighttpd.conf.orig
2 directories, 32 files
pi@DNSserver:~ $
The idea is to copy/paste the output here to Discourse, select the output code with your mouse, and use below </>
button to format the output so it doesnt get mangled after posting like it is now:
Could you edit your posting above to do that to clear up the mangled bits pls ?
Other than that, I see above config file present that does not come with a "standard" lite install of Raspbian/Pi-OS plus Pi-hole:
pi@ph5:~ $ apt-file search 90-javascript-alias.conf
javascript-common: /etc/lighttpd/conf-available/90-javascript-alias.conf
pi@ph5:~ $ apt policy javascript-common
javascript-common:
Installed: (none)
[..]
Whats in it ?
cat /etc/lighttpd/conf-available/90-javascript-alias.conf
Try disabling that configuration file with below:
sudo lighty-disable-mod javascript-alias
Validate its gone:
ls -1 /etc/lighttpd/conf-enabled/
Apply by running below:
sudo service lighttpd force-reload
And test the web GUI.
EDIT: if didnt fix, you can revert enabling it again by doing:
sudo lighty-enable-mod javascript-alias
sudo service lighttpd force-reload
I have a lot to learn, clearly
Anyway. Disabled the offending config file and restarted lighttpd. The gui still doesnt work.
Regards
Peter
Í'm out of ideas except one.
Uninstall/purge them all with below and start fresh:
sudo apt purge javascript-common lighttpd php-cgi php-common php-intl php-json php-sqlite3 php-xml php7.3-cgi php7.3-cli php7.3-common php7.3-intl php7.3-json php7.3-opcache php7.3-readline php7.3-sqlite3 php7.3-xml
When purging, take note of any files or folders not being removed for some reason and post them here!
If you run below one afterwards and select repair, Pi-hole will try reinstall the lighttpd
& PHP dependencies again and configure them for use:
pihole -r
<
dpkg: warning: while removing lighttpd, directory '/var/www/html' not empty so not removed
Purging configuration files for javascript-common (11) ...
dpkg: warning: while removing javascript-common, directory '/etc/lighttpd' not empty so not removed
Purging configuration files for php-common (2:69) ...
Purging configuration files for php7.3-sqlite3 (7.3.27-1~deb10u1) ...
Purging configuration files for php7.3-json (7.3.27-1~deb10u1) ...
Purging configuration files for php7.3-readline (7.3.27-1~deb10u1) ...
Purging configuration files for php7.3-common (7.3.27-1~deb10u1) ...
dpkg: warning: while removing php7.3-common, directory '/etc/php/7.3/mods-available' not empty so not removed
Purging configuration files for php7.3-intl (7.3.27-1~deb10u1) ...
Purging configuration files for php7.3-xml (7.3.27-1~deb10u1) ...
Purging configuration files for php7.3-cli (7.3.27-1~deb10u1) ...
dpkg: warning: while removing php7.3-cli, directory '/etc/php/7.3' not empty so not removed
Purging configuration files for php7.3-opcache (7.3.27-1~deb10u1) ...
Processing triggers for systemd (241-7~deb10u6+rpi1) ...
ran pihole -r and VOILA ! I have the web gui working. wonderful graphs etc. so pleased, many thanks for your help
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.