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.

51 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
404 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 ...
2
votes
0answers
579 views

MySQL suddenly broken after restart

I restarted my raspberry pi and now then I got this error on my website: SQLSTATE[HY000] [2002] No such file or directory I look at sudo service mysql status and I can see this. Jan 09 17:34:45 ...
2
votes
0answers
291 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 ...
2
votes
1answer
253 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 ...
2
votes
0answers
4k views

Upgrade PHP 5.6 to 7.0?

i wonder if they is an option to upgrade php version 5.6 to 7.0 Ive seen some tips with information that i need to add new repository with php7.0, but its still not working for me. If any one has ...
2
votes
0answers
190 views

PHP stopped working after installing sendmail on raspberry pi

My PHP is not working after I installed sendmail on the raspberry pi. PHP is still installed. I checked using php -v on the command line. My lighttpd server is just not serving php. I've tried ...
2
votes
0answers
2k views

How to get kodi to play m3u8?

I am so sorry if this is the wrong section. I need some help. I have a few questions actually. I recently bought an iptv subscription with a provider. I am only able to play the channels on Android, I ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
1answer
466 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
2answers
94 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
0answers
167 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
184 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
0answers
198 views

VLC player streaming doesn't starts when shell script executed from php file

My project is to start RASPI camera streaming from Android APP. When android app clicks a button, HTTP POST method accesses a PHP page on RASPI. This PHP page executes shell script which opens VLC to ...
1
vote
0answers
1k views

apt-get install fails to install OpenMediaVault - php5-pam dependency not available

While installing Open Media Vault following instructions on https://forum.htpcguides.com/Thread-Installing-OpenMediaVault-on-Pi3 or http://forum.openmediavault.org/index.php/Thread/5302-Howto-install-...
1
vote
0answers
399 views

Digital Camera - view webcam (not pi camera) and capture image on button click inside a browser - preferrabily php

I am a newbie to Raspberry pi Digital Camera - view webcam (not pi camera) and capture image on button click inside a browser - in php I am trying to write a browser based image capture software ...
1
vote
0answers
1k views

Execute I2C functions from web page on Pi running LAMP

I know these type of "what's the best way" questions are frowned upon on StackExchange, but I will try to fit it within the guidelines. I have tried several methods and can't figure out which is the ...
1
vote
0answers
161 views

Using audio-output of raspberry from apache server

I am currently struggling on a project I am working on. I am supposed to control the audio output of a raspberry from a computer or another device. I installed an apache server and I want to execute a ...
1
vote
0answers
170 views

Selfi-Kiosk with Kweb and Camera - how to show preview image

I use the Kweb browser to boot in kiosk mode and would like to build an interface, where people can take selfis. I use HTML and jquery for the frontend and php to do shell-exec commands like starting ...
1
vote
0answers
505 views

Text to Speech Using Apache Web Server

I have Apache Web server installed on my Raspberry Pi. I was wondering If I could use javascript,html, and php to create a webpage where the user types some text into a text field and then that text ...
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
0answers
2k views

php $_FILE doesn't work

I followed all the steps from tutorial WikiHow - Guide to install PHP I can execute normal php commands, but can't upload files using $_FILE command.It always gives me error. My File uploading ...
1
vote
1answer
338 views

I compiled and installed PHP7 but still see 5

After a lot of problems I tried building my own LAMP server, I have NGINX on it, PHP 5.4, MySQL (as I could not get mariadb to work no matter the guide) and it's running Raspbian Wheezy. Anyway, I ...
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 ...
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 ...
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
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 ...
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
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
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....
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 ...
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
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
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. ...
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() ...
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 ...
0
votes
0answers
680 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 ...
0
votes
2answers
690 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
0answers
612 views

phpmyadmin returns 403-Forbidden

When I enter /etc/init.d/apache2 restart I get: restarting apache2 (via systemctl): apache2.servicewarning: Unit file of apache2.service changed on disk, ‘systemct1 daemon-reload’ recommended. job ...
0
votes
2answers
4k 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 ...
0
votes
0answers
248 views

PHP 7.0 Cron job error

I updated php 5.6 to php 7.0 and now on my mail box i got cron job error. This is subject of my mail: [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean This is whole mail i get: ...
0
votes
0answers
960 views

saving GPIO data to sqlite using python, retrieving dynamically using php

I am try to make a game for my son, it has 2 vibration sensors that represent Balls and Strikes (for baseball). When a sensor is hit I have a loop that adds a tick to either the strike or the ball. ...
0
votes
0answers
507 views

Web based IR/RF device control over long range

I am trying to implement a Building Automation System where I would like to implement web-based or mobile based control of all ir/rf based devices like tv,a/c,sound system, etc. The PI will be placed ...
-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...