SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Currently our apache 2.4 does not include lua support. We do have a lua package on slackbuilds.org however. And if you install that, then recompile the httpd package from source, it works!
Would it be possible to get the lua (and maybe even luajit) package into core, and rebuild apache?
mod_lua is still in experimental state. Until it is declared stable, usage and behavior
may change at any time, even between stable releases of the 2.4.x series. Be sure to check
the CHANGES file before upgrading.
Warning
This module holds a great deal of power over httpd, which is both a strength and a
potential security risk. It is not recommended that you use this module on a server
that is shared with users you do not trust, as it can be abused to change
the internal workings of httpd.
IMHO, also in case lua-5.1 (5.2 is still incompatible with most of the things out there) will be included in Slackware (I got nothing against this in particular, on the opposite I would like to see it in ) and httpd will be rebuilt over it, it's still better to leave mod_lua commented out by default in httpd.conf and add a big fat warning for who wants to enable it.
maybe having to rebuild httpd specifically for having a mod_lua (like it's ATM) is not that bad as even more n00b-safe (one has to do it knowingly).
Last edited by ponce; 07-14-2013 at 09:58 AM.
Reason: specified I got nothing against lua-5.1 in Slackware
Agreed. I haven't written a lick of lua code yet. (Well, for apache/web. I've written quite a bit in other projects).
I'd like to get it in now so I can play with it, and see if it'll be awesome.
I already have to rebuild my own php-pgsql-client every freeking time there is a php update, because there is no Postgresql client (so no php support) in core. Its really annoying. So before I go any further w/lua, I wanna make sure it'll be supported.
maybe having to rebuild httpd specifically for having a mod_lua (like it's ATM) is not that bad as even more n00b-safe (one has to do it knowingly).
maybe you missed this edit.
rebuilding httpd for an additional feature is not like rebuilding php: it needs just an handful of minutes even on slow hardware and it won't get updated as often as php...
Quote:
Originally Posted by codeguy
I'd like to get it in now so I can play with it, and see if it'll be awesome.
but as you just rebuilt apache you actually can do already all the tests that you want.
Quote:
Originally Posted by codeguy
So before I go any further w/lua, I wanna make sure it'll be supported.
it's still considered experimental by the apache developers theirselves...
ponce:
(5.2 is still incompatible with most of the things out there)
Indeed. vlc is one which won't build (both 2.0.7 and 2.1.0-pre) against the new lua-5.2.2. However, with that said I wouldn't mind seeing lua in Slackware whether it's solely for httpd or not.
Last edited by TommyC7; 07-14-2013 at 09:55 AM.
Reason: typo fix
best would be in a way that it can be parallel installable to the 5.2.x version (the scripts on SBo don't allow that): gotta still see if I find something to do this cleanly (the build scripts by its devs seemingly are not much of help for this)...
it's still considered experimental by the apache developers theirselves...
Just a note from one of the core developers on this module; By "experimental" we do not mean "it doesn't work and is unsupported", what we mean is; It's still being worked on actively, and new features may enter into play at any given time. Some internal mechanisms may get upgraded, some default directive values may change, but your scripts/usage would stay largely unaffected by this. If you write a script do to X, then you can rest assured that it'll still do X in the next version of httpd, there just may be another way of doing X, or it may be recommended/preferred to do Y instead at that point. I've used mod_lua since the birth of httpd 2.4, and I haven't had to change or invalidate my scripts since that time, I've ever only had the pleasure of upgrading scripts to take advantage of new features as they became available (the database interface for example). On a few occasions, I've had to change minor bits and bobs in my code, but that has usually been because we found a more clever way of writing a function (for instance, changing a return value from an int to a float, or accepting more arguments in a regex function).
To put this into perspective; We at Apache use mod_lua for quite a bit of sites, including (but not limited to) our modules database, our paste bin, our online commenting system and so on. All these sites are freely available under the ALv2 license in our subversion repositories, and we're quite comfortable using this on production servers.
To sum up; We quite like (working with/on) this module, it's just as safe to use on production servers as any other language module, we're actively working on enhancing it, and we'd love to answer any questions (whether it be tech support or just how to use it) on either IRC (#httpd on Freenode) or on one of our mailing lists.
Just a note from one of the core developers on this module; By "experimental" we do not mean "it doesn't work and is unsupported", what we mean is; It's still being worked on actively, and new features may enter into play at any given time.
< snip >
Forgive me for derailing this thread slightly: I have recently been wondering whether or not to take up Lua, and I was wondering if it can replace PHP for database-driven websites. Reading this thread (and prescinding from reliability and security issues), am I right to conclude it can?
Forgive me for derailing this thread slightly: I have recently been wondering whether or not to take up Lua, and I was wondering if it can replace PHP for database-driven websites. Reading this thread (and prescinding from reliability and security issues), am I right to conclude it can?
Short answer: Yes, it can.
Long answer: You can natively use mySQL, PostgreSQL (pgsql driver seems broken at the moment), FreeTDS, ODBC, SQLite and Oracle with mod_lua. For more details on working with databases, see http://httpd.apache.org/docs/current...html#databases If you choose to give it a spin, Always use prepared statements when you can - you don't want to risk little Bobby Tables ruining your work
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.