Hot answers tagged

18 votes

PHP 7.4 on raspbian

First method: You can install it manually by: wget http://ftp.us.debian.org/debian/pool/main/p/php7.4/php7.4_7.4.1-1_all.deb And then: dpkg -i php7.4_7.4.1-1_all.deb It gives you a lot of ...
user avatar
  • 4,185
10 votes
Accepted

How can I install PHP 5.6 (instead of 5.4)?

These are the steps you can follow. Grab latest source from this site. (http://php.net/downloads.php) Choose your nearest mirror. For example, I did "wget http://in1.php.net/distributions/php-5.6.10....
user avatar
  • 2,793
9 votes
Accepted

Where is syslog being written?

/var/log/messages or maybe nowhere. Two things to try $ ls -lrt /var/log # find the most recently written logfile $ cat /etc/syslog.conf # view the syslog configuration
user avatar
9 votes
Accepted

How to install PHP 7.1

The package php7.1 isn't in the stretch repo, but it is in the buster and sid repositories (for Debian 10 and unstable, respectively). You should be able to just change stretch to buster, and then run:...
user avatar
  • 6,178
7 votes

How to use python to run php

You can call the php Script using python's os.system: import os value = 992.23 os.system("php /path/to/your/file.php %s"%(value)) in you php file, just specify the value as given per command line: '...
user avatar
  • 962
7 votes
Accepted

Can I make a WiFi hotspot out of my Raspberry without it having an internet access?

In terms of networking, this is certainly possible. Any WIFI access point can provide WIFI access to other devices. A WIFI accesspoint typically also acts as a DHCP server giving out IP addresses and ...
user avatar
  • 531
6 votes
Accepted

Shutting down Raspberry Pi with PHP

But this is doing nothing, it's not rebooting or shutting down using this code. If you are using apache, it runs as its own user and does not have permission to run reboot with sudo. To do that, you ...
user avatar
  • 55.8k
6 votes
Accepted

Use of Raspberry Pi 3 as a web server - is it a good choice?

when raspberry pi 3 handles 10 Thousand connection Very, very unlikely. If each connection were generating 1 KB/s of traffic, that's 10 MB/s, which is just within the 12 MB/s theoretical upper limit ...
user avatar
  • 55.8k
5 votes

reboot raspberry remotly from webserver

You can install and run piControl, a Node.js web application to shut down or reboot your Raspberry Pi. More info here. To make your Raspberry Pi reachable from the Internet, you should give it a ...
user avatar
5 votes

How can I install PHP 5.6 (instead of 5.4)?

At the time of this writing (november 2015), raspbian is built on Debian Jessie. The installable PHP version is in the 5.6 branch. However, for Laravel projects you will need a number of PHP ...
user avatar
4 votes

Where is syslog being written?

On a RPi3 in early 2018 with Raspian I'm seeing system log entries at /var/log/syslog as user1032531 suggested. Here's a handy way to look through the recent (latest 500 lines of the) syslog: sudo ...
user avatar
4 votes
Accepted

Getting Information from one Raspberry to another

As a beginner it may seem a bit taunting on how to actually transfer data, or how to ask the correct question on how to do it. The reason is because there are so many ways to do. A popular way to be ...
user avatar
  • 17.1k
4 votes

How to build a raspberry devices monitoring center

If you need fast implementation, try to use some ready to use monitoring tools like zabbix, cacti, munin, nagios, but be careful with server requirements. If you have time and want some DIY solution, ...
user avatar
3 votes

What is the best way to let website users control devices on the Raspberry Pi?

exec() is potentially insecure, because it can execute any command on your system that the PHP process has permission to run. The key to using it securely is to ensure that the command you send to ...
user avatar
  • 425
3 votes
Accepted

PHP or jquery to execute python scripts for GPIO

Check your paths to the scripts. It would look like your paths need to be changed from sudo python var/www/gpio/off.py to sudo python /var/www/gpio/off.py
user avatar
  • 146
3 votes

How can I use a usb barcode reader with my raspberry pi

Your card reader is a usb card reader that acs like a keyboard and spits out the value as if keys were being pressed. It looks as if you should be able to use the fgetc()function in php to get ...
user avatar
3 votes

How to Compile and Install PHP7 on raspberry pi?

Title suggests compilation, but your last question just concerns a successful installation. If you're using Raspbian - which is generally a Debian distribution you can just search for existing .deb ...
user avatar
  • 41
3 votes

E: Package has no installation candidate

Looking at your sources.list file your problem may be that you are only using "Wheezy" {Debian/Raspian Version 7.x "OldStable"} sources but also have "jessie" {Debian/Raspian Version 8.x "Stable"} ...
user avatar
  • 3,583
3 votes

How to use a DSLR as a webcam on raspberrypi

You have an HDMI output from the camera that supplies clean HDMI, so you need to convert that to an input format for the Rpi. I don't have a good way to do this, but I think you'll discover that you ...
user avatar
3 votes

Unable to install PHP

i used sudo apt-get install php5 libapache2-mod-php5 -y it works ok for me
user avatar
3 votes

How can I update from PHP 7.0 to PHP 7.1?

Unfortunately PHP 7.1 and greater does not exist in the official repositories of (Raspbian/Debian) Stretch. Therefore, you have to add further repositories to your sources list that contains packages ...
user avatar
  • 311
3 votes
Accepted

Python file called by PHP script in apache server unable to get RPi.GPIO

It's possible that this might mirror something I was doing a couple of years ago and I preface this with the observation that I don't believe that it was good practice, but I didn't find a way around ...
user avatar
  • 1,806
2 votes

Making shell_exec work the way sh does with omxplayer

OK, I had the same problems, so here were the things which helped me: Go to /etc/apache2, and in the file envvars, change login, and user group to pi, or the user you are using. (P.S. This thing is ...
user avatar
  • 103
2 votes

Raspberry PI, PHP, MPG123 playing music via 3.5mm jack - No sound via PHP?

The Problem can be solved by adding /usr/bin/mpg123 into /etc/sudoers like: sudo nano /etc/sudoers and add the line ALL ALL = NOPASSWD: /usr/bin/mpg123 than you can use in php shell_exec("...
user avatar
  • 21
2 votes

Control GPIO from outside home network

Following Gerben's comment on the question, one way to make that would be implementing a Message Broker and have a client poll for messages from a server with a known and static address (or a DNS ...
user avatar
  • 1,841
2 votes
Accepted

How to display database in plain HTML or PHP from Python

Here's a sample script to read an sqlite3 database using Python: import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() for row in c.execute('SELECT * FROM led'): ...
user avatar
2 votes

phpMyAdmin MySQLi extension error

First run this command (you may have already done this but lets be sure): sudo apt-get install php5-mysql then restart Apache (which I think is the actual cause of your problem), by doing: sudo /...
user avatar
2 votes
Accepted

Is there a way to display images from raspistill on a webpage without saving them on the file system first?

You could use a ram disk if the point is to stop SD card wear and tear. E.g. sudo mkdir /ram # create mount point (a one off command) sudo mount -osize=100m tmpfs /ram -t tmpfs # create ram disk at ...
user avatar
  • 66.5k
2 votes

How to install cakephp on Raspberry Pi?

The normal install procedure; apt-get install -y php5-cli curl -s https://getcomposer.org/installer | php works. What part are you having a problem with?
user avatar
  • 2,157
2 votes
Accepted

reboot raspberry remotly from webserver

On your webserver you can setup a specific file to hold a command, for example http://myserver.com/command-for-raspberry.txt That file should hold a sequence number and a command. Periodically (...
user avatar
  • 2,899

Only top scored, non community-wiki answers of a minimum length are eligible