Closed Jabbl closed 10 months ago
Hello @Jabbl,
in order to reproduce the issue we have the following questions:
php -i
Since the WBM-request returns a PHP script and PHP should be interpreted by the webserver by default, we would like to ask you to perform some checks on the device:
opkg list-installed | grep php
/etc/lighttpd/lighttpd.conf
)mod_cgi
and include_shell "cat fastcgi.confd/*.conf 2>/dev/null ||:"
/etc/lighttpd/fastcgi.confd/php.conf
)This file should look like
fastcgi.map-extensions = ( ".html" => ".php" )
$SERVER["socket"] =~ default_sockets {
$HTTP["url"] =~ "\.php$" {
fastcgi.server += (
".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi",
"min-procs" => 1,
"max-procs" => 2,
"max-load-per-proc" => 8,
"idle-timeout" => 50,
# Fix PATH_INFO for PHP scripts that rely on it (like Wordpress).
"broken-scriptfilename" => "enable"
)
)
)
}
}
I've used WAGO Ethernet Settings with a service cable to adjust the device to use a static IP-address.\
URL: 10.50.1.25
\
Note: The favicon shows correctly, the title of the tab is Web-based Management
and I am correctly redirected to 10.50.1.25/wbm/
.
php -i
: php-i.txt
Other commands:
> root@PFC200V3-5FAA98:~ opkg list-installed | grep php
php-pam - 2.2.4
php-selection - 1.2.0
php8 - 8.1.16+wago2
> root@PFC200V3-5FAA98:~ cat /etc/lighttpd/lighttpd.conf | grep "mod_cgi" -B 4
server.modules = (
"mod_access",
"mod_accesslog",
"mod_auth",
"mod_cgi",
> root@PFC200V3-5FAA98:~ cat /etc/lighttpd/lighttpd.conf | grep "include_shell"
include_shell "cat fastcgi.confd/*.conf 2>/dev/null ||:"
> root@PFC200V3-5FAA98:~ cat /etc/lighttpd/fastcgi.confd/php.conf
cat: can't open '/etc/lighttpd/fastcgi.confd/php.conf': No such file or directory
> root@PFC200V3-5FAA98:~ cat /etc/lighttpd/fastcgi.confd/param-service.conf
$SERVER["socket"] =~ default_sockets {
fastcgi.server += (
"/wda" =>
((
"socket" => "/tmp/paramserv.fcgi.socket",
"check-local" => "disable"
)),
"/files" =>
((
"socket" => "/tmp/paramserv.files.fcgi.socket",
"check-local" => "disable"
))
)
}
Since php.conf
is missing I decided to check the ptxconf
file and compare it to the one on Github.\
I then noticed that option PTXCONF_LIGHTTPD_MOD_FASTCGI_PHP
was disabled in my configuration, even though I never remember unselecting it.
The only change I remember doing is enabling jq
, as I wanted that tool to be available to me, but maybe opening the ptxdist menu changed some other settings in the background?
I've now re-enabled PTXCONF_LIGHTTPD_MOD_FASTCGI_PHP
and will try again.
With PTXCONF_LIGHTTPD_MOD_FASTCGI_PHP
re-enabled the WBM now responds correctly.\
I'm not sure what caused this to be disabled in the first place, but at least it works correctly now.
I've compiled FW25 according to the instructions, but encounter issues when trying to navigate to the device.
The console log of the browser gives an error
The PLC has no source map for the
pfc.js
file, which means debugging is quite hard, but it looks to me like the WBM tries loading eitherinfos.php
orlogin_data.php
as JSON and therefore throws since PHP-files start with<?php
.Full browser stack trace:
Device type: 750-8212 Device name:
PFC200V3-5FAA98
Browser: Tested Chrome, Edge and Firefox