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
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-...
1
vote
2answers
14k views

PHP can't execute sudo script (www-data is allowed to sudo commands)

Can anyone of you tell me why this doesn't work? When i open the file doesnt run anything :( This is my php file: <!DOCTYPE html> <html> <head> <title>Restarter ...
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 ...
1
vote
1answer
2k views

using php_exec command to play audio on the Pi - no audio group

I'm trying to have a php script play an audio file when run shell_exec('aplay /home/andrew/www/audio/meeting-bell/medium-bell.wav') It works when I run it from the command line, but not when running ...
1
vote
1answer
280 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 ...
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 ...
1
vote
1answer
118 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 ...
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 ...
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 ...
2
votes
1answer
349 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
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 & ...
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’...
0
votes
3answers
3k views

PHP or jquery to execute python scripts for GPIO

I want to use php or jquery to control gpio pins on my raspberry pi 2. I have apache installed. When i execute python files using LXTerminal, they work fine. I have made the .py files executable and ...
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. ...
0
votes
1answer
66 views

Can't login to my Raspberry Pi anymore

I installed this package on my Raspberry Pi: sudo apt-get install libssh2-1-dev libssh2-php And when I rebooted and was going to login with Winscp I got the error message: Disconnected: No ...
1
vote
0answers
37 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 ...
2
votes
1answer
240 views

Problems with server services on Raspberry Pi3

I have a Raspberry Pi 3 with Raspbian installed on it. However, I've tried also tried Ubuntu Mate, and I had the same problem. After a while my LAMP server, SSH server and FTP server become ...
-1
votes
2answers
246 views

Private/Secure port forwarded Apache server?

I'm trying to create a light automation system with my Raspberry Pi 2, PHP, Python and an Apache server. Unlike some people, I want to be able to access this server from anywhere in the world. The ...
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. ...
0
votes
1answer
49 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
2answers
3k views

Php not working with nginx

So I tried following this guide, but seems to fail at this step. When accessing the /index.php my browser(both chromium and firefox) downloaded the page as a file, then I decided to delete the file ...
1
vote
3answers
2k views

Issue with PHP script and GPIO pin

I am making a project that uses a web-server and a basic PHP script to turn on a GPIO pin. Here is my code: <html> <head> <meta name= "viewport" content="width=device-width" /> <...
1
vote
1answer
803 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
2answers
596 views

WiringPi, PHP: Interrupt driven event counter

I am planning to set up an HTML-PHP website gui which opens up in Chromium Kiosk mode. I want the gui to count the number of falling edge interrupts and show the count on the GUI. I have achieved ...
0
votes
1answer
56 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
66 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
110 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 ...
-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
557 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://...
0
votes
0answers
73 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
4k views

Can't install apache

I can't download apache2 and php5: sudo apt-get install apache2 php5 libapache2-mod-php5 Gives me the error "Failed to fetch [URL] 404 Not Found". The raspberry is connected via ethernet to my ...
3
votes
2answers
4k views

How to Compile and Install PHP7 on raspberry pi?

When i installed PHP on Raspberry PI, PHP version is 5.5.* But, I want to install php7 and when i try to compile it from Source Some Error occurs related to sapi Did someone successfully installed ...
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: ...
-1
votes
1answer
293 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 ...
-3
votes
2answers
4k views

How to develop a Plugin to read the status of the Power-LED of the Raspberry Pi 3 B by PHP [closed]

I need to develop a plugin that reads the status of the Power-LED of the Raspberry Pi 3 B and print the status of the LED on the Web-page. Please Help !!!
2
votes
1answer
466 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 ...
6
votes
2answers
34k views

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 ...
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
1answer
2k views

How can I install php5-pgsql on a Raspberry Pi 2?

I tried these commands to install php5-pgsql but I got an error: pi@raspberrypi:~ $ sudo apt-get install php5-pgsql php-pear Reading package lists... Done Building dependency tree Reading state ...
1
vote
2answers
130 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[...
0
votes
1answer
93 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
331 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 ...
0
votes
0answers
603 views

Delay with POST request using Python with GPIO

I have made a smart doorbell and subscribed to a website that does Machine Learning so that I can predict an image when sent to the server. However, while testing the code using POSTMAN API ...
2
votes
0answers
235 views

xdotool from Apache/PHP script

With Raspbian Wheezy I could do the following without any problem through a PHP script run by Apache on the local Pi: exec('env DISPLAY=:0 xdotool mousemove 20 10 2>&1', $output); But now I ...
4
votes
4answers
27k views

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 ...