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
16 views

kill a python script that is executed in php file [closed]

first of all I'm a new to php , I have a web page that have 2 buttons on to run a python script and the other to stop or kill that script , The python script have a code used for running a motors, ...
0
votes
0answers
14 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
43 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 ...
3
votes
2answers
51 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 ...
2
votes
1answer
365 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
60 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
63 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
38 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
51 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
57 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
72 views

How do I control a GPIO pin with a HTML button?

I am trying to send a temporary signal through one of the GPIO pins on my Pi 4, like to light up an LED for 1 second then turn off. Is there are way to do this by clicking on a button on my HTML web ...
0
votes
0answers
23 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
44 views

Dokuwiki install is getting a 502 gateway error from nginx

Goal: install dokuwiki on my raspi 3 Method: Using This tutorial to install Problem: I'm getting a 502 error from nginx when I try to run the install script. Configuration: eth0 is set to a static ...
0
votes
0answers
45 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
112 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
63 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
58 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
804 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
74 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
562 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
296 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
35 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
74 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
1answer
467 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
283 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
94 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
334 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
39 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 ...
0
votes
0answers
237 views

Run Python code from PHP

This is probably a Linux question, but concerns specific Pi code. I am using the DHT11 class from http://abyz.me.uk/rpi/pigpio/download.html and have written a program which uses this. #!/usr/bin/env ...
1
vote
1answer
72 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
vote
0answers
32 views

Apache HTML writing on Raspbian + Pi3 [closed]

I currently have a PI3 on my home network. With my LAMP apache, I keep the www folder on the USB drive - let's call it "/media/USB32/www". My user id is Tony. I have added my user-id to group www-...
0
votes
1answer
1k views

Read GPIO pin on web page

I was able to control an led from a web page using the following code. when I call http://myip/pinon.php it will light up the LED and http://myip/pinoff.php will turn off the LED. pinon.php <?php ...
1
vote
1answer
120 views

PHP not executing commands

I have an apache web server installed in my Raspberry Pi. I created an index.php file on the /var/www/html folder. Whenever I access my Pi's IP address on a web browser to control the lights, none of ...
1
vote
1answer
381 views

Uninstalled Lighttpd, installed apache and PHP. PHP not executing

Title says it all. Lighttpd was automatically installed by RaspAP, a wifi web GUI not being part of Raspbian repository. But I require Apache. Uninstalled Lighttpd, Installed apache with PHP & ...
0
votes
1answer
276 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
1answer
701 views

rewrite /etc/dhcpcd.conf file as www-data user (with php)

I've got a small problem changing the IP of my Raspberry (Raspian Stretch lite) via PHP. I wrote a small php page to modify the IP-Address setting by reading a template file replacing the blanks and ...
0
votes
1answer
96 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 ...
1
vote
1answer
127 views

Getting changes in the timezone on a raspberry pi reflected in PHP

I am using the lighttpd webserver on a pi running raspbian stretch, with php version 7.0. I can get a string representing the current date, time and timezone information onto a web page by calling ...
0
votes
1answer
51 views

Three sites - three nginx conf files - all resolve to same directory

I recently tried one too many things and had to re-flash the SDCard in my Raspberry Pi. Started over with Raspbian Stretch Lite. Added nginx, PHP7.0-fpm and a self-hosted social media service (Pleroma)...
2
votes
3answers
2k 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 ...
2
votes
0answers
381 views

Unable to install php7.2-intl Depends php7.2-common 7.2.4-1 but 7.2.4-1+b1 is to be installed

While trying to install a NGINX server on a Raspberry Pi 3 Model B Rev 1.2 I was following this tutorial, also tried this answer but both return the error The following packages have unmet ...
1
vote
1answer
76 views

Php7.0 is installed, but service doesn't appear in services list

I have install php7.0 and some it extention, but when I type "sudo service php7.0 restart", what I found is "Failed to restart php7.0.service: Unit php7.0.service failed to load: No such file or ...
0
votes
1answer
1k 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
2answers
6k 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
1answer
84 views

php file is downloaded instead of running at the backend [closed]

I have installed Apache2 Mysql and php7 on my raspberry. When I am running my web pages under var/www/ folder the php file is downloaded instead of running at the backend and refer me to next page. ...
0
votes
1answer
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
1answer
3k 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
0answers
146 views

How to solve Rpi3 usb problem while printing?

I am printing from an rpi3 using nginx+php7.1+cups, connected to a canon printer, which downloads pdf files through https requests. From the rpi3, i issue the following command when something needs to ...
1
vote
0answers
175 views

WiringPi can only turn on 8 LEDs

On my RPi 3 I have a PHP website to control 10 LEDs. Each is wired to a separate GPIO pin and 220 ohm resistor. Here is the code: <html> <head> <title>LED Control</title>...
1
vote
2answers
14k views

Unable to install PHP

I can't install PHP on my raspberry pi. I did sudo apt-get install php libapache2-mod-php php-mcrypt and then showed me this: Reading state information... Done E: Unable to locate package php E: ...