A widely used, general-purpose scripting language designed for web development. This topic covers the use of PHP and how to host PHP web servers on the Raspberry Pi.
Questions tagged [php]
210 questions
12
votes
2 answers
How can I install PHP 5.6 (instead of 5.4)?
I'm actually stuck with a little problem. I want to use Laravel on my pi but it requires at least PHP 5.5.9. But actually, the latest version of PHP that I am able to install (via the official repository) is the 5.4 How can I upgrade to 5.6 (or…
Germain67
- 222
- 1
- 3
- 8
11
votes
4 answers
Where is syslog being written?
I have an out of the box Pi. See below on what I have done. If I have <?php syslog(LOG_INFO,'where are you'); ?> in a PHP script, where the the message being logged? $ sudo apt-get install nginx $ sudo mkdir /var/www $ sudo apt-get install php5-fpm…
user1032531
- 337
- 2
- 5
- 12
11
votes
1 answer
PHP 7.4 on raspbian
I'm trying for about 4 hours to install PHP 7.4 on my Raspberry Pi Zero W. I tried different tutorials, but I endup crashing my raspbian completly or just the installed php. With crashing I mean, I get the following message: Illegal instruction . I…
Mr.Tr33
- 229
- 1
- 2
- 4
6
votes
2 answers
How to install PHP 7.1
Title pretty much says all. I know about adding the stretch to get PHP 7. But it doesn't show PHP 7.1. deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi Bonus question where should I drop the request to update the…
janw
- 533
- 3
- 8
- 19
6
votes
1 answer
Can I make a WiFi hotspot out of my Raspberry without it having an internet access?
I have made a Xamarin app for Android and WP, which is basically a music player, with the ability to sync music between devices, similar to Spotify, but it's used to sync music that you have downloaded as an mp3/flac or whatever in any way. Probably…
Martin Frøhlich
- 163
- 3
5
votes
0 answers
How can I read and write data to a Character Device File in Linux with PHP?
I'm trying to read and write to modules on the I2C bus on a Raspberry Pi using PHP. I'm using fopen() and fskeek(). Below is the code I've been trying to use to read data coming in from the physical device at location 19. This code reads nothing…
T. Brian Jones
- 153
- 6
5
votes
1 answer
Shutting down Raspberry Pi with PHP
I built this dashboard for my Raspberry Pi and would like to be able to shut it down and reboot it with a click. I have the following in my html which redirects to a script and gets a PHP page with ajax: <a href="#" class="reboot"></a> <script>…
thibmaek
- 289
- 6
- 19
5
votes
1 answer
Live video streaming embedded in a web page
I have created a web page to have both live video streaming and some button controls to control the robotic arm interfaced to the RPi GPIO pins. For button controls, I used php coding. The php coding is given here. Using motion s/w, I am able to get…
Ron Thomas
- 363
- 2
- 5
- 14
5
votes
2 answers
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 a script called LED-on.py, that, when I run…
Alexanderbira
- 154
- 6
4
votes
3 answers
PHP to execute Python scripts for GPIO
I found this code somewhere, that can execute Python scripts from PHP. I've installed apache2 on the Pi and I'm able to access the PHP script. But when I press the HTML buttons, nothing happens! :( When I execute the python script via SSH, it…
Krish
- 237
- 1
- 3
- 8
4
votes
2 answers
Why can't I return value from python script to PHP script when trying to use GPIO
I have spent two days on this and have tried nearly everything I could find. I am using an apache server (2.4.10). I have two files in a folder called testPythonPHP that is located in the root folder of my server ( /var/www/html ). The files are…
Xavier
- 41
- 1
- 2
4
votes
4 answers
E: Package has no installation candidate
I am unable to install any package using command "apt-get install". Whenever I execute above command to install any package, it shows me a common error saying E: Package <PackageName> has no installation candidate I tried following packages to…
HarshIT
- 235
- 1
- 4
- 13
4
votes
1 answer
How do I stop a python script from running via a webpage?
So I have a a webpage that has buttons to run a script that controls a PIR sensor and an LED. How do I stop the script from running using a second button? Button 1 : Run sensor.py Button 2 : Stop sensor.py script I've looked up on it, and it seems…
PiFanatic
- 53
- 1
- 5
4
votes
4 answers
Unable to run RaspiStill from PHP
I have been attempting to use RaspiStill in PHP for a number of days now. I have searched around and have been unable to come up with a solution. I have been attempting to use shell_exec() in my php file like so: shell_exec("/usr/bin/raspistill -rot…
jason
- 196
- 1
- 5
3
votes
3 answers
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 when accessed i can see my devices with their…
Salar Yunis
- 45
- 2
- 9