rpiuser2016
Posts: 42
Joined: Tue Jan 12, 2016 1:53 pm

Re: PHP GPIO Library

Tue Oct 31, 2017 8:57 am

Thanks calcinai, I have reinstall everything. But now I am getting this error:

Code: Select all

pi@raspberrypi:~/phpi-websocket $ php examples/server.php

Message from syslogd@raspberrypi at Oct 31 11:49:45 ...
 kernel:[81003.443393] Disabling IRQ #79
and the page http://ntg40.ddns.net:9999/ (port forwarding rule added) gives 404 ERROR. There should locate server.php? Now it is within the path:
/home/pi/phpi-websocket/examples/server.php

calcinai
Posts: 5
Joined: Mon Jul 04, 2016 9:06 am

Re: PHP GPIO Library

Tue Oct 31, 2017 8:37 pm

Image
rpiuser2016 wrote:
Tue Oct 31, 2017 8:57 am
Message from syslogd@raspberrypi at Oct 31 11:49:45 ...
kernel:[81003.443393] Disabling IRQ #79
[/code]
This message is the sysfs interrupt stopping as the interrupt register is opened by phpi
rpiuser2016 wrote:
Tue Oct 31, 2017 8:57 am
and the page http://ntg40.ddns.net:9999/ (port forwarding rule added) gives 404 ERROR. There should locate server.php? Now it is within the path:
/home/pi/phpi-websocket/examples/server.php
Have a look in examples/server.php, it's probably as simple as the hostname not matching (there's a comment in there saying you'll get a 404 if it doesn't)

rpiuser2016
Posts: 42
Joined: Tue Jan 12, 2016 1:53 pm

Re: PHP GPIO Library

Tue Oct 31, 2017 8:53 pm

Thanks once again.

Yes i see this comment, but i dont know how to change to a right one:

Code: Select all

//This is like a vhost, if it donesn't match the host header you'll get a 404
$app = new Ratchet\App('raspberrypi.local', 9999, '0.0.0.0', $loop);
How can i test raspberrypi.local ?

calcinai
Posts: 5
Joined: Mon Jul 04, 2016 9:06 am

Re: PHP GPIO Library

Tue Oct 31, 2017 8:57 pm

rpiuser2016 wrote:
Tue Oct 31, 2017 8:53 pm
Thanks once again.

Yes i see this comment, but i dont know how to change to a right one:

Code: Select all

//This is like a vhost, if it donesn't match the host header you'll get a 404
$app = new Ratchet\App('raspberrypi.local', 9999, '0.0.0.0', $loop);
How can i test raspberrypi.local ?
You just need to set that to whatever hostname you're accessing from, i.e.

Code: Select all

$app = new Ratchet\App('ntg40.ddns.net', 9999, '0.0.0.0', $loop);
Unfortunately this is actually down to the way ratchet works, there may now be a way to make it accept a wildcard hostname..

Return to “Other languages”

Who is online

Users browsing this forum: No registered users and 3 guests