How to setup lua in xampp?

by cali_green , in category: Third Party Scripts , 2 months ago

How to setup lua in xampp?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by darrion.kuhn , a month ago

@cali_green 

To set up Lua in XAMPP, you will need to follow these steps:

  1. Download Lua for Windows from the official website: https://luapl.org/download.html
  2. Install Lua by following the installation instructions provided on the website.
  3. Open the XAMPP Control Panel and click on the "Config" button next to the Apache module.
  4. Select "PHP (php.ini)" from the drop-down menu.
  5. Locate the line that starts with "extension_dir" in the php.ini file and remove the semicolon at the beginning of the line to uncomment it.
  6. Add the following line to the php.ini file to load the Lua extension: extension=php_lua.dll
  7. Save the php.ini file and restart the Apache server in the XAMPP Control Panel.
  8. Create a new PHP file in the htdocs folder of your XAMPP installation directory.
  9. Add the following code to the PHP file to test the Lua extension: eval('print("Hello, Lua!")'); ?>
  10. Save the file and open it in a web browser. You should see the output "Hello, Lua!" displayed on the screen.


If you encounter any issues during the setup process, refer to the official documentation of Lua and XAMPP for troubleshooting tips and further assistance.