Closed ScatterAdd closed 1 week ago
See what the /var/log/httpd/error_log file contains. See http://YOUR_SERVER_ADDRESS/phpsysinfo/xml.php
There is no output at /var/log/apache2/error.log which could show problems with phpsysinfo. The debug=true does not work and an entry ini_set('error_reporting', E_ALL); in the index.php file doesn't help. The 2nd link of your last message shows me: phpSysInfo requires the simplexml extension to php in order to work properly.
The phpsysinfo.ini contains DEBUG=true
The 1st link phpSysInfo requires the simplexml extension to php in order to work properly.
The 2nd link: phpSysInfo requires the simplexml extension to php in order to work properly.
the 3rd link phpSysInfo requires the simplexml extension to php in order to work properly.
the 4th link phpSysInfo requires the simplexml extension to php in order to work properly.
I tried to enhance the index.php with ini_set('error_reporting', E_ALL); right after the php opening tag but there are no error messages in /var/log/apache2/error.log
The access.log says this when I call the xml.php ip.ad.dr.ess - - [26/Apr/2024:10:20:47 +0200] "GET /phpsysinfo/xml.php HTTP/1.1" 200 2650 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0"
The error logging behavior with php8 changed. I'm writing regularly with php8.2. The error logging often contains nothing or extremely much. In this case nothing.
The SimpleXML is installed. As a linux unix user we know all, that simplexml is not the same than SimpleXML. There is no simplexml to install and I really don't know if this could be the problem.
Create test.php:
<?php
var_dump(extension_loaded("simplexml"));
var_dump(extension_loaded("SimpleXML"));
phpinfo();
http://YOUR_SERVER_ADDRESS/test.php
Paste the first line here, "PHP version", "Additional .ini files parsed" and SimpleXML block.
Here the output of the phpinfo() and a textfile with the php.ini content.
bool(false) bool(false) PHP Version 8.1.28 SimpleXML Sterling Hughes, Marcus Boerger, Rob Richards
Please check "Loaded Configuration File" Simplexml is not loaded so you probably have a different php.ini for php scripts in apache2. Add: extension=mbstring extension=xsl
Inside my old php.ini from php7.4 I not enabled mbstring, xsl and an added entry in the new 8.1.28 php.ini from apache wiith "extension=simplexml" shows at "systemctl restart apache2" this in the syslog:
PHP Warning: PHP Startup: Unable to load dynamic library 'simplexml' (tried: /usr/lib/php/20210902/simplexml (/usr/lib/php/20210902/simplexml: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/simplexml.so (/usr/lib/php/20210902/simplexml.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 'xsl' (tried: /usr/lib/php/20210902/xsl (/usr/lib/php/20210902/xsl: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/xsl.so (/usr/lib/php/20210902/xsl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: Module "mbstring" is already loaded in Unknown on line 0
php -i | grep simplexml PHP Warning: PHP Startup: Unable to load dynamic library 'xsl' (tried: /usr/lib/php/20230831/xsl (/usr/lib/php/20230831/xsl: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/xsl.so (/usr/lib/php/20230831/xsl.so: undefined symbol: dom_node_class_entry)) in Unknown on line 0 PHP Warning: Module "mbstring" is already loaded in Unknown on line 0 PHP Warning: Module "SimpleXML" is already loaded in Unknown on line 0 /etc/php/8.3/cli/conf.d/20-simplexml.ini,
php -m PHP Warning: PHP Startup: Unable to load dynamic library 'xsl' (tried: /usr/lib/php/20230831/xsl (/usr/lib/php/20230831/xsl: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/xsl.so (/usr/lib/php/20230831/xsl.so: undefined symbol: dom_node_class_entry)) in Unknown on line 0 PHP Warning: Module "mbstring" is already loaded in Unknown on line 0 PHP Warning: Module "SimpleXML" is already loaded in Unknown on line 0 [PHP Modules] calendar Core ctype curl date dom exif FFI fileinfo filter ftp gettext hash iconv json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix random readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zlib
[Zend Modules] Zend OPcache
Please check the php7.4 php.ini file below. The phpsysinfo worked fine with this php.ini and php7.4. php-ini-7.4.txt
I'm completely lost now. Enable test.php as I provided earlier. I'll check it out myself at http://linuxhost.no-ip.org/test.php
Is online again..
BTW from the menue at the left use the 2nd link (from top to bottom) called "System" to see the phpsysinfo page.
File /etc/php/8.1/apache2/conf.d/20-simplexml.ini is missing.
apt install php8.1-xml
My goodness it's working now. I installed php-xml and apt has choosen anything as "default". I thank you for your patience and help with this little problem. I hope this will work a few days later, when I upgrade the device to ubuntu 24.04 LTS Server.
Describe the bug The phpsysinfo3.4.3 does not work with php8 and later. I actually use php8.2
To Reproduce Copy the zip file content to the webservers doc root, change the option you need and call the page.
Expected behavior When called over the internet or network I expect a page the shows me some system information.
Desktop (please complete the following information): Ubuntu 20.04.06 LTS Server. I want to upgrade my server device to ubuntu 24.04. The new Ubuntu OS comes by default with php8.3
Devices be used: Raspberry Pi 4b
!! If you have any problems, please set
DEBUG
to true inphpsysinfo.ini
and include any error messages in your bug report / help request !!With php 8 and later there is no option to disable or enable php safe_mode. As far as I remember and I can see in new and old php.ini files I never saw an option to switch this on or off. I changed the phpsysinfo.ini debug option from false to true but there are no errors in the error logs only a notice at the page when called: phpSysInfo requires the simplexml extension to php in order to work properly.
php -m [PHP Modules] calendar, Core, ctype, curl, date, dom, exif, FFI, fileinfo, filter, ftp, gettext, hash, iconv, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, Phar, posix, random, readline, Reflection, session, shmop, SimpleXML, sockets, sodium, SPL, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zlib, [Zend Modules], Zend OPcache
apache2 -v Server version: Apache/2.4.41 (Ubuntu) Server built: 2024-04-10T17:46:26
Describe the solution you'd like There is possibly a problem with the php extension SimpleXML