OCSInventory-NG / OCSInventory-Docker-Image

Docker image for OCSInventory Server
GNU General Public License v3.0
80 stars 97 forks source link

Extension installation doesn't work #122

Open fgn-itsupport opened 1 month ago

fgn-itsupport commented 1 month ago

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Docker host's operating system : Debian Mysql Server version : latest

Docker informations

Docker compose version : latest Docker version : latest

Problem's description

If I copy any extension into the /../.ocsinventory/extensions folder mapped via docker-compose.yml it does not get recognised in the webUI:

[Wed Oct 23 13:54:52.359617 2024] [php:error] [pid 72] [client 172.20.0.4:51130] PHP Fatal error: Cannot redeclare extension_install_vmware_vcenter() (previously declared in /usr/share/ocsinventory-reports/ocsreports/extensions/_data/install.php:29) in /usr/share/ocsinventory-reports/ocsreports/extensions/vmwareVcenter/install.php on line 27, referer: http://fgn-dockerservices-iv.fgn.local/ocsreports/index.php 172.20.0.4 - - [23/Oct/2024:13:54:52 +0200] "GET /ocsreports/index.php?function=extensionmanager HTTP/1.0" 200 2293 "http://fgn-dockerservices-iv.fgn.local/ocsreports/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" [Wed Oct 23 13:54:52.765257 2024] [php:error] [pid 70] [client 172.20.0.4:51138] PHP Fatal error: Cannot redeclare extension_install_vmware_vcenter() (previously declared in /usr/share/ocsinventory-reports/ocsreports/extensions/_data/install.php:29) in /usr/share/ocsinventory-reports/ocsreports/extensions/vmwareVcenter/install.php on line 27 172.20.0.4 - - [23/Oct/2024:13:54:52 +0200] "GET /ocsreports/index.php?function=extensionmanager HTTP/1.0" 200 2296 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" [Wed Oct 23 13:54:52.959064 2024] [php:error] [pid 81] [client 172.20.0.4:51148] PHP Fatal error: Cannot redeclare extension_install_vmware_vcenter() (previously declared in /usr/share/ocsinventory-reports/ocsreports/extensions/_data/install.php:29) in /usr/share/ocsinventory-reports/ocsreports/extensions/vmwareVcenter/install.php on line 27 172.20.0.4 - - [23/Oct/2024:13:54:52 +0200] "GET /ocsreports/index.php?function=extensionmanager HTTP/1.0" 200 2296 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"

Those are errors which I get, when I copy it directly to .../extensions/_data

and these are the errors when I just put it into .../extensions:

[Wed Oct 23 13:54:42.551331 2024] [php:error] [pid 71] [client 172.20.0.4:51040] PHP Fatal error: Cannot redeclare extension_install_vmware_vcenter() (previously declared in /usr/share/ocsinventory-reports/ocsreports/extensions/_data/install.php:29) in /usr/share/ocsinventory-reports/ocsreports/extensions/vmwareVcenter/install.php on line 27, referer: http://fgn-dockerservices-iv.fgn.local/ocsreports/index.php?function=debug&head=1 172.20.0.4 - - [23/Oct/2024:13:54:42 +0200] "GET /ocsreports/index.php?function=extensionmanager HTTP/1.0" 200 2294 "http://fgn-dockerservices-iv.fgn.local/ocsreports/index.php?function=debug&head=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" [Wed Oct 23 13:54:42.853208 2024] [php:error] [pid 69] [client 172.20.0.4:51050] PHP Fatal error: Cannot redeclare extension_install_vmware_vcenter() (previously declared in /usr/share/ocsinventory-reports/ocsreports/extensions/_data/install.php:29) in /usr/share/ocsinventory-reports/ocsreports/extensions/vmwareVcenter/install.php on line 27 172.20.0.4 - - [23/Oct/2024:13:54:42 +0200] "GET /ocsreports/index.php?function=extensionmanager HTTP/1.0" 200 2297 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" [Wed Oct 23 13:54:42.998763 2024] [php:error] [pid 72] [client 172.20.0.4:51058] PHP Fatal error: Cannot redeclare extension_install_vmware_vcenter() (previously declared in /usr/share/ocsinventory-reports/ocsreports/extensions/_data/install.php:29) in /usr/share/ocsinventory-reports/ocsreports/extensions/vmwareVcenter/install.php on line 27 172.20.0.4 - - [23/Oct/2024:13:54:42 +0200] "GET /ocsreports/index.php?function=extensionmanager HTTP/1.0" 200 2295 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" 172.20.0.4 - - [23/Oct/2024:13:54:44 +0200] "POST /ocsreports/index.php HTTP/1.0" 200 2112 "http://fgn-dockerservices-iv.fgn.local/ocsreports/index.php?function=extensionmanager" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" 172.20.0.4 - - [23/Oct/2024:13:54:46 +0200] "GET /ocsreports/themes/OCS/logo.png HTTP/1.0" 304 243 "http://fgn-dockerservices-iv.fgn.local/ocsreports/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" 172.20.0.4 - - [23/Oct/2024:13:54:46 +0200] "GET /ocsreports/image/bootstrap-formhelpers-countries.flags.png HTTP/1.0" 304 242 "http://fgn-dockerservices-iv.fgn.local/ocsreports/css/bootstrap-formhelpers.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" 172.20.0.4 - - [23/Oct/2024:13:54:46 +0200] "GET /ocsreports/index.php HTTP/1.0" 200 2114 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"

Aside from that, the Wiki pages state that python3 has to be installed and pip3 scp module as well. Both needed to be done manully inside the container. Is there a reason, why those things are missing?