Page 65 of 76
Re: Pass2PHP
Posted: Thursday 14 May 2020 22:26
by ropske
waaren wrote: ↑Thursday 14 May 2020 22:18
ropske wrote: ↑Thursday 14 May 2020 22:02
seems it must be installed from source on debian buster:
sudo apt install phpmyadmin should do it.
stijn@debian:~$ sudo apt install phpmyadmin
[sudo] password for stijn:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package phpmyadmin
Re: Pass2PHP
Posted: Thursday 14 May 2020 22:45
by Trigun
Why do you want to install MySQL? Mariadb is also working since MySQL is deprecated in buster. If I remember tomorrow morning I’ll post my “how to” for buster I also have a “how to” for setting up domoticz on a vm. I’ll share it so hopefully it will help you
Sent from my iPhone using Tapatalk
Re: Pass2PHP
Posted: Thursday 14 May 2020 22:50
by ropske
Trigun wrote: ↑Thursday 14 May 2020 22:45
Why do you want to install MySQL? Mariadb is also working since MySQL is deprecated in buster. If I remember tomorrow morning I’ll post my “how to” for buster I also have a “how to” for setting up domoticz on a vm. I’ll share it so hopefully it will help you
Sent from my iPhone using Tapatalk
thank you so much mate!
Re: Pass2PHP
Posted: Friday 15 May 2020 6:52
by Egregius
Several users have wrote their how-to's in this topic. They're linked from the readme at Github:
https://github.com/Egregius/PHP-Floorpl ... r-Domoticz
I never use a full image, only the net installer. It's easier to add what you need than to remove what you don't need.
https://cdimage.debian.org/debian-cd/cu ... etinst.iso
Btw, phpmyadmin can be installed by downloading a zip file from
https://www.phpmyadmin.net/downloads/
That way you have control where it's installed and you can secure it. Definitely don't expose phpmyadmin to the internet. I have it my secure folder wich is secured in the virtual hosts file of Apache2:
Code: Select all
<Directory /var/www/html/secure>
order deny,allow
allow from 127.0.0.1
SetEnvIf X-Forwarded-For ^192\.168\.2\.50 allow
SetEnvIf X-Forwarded-For ^192\.168\.2\.51 allow
Allow from env=allow
allow from 192.168.2.20
allow from 192.168.2.50
Deny from All
AllowOverride None
</Directory>
The "SetEnvIf X-Forwarded-For" is needed because I access the webserver thru HAProxy.
A great advantage you have now is that you can easily run a second VM to try stuff without messing up the first one.
Re: Pass2PHP
Posted: Saturday 16 May 2020 7:37
by ropske
Trigun wrote: ↑Thursday 14 May 2020 22:45
Why do you want to install MySQL? Mariadb is also working since MySQL is deprecated in buster. If I remember tomorrow morning I’ll post my “how to” for buster I also have a “how to” for setting up domoticz on a vm. I’ll share it so hopefully it will help you
Sent from my iPhone using Tapatalk
You found anything for me mate?
Is it the same for Debian Buster as for other Debian releases? Else i can follow the other tutorials.
Re: Pass2PHP
Posted: Saturday 16 May 2020 11:41
by Trigun
Crap!! Sorry totally forgot!! Damn!! I’ll make a note and send it over ASAP!
Sent from my iPhone using Tapatalk
Re: Pass2PHP
Posted: Saturday 16 May 2020 17:49
by Trigun
Ok, here they are.
Just use whatever you need, hope it helps.
Cheers!
Re: Pass2PHP
Posted: Sunday 17 May 2020 8:42
by ropske
Trigun wrote: ↑Saturday 16 May 2020 17:49
Ok, here they are.
Just use whatever you need, hope it helps.
Cheers!
hi mate, thanks a lot.
i've done everything like in your manuals, except phpmyadmin is not working, gonna recheck, retry again.
Re: Pass2PHP
Posted: Sunday 17 May 2020 19:08
by Trigun
it should work. bare in mind that it is a combination of the PHPMyadmin "how-to" file and the pass2php "how-to" file.
Re: Pass2PHP
Posted: Monday 18 May 2020 21:49
by ropske
ok, yesterday it phpmyadmin worked fine,
today after a reboot of my nuc, its not working anymore; i get this:
403 Forbidden
nginx/1.14.2
LEMP(nginx) or LAMP(apache) must be installed?
Pass2PHP
Posted: Monday 18 May 2020 22:26
by Trigun
ropske wrote:ok, yesterday it phpmyadmin worked fine,
today after a reboot of my nuc, its not working anymore; i get this:
403 Forbidden
nginx/1.14.2
LEMP(nginx) or LAMP(apache) must be installed?
Please check the php configs again and or set the correct rights. It has to do with one of those. You followed the instructions correct?
Also if you followed the instructions you’ll see that it’s based on nginx and not apache2. Just follow the instructions to the letter and you’ll be fine.
Sent from my iPhone using Tapatalk
Re: Pass2PHP
Posted: Monday 18 May 2020 22:30
by Egregius
Both should work just fine. I prefer Apache2.
Something to do with config file of your webserver.
Re: Pass2PHP
Posted: Monday 18 May 2020 23:28
by ropske
hmmm, strange, seems apache is not running:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-05-18 23:26:57 CEST; 18s ago
Docs:
https://httpd.apache.org/docs/2.4/
Process: 975 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
May 18 23:26:57 debian apachectl[975]: AH00558: apache2: Could not reliably determine the server's fully qualified domain na
May 18 23:26:57 debian apachectl[975]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
May 18 23:26:57 debian apachectl[975]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
May 18 23:26:57 debian apachectl[975]: no listening sockets available, shutting down
May 18 23:26:57 debian apachectl[975]: AH00015: Unable to open logs
May 18 23:26:57 debian apachectl[975]: Action 'start' failed.
May 18 23:26:57 debian apachectl[975]: The Apache error log may have more information.
May 18 23:26:57 debian systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
May 18 23:26:57 debian systemd[1]: apache2.service: Failed with result 'exit-code'.
May 18 23:26:57 debian systemd[1]: Failed to start The Apache HTTP Server.
Re: Pass2PHP
Posted: Tuesday 19 May 2020 0:05
by ropske
ok, problem solved; for the people who have the same issue:
i had nginx and apache both installed,
so i now deinstalled nginx by doing this:
sudo apt-get remove nginx nginx-common
sudo apt-get purge nginx nginx-common
sudo apt-get autoremove
then i restarted apache server:
sudo systemctl start apache2
and by checking the status again:
sudo systemctl status apache2
i had this result now:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-05-19 00:02:50 CEST; 2min 41s ago
Docs:
https://httpd.apache.org/docs/2.4/
Process: 2686 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 2690 (apache2)
Tasks: 11 (limit: 4689)
Memory: 49.8M
CGroup: /system.slice/apache2.service
├─2690 /usr/sbin/apache2 -k start
├─2692 /usr/sbin/apache2 -k start
├─2693 /usr/sbin/apache2 -k start
├─2695 /usr/sbin/apache2 -k start
├─2699 /usr/sbin/apache2 -k start
├─2700 /usr/sbin/apache2 -k start
├─2701 /usr/sbin/apache2 -k start
├─2702 /usr/sbin/apache2 -k start
├─2703 /usr/sbin/apache2 -k start
├─2704 /usr/sbin/apache2 -k start
└─2705 /usr/sbin/apache2 -k start
so running again

