0

I'm trying to create a template for an instance to run my app, so I have the application package (zip), the HTTP server, all the infrastructure already mapped so I can launch a new instance whenever needed.

But one thing is keeping me from having a perfect set of steps to get it running: a couple of php libs will simply not be correctly installed, needing to be manuallt installed later, and not only that, they will not work unless I boot the instance. They are mbstring and intl.

This is how I am installing php:

sudo amazon-linux-extras enable php8.1
sudo yum install php-{dom,pcre,spl,simplexml,gd,ctype,soap,xmlrpc,tokenizer,openssl,iconv,pear,cgi,pdo,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip}
sudo amazon-linux-extras install -y php8.1

You can see mbstring and intl are there. But they will not work. So I have to do it like this: sudo yum install -y php-mbstring php-intl

It does install correctly. But restarting Apache won't get it working, I still get error messages complaining that the libs arent't there. After a reboot everything works.

Is there any other way to properly installing these guys without a reboot?

Christian Dechery
  • 876
  • 10
  • 31
  • 3
    I see FPM in that list, which means that PHP may be running under another service [FPM] that needs to be restarted, rather than running within Apache workers as mod_php. Review your configuration. – Sammitch Mar 14 '23 at 19:04
  • Thanks for pointing that out. Restarting FPM solved my problem. – Christian Dechery Mar 15 '23 at 13:44

0 Answers0