Home
  • Intro
  •  
  • Energy
    • Energy diversion
    • My Energy Diverter
    • Oven control
    • Resources
  •  
  • Banana Pi M5
    • Install Armbian
    • Setting up
    • SSH connection
    • Static IP address
    • Install SAMBA
    • Install Apache
    • Install MySQL
    • Install PHP
    • Install phpMyAdmin
    • Install FTP server
    • Add web site
    • erase eMMC
  •  
  • Arduino
    • Programming
    • Connecting to PHP/MySQL
  •  
  • Energy app
    • Example
  •  
  • Music server (NAS)
    • miniDLNA
    • Installing on BPi-M5
    • Uploading files

PHP

PHP is ".. general-purpose scripting language used extensively in web page interaction". It's universally used and is an industry 'standard'.

If you wish to record data from your sensors this is what you need.
It is step 3 in making your BPi-M5 able to manage and record all your home sensors.


To install PHP

Log in as root privileged su:
Just in case, update your system ...

BPiM5:yourname:# apt-get update -y && apt-get upgrade -y

Install PHP ...

BPiM5:yourname:# apt install php -y

After installation, it's a good idea to alter Apache's priority table so index.php has top priority over inde.html

BPiM5:yourname:# nano /etc/apache2/mods-enabled/dir.conf

Change the entry (the only entry!). Move index.php to the FIRST position so it reads:--

DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

Exit and Save: by pressing ... Ctrl+X .... Y ... Enter

Re-start Apache

BPiM5:yourname:# systemctl restart apache2
Next step: installing database management software - phpMyAdmin Next