romanlum / LoxBerry-Plugin-Zigbee2Mqtt

Apache License 2.0
10 stars 3 forks source link

Zigbee2mqtt not working due to missing php include path #34

Closed christophmoar closed 11 months ago

christophmoar commented 1 year ago

Hi, test setup:

After the installation the admin screen is not capable of reading/writing the configuration.yaml file, thus the server is not starting etc. Checking apache error log it is due to the include path not being complete and loading of loxberry_system.php fails. The system directory /opt/loxberry/libs/phplib is not included in the php include path

Solution 1: I added include_path = ".:/usr/share/php:/opt/loxberry/libs/phplib"

In these files:

/etc/php/7.4/cli/php.ini
/etc/php/7.4/cgi/php.ini
/etc/php/7.4/apache2/php.ini

After this modification installation and configuration will work out.

Other solutions: You could use loxberrys jsonrpc to get system data; Or you could use a .htaccess file to setup the php include path; Or maybe loxberry developers need to be contacted to have /opt/loxberry/libs/phplib included by default - I don't know.

romanlum commented 1 year ago

thanks for the bug report i will have a look

romanlum commented 1 year ago

@christophmoar i installed loxberry 3.0 on dietpi on a x64 vm and i had no problem with the include path. which loxberry version did you have? I used the current V3.0.0.3

christophmoar commented 1 year ago

oh :( sorry about that, I currently have LoxBerry V3.0.0.0 (should update soon, didn't do a safe backup yet), maybe it's something already solved in 3.0.0.x? sorry about the noise, then.