All Questions
43 questions
0
votes
1
answer
270
views
How to run a python script that plays an audio using php?
recently I'm doing a small project, and a part of it involves running a python script using PHP. to explain further:
Python:
from playsound import playsound
playsound("path/of/the/audio")
...
1
vote
2
answers
553
views
Python Import Module issue, works from terminal, not when called from PHP
I have a simple Python (sockets.py) module which operates some Energenie sockets. See below. Note the print statements are simply there as a basic 'breakpoint' function so I can see how far the module ...
1
vote
1
answer
2k
views
Python import won't succeed when script is exec() from Apache PHP
I have a Python3 script (readtemp.py) to read temperature and humidity of a DHT22. I'm using adafruit_dht module. it executes perfectly from terminal command line with:
python3 readtemp.py
or
...
0
votes
0
answers
215
views
Stream raspi video to php application
I have an PHP Application running on a "server" and my raspberry which is connected to a display is showing this application (chromium).
Also on my raspberry is the new hd camera connected ...
0
votes
1
answer
2k
views
Running a python script from a webserver
I made a Webserver using my Laptop and a few PHP-HTML-Javascript programms.
Right now i am able to connect to these pages and everything works just fine.
My problem is that i want to run a Python ...
5
votes
2
answers
2k
views
Python file called by PHP script in apache server unable to get RPi.GPIO
I've been trying to use a site on my local network to activate the GPIO pins on my Raspberry Pi 4. I installed apache and wrote a quick PHP script which executes a python file in /var/www/html.I have ...
0
votes
1
answer
593
views
Printing Python Variables for Debugging
I'm a Python newb so please bear with me if I'm asking a stupid question.
I have a RPi3 running Jessie lite. I have Apache and PHP installed. I also have netatalk installed and have mounted my pi e....
0
votes
1
answer
477
views
Besides WebIOPi, what can I use to control the GPIO's(http.server library,Flask PHP)?
I used WebIOPi to test (and debugging) the RPi ports, it is easy and hepful.
But now I want to create a webpage (as I can use html/css e create a nice modern interface).
I don't know how to use ...
0
votes
1
answer
208
views
RPi, php, python and string lengths
Are there limitations on the length of strings passed to php by python in a service?
I had a php service running that retrieved data from a python script.
Worked well.
I decided to add data from ...
3
votes
3
answers
4k
views
How to build a raspberry devices monitoring center
I have multiple devices of Raspberry and i'm trying to create a page to monitor these devices, something like an IoT platform but much simpler.
so basically a page with a username and a password and ...
0
votes
1
answer
2k
views
Control servo motor using a web server
So I'm trying to get this to work. I have a .py file that turns the servo, and it works, but I'm trying to run it through a browser.
So I installed apache and php, and I made .php file which, when ...
-1
votes
2
answers
12k
views
How to run python file from php script [closed]
I have all files placed under var/www/html folder. When I click my button on web page the php file must run the python file and give the ouput at the GPIO pins. But nothing is happening so. Anybody ...
0
votes
1
answer
2k
views
Run python script from php
Hello I want to run python script from php.
Python script is for reading sensor data.
This is python code and it's file name is sensor.py
import bluetooth
bd_addr="(mac address)"
port=1
sock=...
1
vote
1
answer
5k
views
How can I display sensor data on webserver by php? [closed]
I want to display sensor data on web server.
I measure sensor data by arduino and it sends sensor data to raspberry pi via bluetooth(wireless). There are codes for logging data.
code of arduino
#...
1
vote
2
answers
266
views
Turning motor on and off from webserver
I have Apache server running on my pi. I send a httprequest from my Java app to the server to turn the motor on and off by executing a pyhton script. PHP code on the server:
<?php
if(isset($_POST[...