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.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

PLease help!!! Apache2+PHP+SQLite

I downloaded raspberry pi desktop VM on virtual box. I am doing a little project for my class where I have a created a login system, but it does not register the users in dB, but shows the dB is ...
1
vote
2answers
25 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
1answer
71 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
0answers
18 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
1answer
59 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
1answer
68 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....
0
votes
0answers
73 views

Optimal Settings For LAMP Server

I have a Pi 4 B(4GB) and Pi Zero W. I have on both a LAMP Server for my office and run from there my web app(around 10 web pages). It is a small office and 1-3users at the same time. I want someone to ...
3
votes
1answer
70 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 Raspian Stretch for years. 4 days ago both Pi's (!!!) had a Kernel Panic after trying to update to php7.4. Installs ...
0
votes
0answers
26 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
2answers
40 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 ...
0
votes
0answers
232 views

Installing php7.4 + MySql on Stretch with nginx

I want OwnCloud and I am trying to install PHP 7.4 on Raspbian GNU/Linux 9 (stretch) following @janw's tutorial but facing some errors: E: Unable to locate package php7.4-… then I was able to solve ...
1
vote
0answers
31 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
1answer
50 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
0answers
14 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
0answers
35 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
2answers
64 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
0answers
25 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
1answer
803 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 ...
0
votes
0answers
33 views

Remote GPIO on rpizero with Buster

I want to turn on a gpio output and receive input from a gpio input. This is all initiated from a webpage. I am making an ajax call to a php file which itself runs the python script. It does not work....
1
vote
1answer
60 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
0answers
71 views

Control LED as traffic lights from web using Apache server and PHP

Hi I am a newbie on this kind of projects and now I am starting with a project where I control 3 LEDs from web.It works to control each one, but now I want to make something like traffic lights, ...
0
votes
0answers
57 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
3answers
249 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 ...
1
vote
0answers
749 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
0answers
20 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
1answer
1k 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 ...
4
votes
2answers
512 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 ...
7
votes
1answer
10k 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
4answers
125 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
2answers
244 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
0answers
64 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
1answer
183 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
1answer
166 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
0answers
29 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
0answers
121 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
1answer
242 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
1answer
240 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
1answer
80 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 ...
1
vote
1answer
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
0answers
650 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
1answer
1k 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
1answer
678 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...
1
vote
0answers
41 views

Raspberry Pi3 not receiving HTTP request from Arduino

I have been running an application on an older original Raspberry Pi. The Raspberry Pi was running Incredible PBX and I have some tables set up in the MySQL database to store data received from an ...
0
votes
0answers
121 views

Get bluetooth button input with php

I'm new to raspberry development but I'm experienced with the web languages (PHP,html5,javascript and css). I want to develop a simple counter that will be increment when the pression of a wireless ...
2
votes
2answers
1k views

Raspberry pi PHP display code instead of output

I installed php services and Apache2 on my raspberry pi without errors. But, when I opened a browser and entered my page URL, it wrote <?php echo "Hello";?> instead of Hello. I have tried ...
1
vote
1answer
489 views

Cant install php

I'm kind of new to the linux os and I'm having trouble installing php. i needed a few tools for jasper which alwys show up in the error message. sudo apt-get install php -y Reading package ...
0
votes
1answer
263 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
1answer
632 views

Google Cloud Translation API key environment issue on Raspberry Pi

I am trying to get the Google Cloud Translation API's PHP implementation to work on a Raspberry Pi 3 B+ running Stretch and Nginx with PHP7-FPM. I have created an account at Google and received the ...
1
vote
1answer
44 views

Is it a good practice to use PHP on Raspberry Pi? [closed]

Now I'm trying to develop an IoT project basd on RPi 3B which will have user interface based on thin client technology. So PHP looks attractive to be used in this application. I know that PHP has ...
1
vote
1answer
77 views

LLMP server tutorial

I have searched Google for an answer but cant find an up to date tutorial for creating a LLMP server (Lighttpd instead of Apache). I find one follow it and think I'm getting somewhere and its a year ...

1
2 3 4 5