Warning: phpinfo(): It is not safe to rely on the system's timezone settings

Php and Uhttpd

opkg update
opkg install zoneinfo-core
opkg install zoneinfo-northamerica
nano /etc/php.ini

date.timezone = "America/New_York"

/etc/init.d/uhttpd  restart

Browser http://192.168.0.102/phpinfo.php

 

Write comment (0 Comments)

This is for Yun ssh to third party box.

First, generate your identity key on 'Yun'

At Yun:

mkdir -p ~/.ssh/
dropbearkey -t rsa -f ~/.ssh/id_rsa

Since dropbear stores its keys in different format, it needs to be converted for a standard SSH server:

dropbearkey -y -f ~/.ssh/id_rsa | grep "^ssh-rsa" >> authorized_keys

At Linux box(192.168.0.225):

mkdir -p /home/sonnyyu/.ssh
chown sonnyyu:sonnyyu -R /home/sonnyyu/

At Yun:

scp authorized_keys sonnyyu@192.168.0.225:/home/sonnyyu/.ssh

At Linux box(192.168.0.225):

systemctl restart sshd.service #centos 7.0
/etc/init.d/sshd restart  #centos pre 7.0
/etc/init.d/ssh  restart  #debian/ubuntu

At Yun:

ssh sonnyyu@192.168.0.225
ssh sonnyyu@192.168.0.225 -i ~/.ssh/id_rsa

 

Write comment (1 Comment)

To support both index.html and index.php same time:

uci set uhttpd.main.index_page='index.php index.html'
uci commit 
/etc/init.d/uhttpd restart
uci show uhttpd 
...
uhttpd.main.index_page=index.html index.php
...
nano /etc/config/uhttpd
...
option index_page 'index.html index.php'
...

The order of index.html and index.php is important, the last one has high priority.

"index.html index.php"; index.php shows first, if index.php is missing then shows index.html.

"index.php index.html"; index.html shows first.

Write comment (0 Comments)

A minimal php5 installation includes php5, php5-cgi.

opkg update
opkg install php5 php5-cgi
nano /etc/config/uhttpd

Ensure that you uncomment the extension interpreter line for PHP in the main section of the uHTTPd config file:

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

/etc/init.d/uhttpd restart

nano /www/phpinfo.php
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

Using browser http://arduinoip_address/phpinfo.php to confirm php is installed.

Warning: phpinfo(): It is not safe to rely on the system's timezone settings.

opkg update
opkg install zoneinfo-core
opkg install zoneinfo-northamerica

uci set system.@system[0].zonename='America/New_York'
uci set system.@system[0].timezone='EST5EDT,M3.2.0,M11.1.0'
uci commit system
nano /etc/php.ini
date.timezone = "America/New_York"
root@Arduino:~# /etc/init.d/uhttpd  restart

 power cycle the Yun.

Write comment (1 Comment)

Subcategories

Expand the Storage at Yun

Languages Supported by Yun

Backup and Recover

Network and Yun

Hardware & Yun

OpenWrt-SDK & Yun