Re: Pass2PHP
Posted: Tuesday 19 May 2020 3:04
by Egregius
Omg, how did you even manage to install both?
apt should remove nginx if you try to install Apache2 and reverse.
As always: look in the logfiles. In 99% of the problems it’s in there.
Re: Pass2PHP
Posted: Tuesday 19 May 2020 6:32
by ropske
i first followed the guide from Trigun where it installs nginx
then my fault:
to install phpmyadmin, i followed also the latest guide from trigun to install phpmyadmin on buster, but it did not work, then i google'ed and found a website from linuxbabe where it also shows step by step how to install phpmyadmin on debian buster.
But there where 2 site; one for LEMP and one for LAMP, so i choose the wrong one and it was LAMP (apache)
then yesterday evening, for some reason, my domoticz was not responding, so i rebooted my VM and then all problems started
gladly its all solved, but yeah, i dont know that much of linux, so i don't know why i was able to install nginx and apache together
gladly we have some free days now here in belgium starting from tomorrow evening so i can begin to reprogram my house again
one more question, i see some directorys in domoticz have owner '2000' instead of root or me, so for now i cant copy the file: 'script_device_pass2php.lua' to the scripts directory.
Any idea how this was possible?
Thank you!
Re: Pass2PHP
Posted: Tuesday 19 May 2020 7:00
by Trigun
ropske wrote:i first followed the guide from Trigun where it installs nginx
then my fault:
to install phpmyadmin, i followed also the latest guide from trigun to install phpmyadmin on buster, but it did not work, then i google'ed and found a website from linuxbabe where it also shows step by step how to install phpmyadmin on debian buster.
But there where 2 site; one for LEMP and one for LAMP, so i choose the wrong one and it was LAMP (apache)
then yesterday evening, for some reason, my domoticz was not responding, so i rebooted my VM and then all problems started
gladly its all solved, but yeah, i dont know that much of linux, so i don't know why i was able to install nginx and apache together
gladly we have some free days now here in belgium starting from tomorrow evening so i can begin to reprogram my house again
one more question, i see some directorys in domoticz have owner '2000' instead of root or me, so for now i cant copy the file: 'script_device_pass2php.lua' to the scripts directory.
Any idea how this was possible?
Thank you!
It’s a common issue. When you install phpmyadmin it also installs apache2. Had the same issue a while back. Somehow it’s in a package or something.Therefore I added the deletion of apache2 in the how to. Only if you use Nginx ofcourse. Good stuff you found it!
Sent from my iPhone using Tapatalk
Re: Pass2PHP
Posted: Tuesday 19 May 2020 12:43
by ropske
Sorry i'm here again
i want to copy the file: script_device_pass2php.lua to the scripts/lua directory in domoticz, but it fails:

