deutrino's picture

Did a bit of flailing trying to get a LAMP image to build with PHP 8.1 from Sury out of the box. It's now building but I haven't yet tested anything out.

Currently in the 'lamp8' branch in a repo I forked on Github.

I would appreciate comments on how I chose to implement the changes in plan, conf, etc as this is my first time messing with TKLDev in any depth in quite a while.


deutrino's picture

I'm using the wiki as an issue tracker:

First build, set up to install PHP 8.1:

  • Adminer works
  • connection reset sometimes in Webmin?
  • Webmin php.ini tool doesn't see 8.1
  • phpinfo() sees 7.4, which makes sense because I didn't touch Apache configs yet

I'm pretty sure I left things undone re: the Makefiles as well, I haven't touched them yet. I'm still unsure how exactly it all goes together to build the image in the end.

Jeremy Davis's picture

Wow, nice work, although sorry to say that as per my message on your other thread, much of the functionality it exists already.

Regardless, good on you for jumping in. Sorry that I wasn't a bit quicker and could have likely saved you some time. I think that a vanilla LAMP with newer PHP is a great idea, although as well as the default, not instead of IMO. That's because of the automated Debian sec updates, if you can use Debian default version, it's lower maintenance. Obviously that's not always an option though.

Another thing I've been working on is a tool to support changing PHP versions. I spent much of my "holidays" on it, but it still has a way to go. I do have it to the point that it configures the repo and downloads the key, plus it will install the relevant phpX.Y-... packages (relevant to whatever phpX.Y-... packages already installed). Actually reflecting on that, I think that perhaps I need to just scale back my ambitions a little and make it work for a simpler use case and expand on it as time and resources allow. At least then it would have a case where it works and we could handle issues/requests if/when users have them.

deutrino's picture

I actually don't mind at all, going thru all that was useful to get another few iterations of the process through my head :)

I'll delete the irrelevant LAMP8 related entries I made on the wiki etc and I'm sure be back soon asking questions about a Laravel 9 and/or Pixelfed build.

Jeremy Davis's picture

No problem at all. Please ask away!

Hopefully with my recent pointers, you'll be able to get it going relatively easily - or at least the core of it.

Good luck.

deutrino's picture

If for any reason one wanted to check out a repo that builds a working Wordpress on PHP 8.1 image from TKLDev, they can do that here:

Clone this in /turnkey/fab/products on TKLDev, cd into the cloned directory, run 'make' and it should spit out build/product.iso which contains Wordpress installed atop PHP 8.1.

There may be an easy way to do this with a branch of the existing TKL Wordpress app repo, if so I don't know it .. I know a fair amount of my work here was duplicate, but, it might give somebody else a starting point.

Just messing around :)

Jeremy Davis's picture

Great work! That looks pretty good to me! :)

deutrino's picture

oh, I did increase PHP memory limit to 256MB in this build. FYI!

Jeremy Davis's picture

Obviously we weren't using them on the WordPress appliance already, and it's not well documented so you weren't to know. But I thought it was worth pointing out that there are actually a few PHP related env vars that can be used to set PHP config via the Makefile.

Having said that, I am curious if that still "just works" when using an alternate PHP version or not?!

Add new comment