Questions tagged [php]
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.
209
questions
0
votes
1
answer
37
views
LAMP stack on a Model 1 B+ Pi
I have just dusted down my Model 1 B+ RPi and installed the latest Raspbian version from the RPi website. I was following the instructions in Eben Upton's "Raspberry Pi User Guide (3rd edition)&...
-1
votes
1
answer
58
views
Install php rasbian stretch
I would install php (php-fpm) on my raspberry pi 3 b+.
Its running with raspbian stretch 9 i dont have choice, i must keep this version.
I can’t even update, the official mirrors that are programmed ...
-1
votes
1
answer
57
views
php exec fails to launch browser via bash script
On a Raspberry Pi 3B+ (using stretch), I have a bash script that looks like this.
pkill chromium-browse
chromium-browser --noerrdialogs --disable-infobars --kiosk https://www.example.com --incognito
...
-4
votes
1
answer
419
views
Trouble installing php5
I am following this guide, How to set up a web server on the Raspberry Pi. I am using a Pi 400 so I skipped step 1.
Step 2 involved running;
sudo apt install nginx
which was successful. Now if I re-...
0
votes
0
answers
33
views
Using PHP to write slider value to analog GPIO pin
I'm more or less completely new to web programming. I've coded up a slider based on another tutorial, and I want to output the value of the slider as an analog value to a GPIO pin. How do I do that? ...
2
votes
2
answers
585
views
trying to install multiple php versions on rasbian 8 / raspberry pi 2
I have two Raspberry Pi's:
a Raspberry Pi 2 with Raspbian GNU/Linux 8 (jessie)
a Raspberry Pi 4 with Raspbian GNU/Linux 10 (buster).
I was able to get multiple versions of PHP running on the ...
1
vote
1
answer
93
views
Unknow error uploading generating video thumbnail via PHP-FFMpeg
I'm running Rasbian os + PHP 7.3 on Nginx and I'm facing a problem when uploading and generating a thumbnail of a video file. I have FFMpeg on my OS, I chmod 777 the folders, I even visudo and added ...
1
vote
0
answers
125
views
Whenever I go to my local Pihole website it displays the php file contents instead of the website
It´s really simple. I go to my pihole dashboard and this shows up:
0
votes
1
answer
230
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")
...
0
votes
0
answers
131
views
How do I send data from sensors using a Raspberry Pi over WiFi to a webpage?
So far I have the code that reads the distance using the razbery pi sensor, but how can I do the rest? if anyone can help me with a tutorial so I can understand, I'm new and I don't really understand ...
-1
votes
1
answer
68
views
RPi data collection interrupted by WiFi
I have a Raspberry Pi running a solar array. Thr array feeds charge controller which feeds the RPi.
The RPi drives the array positioning circuitry (single-axis traqcking) and performs data collection ...
0
votes
1
answer
24
views
PHP unable to correct problems, you have held proken packages
I am currently trying to install a php version above 7.1.3 on my Raspberry pi 3b+ (runnning raspbian 9 and the current php version is 7.0.033). My apache is version 2.4 (the newest if i am not wrong). ...
2
votes
2
answers
12k
views
php8.0-json library not found when updating Pi-hole
When updating pi-hole I got a message:
Checking for php8.0-intl (will be installed)
Processing apt-get install(s) for: php8.0-cgi php8.0-json php8.0-intl, please wait...
------------------------------...
1
vote
2
answers
512
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 ...
0
votes
1
answer
446
views
MPG321 "Home directory not accessible: Permission denied" on PHP exec_shell
I try to execute a shell from a PHP using exec_shell() function, but it doesn't working.
I've tried chmod, chown and doesn't execute but on terminal yes. Sorry for this question but I really need a ...
1
vote
0
answers
29
views
PHP Handler for my LAMP server
I have a Pi4 4GB and i am using a Samsung Fit USB 3.0 32GB as Hard Drive.
I have set up a LAMP Server and i would like to know what handler will work better?
Apache 2.0 or PHP-FPM 7.3? or any other ...
1
vote
1
answer
1k
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
2
answers
499
views
Problem opening tkinter script via html page
I am working on this project where I have Raspberry Pi 3 with full Raspbian (with GUI) connected to a 7" screen. I created a Python 3 script:
// gui.py
import tkinter as tk
root = tk.Tk()
root....
3
votes
1
answer
531
views
Bug in PHP & Buster? 4x Kernel panic - not syncing: Attempted to kill init! exitcode 0x00000004
I have 2 exact the same Pi's: both are Raspberry Pi Model B Rev 2.
Both were running Raspbian Stretch for years. 4 days ago both Pi's (!!!) had a Kernel Panic after trying to update to php7.4. ...
0
votes
0
answers
38
views
SSL connections from PHP fail for a few seconds into the first boot of an older image
I'm distributing a Raspbian based RPi image, which contacts a webserver through PHP and file_get_contents() on startup. The image was created November 2019, the server certificate is newer, from June ...
0
votes
2
answers
2k
views
PHP module is not being installed into /etc/apache2/mods-available
I'm trying to serve a website running Apache2 alongside PHP on my Raspberry Pi 1.3.
I have already installed Apache with sudo apt install apache2 -y followed by sudo apt install php libapache2-mod-php ...
1
vote
0
answers
96
views
Memory leak using php with dio to read /dev/ttyAMA0
I am using my Raspberry Pi 2 (buster, php 7.4.10) to communicate with an inverter in a small solar system. All the code is functional but it tends to crash/exit after a few hours. Looking at task ...
0
votes
1
answer
356
views
Why can I run a python script accessed per php file that is accessed per cmd WHILE I can't run the same thing accessed per browser?
Hello ladys and gentlemen :)
I got a python script py.py that switches a GPIO (works perfectly when accessing per cmd line).
I got a php file php.php in which I access the py.py file (works perfectly ...
1
vote
0
answers
27
views
where did the pma__ tables come from when I migrated to new server [closed]
A few months ago, I migrated a PHP application to a new pi. I moved all the scripts and dumped the tables using phpmyadmin export. I then imported the tables in the new server. There were a few ...
0
votes
0
answers
172
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
2
answers
69
views
How make raspberry pi web controls? [closed]
I want to develop web based control software for the Pi in PHP. I have some experience in PHP , but i have experience in using PHP, but no experience in running it on a Raspberry Pi.
0
votes
0
answers
157
views
Pi Access Point - Hostname mapping
I have my IP address mapped to a hostname "example.com" where I have a simple Welcome webpage. The webpage is written in PHP. After I successfully connect to the Pi Access Point I attempt to go to the ...
0
votes
1
answer
2k
views
How to install PHP 7.2?
The title says it all. I'm trying to install PHP7.2 on RPi 3 so I can install OwnCloud on it. When I run sudo apt-get install php7.2 -y I get Unable to locate package php7.2.
Do I need to add a repo ...
1
vote
1
answer
163
views
PHP Install Issue
Does anyone know what would be causing the following error. I have run update and upgrade prior
pi@raspberrypi:~ $ sudo apt install apache2 -y
sudo: unable to resolve host raspberrypi: Name or ...
0
votes
0
answers
249
views
php script doesn’t work well when called from html (jquery)
I am creating a web page on a raspberry pi
Here is the essence of my html code:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script ...
1
vote
3
answers
522
views
Wordpress not working after PHP update
I recently upgraded PHP5.X to PHP7.3 on my Pi 3 and also moved to Raspbian Buster from Jessie.
Now I get this message when I try to open the port 80 where I could earlier see my Wordpress site.
Your ...
2
votes
0
answers
2k
views
WiFi signal strength in a script
I have a need to obtain WiFi signal strength on a Pi0W.
I have a PHP script and all works via terminal: php /var/www/html/blah.php (I use exec("iwconfig wlan0", $output_lines);)
The script runs as a ...
0
votes
0
answers
50
views
Upgraded PHP and not displaying PHP pages
I upgraded my PHP version so I can install some software on my Raspberry Pi. I followed these instructions from Heidi's Lab:
In /etc/apt/sources.list change stretch to buster, which is the next-...
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
1k
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 ...
11
votes
1
answer
27k
views
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 ...
1
vote
4
answers
186
views
Display html page content before reboot
I have a raspberry with lighttpd and php. Now I want to display webpage content before the raspberry is rebooting when I click on a link. I have create the page below. But when I load the page it isn’...
3
votes
2
answers
730
views
Crontab not executing php scripts
My problem is that crontab is not executing my php script /home/pi/CronTabFiles/saveThermometer.php
I tried a lot of things, I don't remember everyone of them but I'll list what i consider mains one. ...
1
vote
0
answers
134
views
Scheduled tasks for GPIO Raspberry Pi on PHP?
I create a web interface for me for manager raspberry pi gpio.
Are there libraries for PHP for scheduled tasks for GPIO Raspberry Pi?
I want add task from web interface, for example "at 9:00 set ...
0
votes
1
answer
487
views
Raspberry | Rasbian update php and apache
I'm using Rasbian VERSION="8 (jessie)" Linux raspberrypi 4.14.73-v7+ which the Apache/2.4.10 PHP 5.6.38-0+deb8u1 has been installed.
How can I upgrade the PHP package to PHP 7.3 that is compatible ...
0
votes
1
answer
246
views
Raspberri Pi (Raspian) running Apache 2, PhP(7) HTML CSS not running PHP
I am getting very frustrated with trying to track down the source of my problems with the code below. I believe it is something to do with php files not being run. (Note that all files are in the same ...
0
votes
0
answers
39
views
POST A CPT IN A CAROUSEL
I am trying to make a dynamic carousel with CPT. My CPT works well and I added some articles but I can not display it. I am doing it this way:
<section id="carousel">
<div class="row mb-...
0
votes
0
answers
166
views
Forwarding owncloud from PI to router
Aim:
Have an owncloud on a raspberry, available from public network e.g. from the IP of my router rather than from the IP of my Raspberry.
Background info
root@DietPi:~# uname -a
Linux DietPi 4.19....
0
votes
1
answer
583
views
RPI Zero as Keyboard: Convert key codes from SHOWKEY to write into /dev/hidg0 HID packet [closed]
I'm using RPI Zero W as keyboard gadget. It's supposed to act as keyboard getaway from Bluetooth keyboard to USB keyboard. I'm running "showkey" shell command process giving me codes of just pressed ...
0
votes
1
answer
555
views
MySQL root account unable to create database
I have tried 6 different forum rooms with a similar issue none of the solutions are working out for me.
Install MariaDB on my Raspberry Pi, which I am logging in via putty from my windows machine.
...
-1
votes
1
answer
149
views
Newcomer to RPi from web developing (HTML/CSS/Javascript). Do I have any advantages? [closed]
I'm looking to get in to the wonderful world of RPi. I can make a website with HTML/CSS/JavaScript/PHP so does that give me any kind of advantage over a true RPi newbie?
For my first project I'd like ...
2
votes
1
answer
2k
views
Cannot install php-curl on raspbian 9.9, dependency issues
When I run:
apt-get install php-curl
It returns:
The following packages have unmet dependencies:
php-curl : Depends: php7.3-curl but it is not going to be installed
E: Unable to correct problems, ...
0
votes
0
answers
2k
views
php file not executing python script when called through browser
I have an apache2 webserver running on the pi. I have a php file that uses exec() to run a python script. Everything works well from the command line. when loaded through the browser, the exec() ...
1
vote
1
answer
2k
views
How can I update from PHP 7.0 to PHP 7.1?
My /etc/apt/sources.list file:
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://...
-1
votes
1
answer
1k
views
Can CodeIgniter be used on an RPi?
Can I use a Raspberry Pi as a web server for a CodeIgniter app? I can't find anything online. I saw tutorials on installing Wordpress but no CodeIgniter...