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.

45 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
2
votes
0answers
510 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
236 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
242 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
3k 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
182 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
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 ...
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 ...
1
vote
1answer
286 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
121 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
384 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
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 ...
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
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
0answers
180 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
389 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
119 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
166 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
484 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
335 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
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
0answers
73 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
46 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
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
0answers
80 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
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 ...
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 ...
0
votes
0answers
606 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
599 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
475 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
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 ...
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 ...
0
votes
0answers
237 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
926 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
495 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
299 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
votes
3answers
2k views

Open text file on rasbperrypi using PhP

I'm trying to open a simple text file on my raspberry pi using PhP. This is the code: <html> <body> <?php $myfile = fopen("/home/pi/Desktop/hello.txt", "r") or die("Unable to open ...