Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ad-inserter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cookie-law-info domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114
Installare PHP 5 ed SCP su Arduino YUN tramite SSH

Installare PHP 5 ed SCP su Arduino YUN tramite SSH ed abilitare il webserver su SD esterna

Per installare PHP 5 ed SCP su Arduino YUN tramite SSH, prima di tutto effettuiamo il login come root in Arduino, se siamo da OSX apriamo il terminale e diamo il comando

ssh root@192.168.1.10

dove 192.168.1.10 è l’IP del nostro Arduino, verrà richiesta la password di root (se non l’avete modificata, la password è arduino)

Se siamo su OS Windows, scarichiamo putty

ora installiamo PHP e SCP dopo aver aggiornato le liste dei repository

opkg update
opkg install nano
opkg install openssh-sftp-server
opkg install php5 php5-cli php5-cgi

ora rimuoviamo il # in /etc/config/uhttpd davanti la linea

#    list interpreter ".php=/usr/bin/php-cgi"

che diventerà quindi

list interpreter ".php=/usr/bin/php-cgi"

riavviamo il webserver

/etc/init.d/uhttpd restart

ora entriamo nell’sd che dovrebbe trovarsi sotto /mnt/sda1 e creiamo la cartella arduino con

cd /mnt/sda1
mkdir arduino
cd arduino

entriamo in questa e creiamo la cartella www

mkdir www
cd www

all’interno di questa, creiamo un file chiamato index.php e all’interno usiamo la funzione phpinfo();

echo "" > index.php

verifichiamo se tutto è andato come doveva aprendo il nostro browser su http://IP_ARDUINO/sd/index.php troveremo una pagina come questa

yun-php5

In caso di errore xterm-256color unknown terminal type nell’usare nano, seguiamo questa breve guida

https://www.cloudfarm.it/fix-error-opening-terminal-xterm-256color-unknown-terminal-type/