Pass2PHP

simon_rb
Posts: 660
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Pass2PHP

Post by simon_rb » Sunday 13 August 2017 0:50

Egregius wrote:
Saturday 12 August 2017 17:35
Hi Simon,

The code at github should be pretty recent, will update it in a few minutes with my latest code and scripts.
The installation in the wiki should be a good starting point, not very detailed...
https://github.com/Egregius/LUA-Pass2PH ... stallation
Hey, Thanks.

I tried to run

Code: Select all

sudo apt-get install php7.0 php7.0-cgi php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-phpdbg php7.0-sqlite3 php-apcu php-common php7.0-bcmath php7.0-cli php7.0-curl php7.0-gmp php7.0-mbstring php7.0-opcache php7.0-readline php7.0-xml php-cgi
I got

Code: Select all

[email protected]:~$ sudo apt-get install php7.0 php7.0-cgi php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-phpdbg php7.0-sqlite3 php-apcu php-common php7.0-bcmath php7.0-cli php7.0-curl php7.0-gmp php7.0-mbstring php7.0-opcache php7.0-readline php7.0-xml php-cgi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by regex 'php7.0'
E: Unable to locate package php7.0-cgi
E: Couldn't find any package by regex 'php7.0-cgi'
E: Unable to locate package php7.0-common
E: Couldn't find any package by regex 'php7.0-common'
E: Unable to locate package php7.0-fpm
E: Couldn't find any package by regex 'php7.0-fpm'
E: Unable to locate package php7.0-json
E: Couldn't find any package by regex 'php7.0-json'
E: Unable to locate package php7.0-mysql
E: Couldn't find any package by regex 'php7.0-mysql'
E: Unable to locate package php7.0-phpdbg
E: Couldn't find any package by regex 'php7.0-phpdbg'
E: Unable to locate package php7.0-sqlite3
E: Couldn't find any package by regex 'php7.0-sqlite3'
E: Unable to locate package php-apcu
E: Unable to locate package php-common
E: Unable to locate package php7.0-bcmath
E: Couldn't find any package by regex 'php7.0-bcmath'
E: Unable to locate package php7.0-cli
E: Couldn't find any package by regex 'php7.0-cli'
E: Unable to locate package php7.0-curl
E: Couldn't find any package by regex 'php7.0-curl'
E: Unable to locate package php7.0-gmp
E: Couldn't find any package by regex 'php7.0-gmp'
E: Unable to locate package php7.0-mbstring
E: Couldn't find any package by regex 'php7.0-mbstring'
E: Unable to locate package php7.0-opcache
E: Couldn't find any package by regex 'php7.0-opcache'
E: Unable to locate package php7.0-readline
E: Couldn't find any package by regex 'php7.0-readline'
E: Unable to locate package php7.0-xml
E: Couldn't find any package by regex 'php7.0-xml'
E: Unable to locate package php-cgi

Egregius
Posts: 2311
Joined: Thursday 09 April 2015 12:19
Target OS: Raspberry Pi
Domoticz version: BetaRPi2
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius » Sunday 13 August 2017 7:29

What system are you using?

simon_rb
Posts: 660
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Pass2PHP

Post by simon_rb » Sunday 13 August 2017 9:41

Egregius wrote:
Sunday 13 August 2017 7:29
What system are you using?
Raspberry Pi 3, Jessie.

Cheers

Egregius
Posts: 2311
Joined: Thursday 09 April 2015 12:19
Target OS: Raspberry Pi
Domoticz version: BetaRPi2
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius » Sunday 13 August 2017 9:46

Could be that you need the backports sources.list to enable php7:

Code: Select all

deb http://repozytorium.mati75.eu/raspbian jessie-backports main contrib non-free

simon_rb
Posts: 660
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Pass2PHP

Post by simon_rb » Sunday 13 August 2017 10:42

Egregius wrote:
Sunday 13 August 2017 9:46
Could be that you need the backports sources.list to enable php7:

Code: Select all

deb http://repozytorium.mati75.eu/raspbian jessie-backports main contrib non-free
Good call, I thought I had added them.. I added them to the /usr/share/doc/apt/examples/sources.list - I was very tired last night and no idea what I was thinking. Installing as we speak so fingers crossed its just adding the script you kindly made for me to a cron job.. :D

Top man! Thanks

I am really confused as to where to put the secure folder etc.. I have created a script called denon_cron60.php with your example script on the other topic under pi/home/domoticz/scripts/lua/secure is this the correct place?

Egregius
Posts: 2311
Joined: Thursday 09 April 2015 12:19
Target OS: Raspberry Pi
Domoticz version: BetaRPi2
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius » Sunday 13 August 2017 11:09

Mine are stored at the www folder of my lighttpd webserver at /var/www/html/secure
Don't forget to secure that folder with .htaccess or something similar. PHP code is easily to grab, so you don't want any passwords or api keys available to everybody who knows how to grab the code.

simon_rb
Posts: 660
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Pass2PHP

Post by simon_rb » Sunday 13 August 2017 12:51

Egregius wrote:
Sunday 13 August 2017 11:09
Mine are stored at the www folder of my lighttpd webserver at /var/www/html/secure
Don't forget to secure that folder with .htaccess or something similar. PHP code is easily to grab, so you don't want any passwords or api keys available to everybody who knows how to grab the code.
Thanks, I am still just as confused. Most of what you said is in a foreign language to me.. This is all well above my head of what I am capable of understanding. I'll go back to the old script and have the switch update every minute regardless of state.

You have been nothing but helpful and patient however I just can't get my head around this. I've read through this thread and had a brain melt down lol.

Egregius
Posts: 2311
Joined: Thursday 09 April 2015 12:19
Target OS: Raspberry Pi
Domoticz version: BetaRPi2
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius » Sunday 13 August 2017 13:23

It's indeed not so simple to get it running, but when it runs it's rock stable and lightning fast :D
Give me a few minutes to put some code together, I'll post that in your other topic.

simon_rb
Posts: 660
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Pass2PHP

Post by simon_rb » Sunday 13 August 2017 14:31

Egregius wrote:
Sunday 13 August 2017 13:23
It's indeed not so simple to get it running, but when it runs it's rock stable and lightning fast :D
Give me a few minutes to put some code together, I'll post that in your other topic.
Thank you! Much appreciated!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest