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.

-2
votes
0answers
33 views

Taking more time to execute a single program

I have created a GUI program with PHP in raspberry pi. The program is running with a web browser. But the problem is that it takes more time (more than 2 minutes) to execute a single program. I want ...
0
votes
1answer
40 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
56 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
25 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
32 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
15 views

Using Cakephp running python tensorflow

The program is work in Raspberry Pi using Rasbian Stretch. I have python script with TensorFlow object detection. Now I am using CakePHP to implement the website. In the CakePHP, I want to run the ...
2
votes
1answer
137 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
123 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
34 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
95 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
32 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
146 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
46 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
30 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
818 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
0answers
58 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
237 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
166 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
496 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
73 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
73 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
35 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)...
1
vote
3answers
798 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
337 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
54 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
812 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
4k 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
45 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
1k 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
2k 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
113 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
144 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
votes
2answers
10k 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
vote
2answers
105 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[...
-1
votes
1answer
847 views

How I can use a barcode scanner and PHP/MySQL to run a database? [closed]

I am currently trying the following with the help of a Raspberry Pi: Barcode scanner scans barcode (connected to the Raspberry Pi via USB Port) (via Python?) A hidden form is filled in The user only ...
2
votes
0answers
411 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 ...
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 ...
0
votes
2answers
359 views

I need php5, what version of NOOBS shall i download

I just installed NOOBS onto the SD card but I have just messed it up, it wasn't right for me anyway since I needed php5, and the latest NOOBS comes with php7. How can I install NOOBS so that I can ...
0
votes
0answers
420 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
1answer
901 views

PHP5, MySQL & MySQLAdmin issues on latest raspbian stretch release

A day or two ago I downloaded the latest release of raspbian stretch. I am currently busy installing all the components I require for a web server and mysql server. In the latest release, PHP5 has ...
2
votes
1answer
404 views

Raspberry PI - Apache Web server - 403 forbidden access only on some computers [closed]

Yes, I read through a lot of the related questions, but I can't seem to make sense of my problem. So, I successfully installed the latest Apache server along with PHP5 on a Pi. It works as it should, ...
0
votes
3answers
3k views

Variable which can be used between a python and php file

I need 14 variables globally whose value can be manipulated by both php and python program. The python program just wants to read the value of the variable. The PHP program should write the value of ...
3
votes
3answers
3k views

How do I create a cron job to execute PHP?

I've been trying to execute a PHP file via a cron job, but I can't seem to get it to work. I've set the permissions of the relevant file to 777. Here is the line I've currently got in the crontab file....
1
vote
1answer
1k views

broken network — ping works on IP addresses but not on hostnames

I did a fresh install of raspbian on an rpi-3 with the intent to follow this guide to set up an owncloud server However after some first steps, when I reboot and reconnect I get the strange problem ...
0
votes
1answer
422 views

Unable to run PHP on Raspbian Jessie

I have installed Apache on my Raspberry Pi without incident. However, I cannot install PHP correctly after having tried various methods. It appears to have installed but I cannot get PHP to output. I ...
0
votes
1answer
846 views

[PHP][HTML] Create a list of songs, press play button to play the selected song

I am trying to achieve the following : I want to start a selected song on the rpi from a web interface. I can play the song through exec exec("mpg123 /var/www/html/Sounds/Zelda.mp3",$status); and I ...
0
votes
2answers
478 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 ...
2
votes
1answer
2k views

Win 10 IoT + apache + php + mysql + ssl?

I'm looking for an easy way to get on Win10 webserver based on apache (or familiar), php, mysql, and ssl (all 3 must have). Everything I found on google has no info how to do it... only how to change ...
3
votes
1answer
642 views

Apache on Pi won't display images

I'm trying to display images on the Apache server created on Pi. PHP Code: $files = glob("/var/www/html/Images"); for ($i=1; $i<count($files); $i++) { $num = $files[$i]; echo '<img ...
3
votes
2answers
2k views

Why can't I return value from python script to PHP script when trying to use GPIO

I have spent two days on this and have tried nearly everything I could find. I am using an apache server (2.4.10). I have two files in a folder called testPythonPHP that is located in the root ...