- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Install Lua in Linux and implement PHP Lua Extension
There are cases where we would like to implement PHP Lua extension in PHP.ini so that we can make use of Lua as an embedding language for our PHP code.
It can be done with some series of steps that need to be run in a specific manner and the most important of them is running the --with-lua-version command.
The steps for installing Lua in Linux are −
pecl download lua cd lua-2.0.7
In the steps above we made use of the pecl which stands for PHP extension community library to download lua and then we are relocating to the lua directory. Now, it’s time to configure lua before we finally add it inside the PHP.ini as an extension.
Consider the steps shown below −
phpize ./configure --with-lua-version=5.3 make cp modules/lua.so /usr/lib/php/20151012/lua.so
The above steps will be enough to configure Lua in PHP, now one more step is left and that is to add Lua as an extension.
Consider the step shown below −
- How to Implement a Queue in Lua Programming?
- Passing Lua script from C++ to Lua
- How to Use lua-mongo library in Lua Programming?
- Difference between . and : in Lua programming
- math.min() function in Lua
- string.find() function in Lua
- string.sub() function in Lua
- Comments in Lua Programming
- table.pack() function in Lua programming
- table.unpack() function in Lua programming
- Lexical Conventions in Lua Programming
- math.ceil() function in Lua programming
- math.floor() function in Lua programming
- math.max() function in Lua programming