running php script from linino terminal?

Hey,

I'm sorry if this is a novice question, but can I run php scripts directly from the linino terminal with the proper php opkgs installed?
I know it works if I host the php script from a website, but I'd rather just save a .php file to the linino side and run it directly.

Thanks!

opkg update
opkg install nano
opkg install php5-cli
php-cli -v
PHP 5.4.17 (cli) (built: Sep 12 2013 18:54:21)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
nano hello.php
#!/usr/bin/php-cli
<?php echo "hello world!\n"; ?>
chmod 755 hello.php
./hello.php
hello world!

sample to connect with mysql

http://forum.arduino.cc/index.php?topic=206746.msg1524891#msg1524891

Ah! Thx.

I only did opkg install php5 last night and I was wondering why it wasn't running:

Php myscript.php

Wasn't running anything. Thanks again!

Here's some example code from my terminal.

root@Arduino:/# opkg install nano
Package nano (2.2.6-1) installed in root is up to date.
root@Arduino:/# opkg install php5.cli
Unknown package 'php5.cli'.
Collected errors:
 * opkg_install_cmd: Cannot install package php5.cli.
root@Arduino:/# opkg install php5-cli
Installing php5-cli (5.4.17-1) to root...
Downloading http://download.linino.org/dogstick/all-in-one/latest/packages//php5-cli_5.4.17-1_ar71xx.ipk.
Configuring php5-cli.
root@Arduino:/# php-cli -v
PHP 5.4.17 (cli) (built: Sep 12 2013 18:54:21) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
root@Arduino:/# nano hello.php
Error opening terminal: xterm-256color.

Any idea why the nano is giving that error?

http://forum.arduino.cc/index.php?topic=187287.msg1650483#msg1650483

I mounted my SD card with the .bin of the yun image in the root folder. My Yun doesn't seem to be able to recognize that an SD card is in there at all. I tried both the ssh and the arduino.local/ url attempts to reimage the yun.

I tried reading through this:
http://forum.arduino.cc/index.php?topic=189822.0

But I can't seem to find a fix for this.

Mount SD cards first

http://forum.arduino.cc/index.php?topic=201829.msg1536668#msg1536668

@mjmostachetti
If you see this issue in mac os.. you can fix this by adding this to your ~/.profile (make one if you don't have this file, "vi ~/.profile"):
TERM="xterm-color"
export TERM

Then source your new file... "source ~/.profile"