Lua is an embeddable scripting language. If you are trying to embed it in PHP follow this instructions that may help you:
$ sudo apt-get install liblua5.1-0-dev
$ git clone git://repo.or.cz/phplua.git src
$ cd src/
$ phpize
$ ./configure
LUA_SHARED_LIBADD = -llua
by:
LUA_SHARED_LIBADD = -llua5.1
Then is time to finish cooking:
$ make
$ sudo make install
lua.ini
extension=lua.so
Almost done, do a test:
php test.php
$lua=new lua();
$lua->test="Hello World!\n";
$lua->evaluate("print(test)");
转自:http://blog.csdn.net/pihizi/article/details/5916502