- 2020-05-19 12_41_37-Window.jpg (109.37 KiB) Viewed 1502 times
anyone knows why?
thank you!
Running domoticz on a VM on proxmox
Re: Pass2PHP
Posted: Tuesday 19 May 2020 12:46
by Trigun
ropske wrote:Sorry i'm here again
i want to copy the file: script_device_pass2php.lua to the scripts/lua directory in domoticz, but it fails:
2020-05-19 12_41_37-Window.jpg
anyone knows why?
thank you!
Running domoticz on a VM on proxmox
Yes, there is a permission issue. Just set your permissions to 777 -R on the scripts folder. The “-R” will help you to set the permissions recursively. Hope this helps
Sent from my iPhone using Tapatalk
Re: Pass2PHP
Posted: Tuesday 19 May 2020 13:14
by ropske
Trigun wrote: ↑Tuesday 19 May 2020 12:46
ropske wrote:Sorry i'm here again
i want to copy the file: script_device_pass2php.lua to the scripts/lua directory in domoticz, but it fails:
2020-05-19 12_41_37-Window.jpg
anyone knows why?
thank you!
Running domoticz on a VM on proxmox
Yes, there is a permission issue. Just set your permissions to 777 -R on the scripts folder. The “-R” will help you to set the permissions recursively. Hope this helps
Sent from my iPhone using Tapatalk
Correct mate, its working.
I'm just gonna write down everything i've done

Just in case i need to reinstall it again lol
Is there any reason why the scripts folder has not the correct rights? or has it allways been like this?
@Egrerius, you backup your complete VM to a nas then?