Configuring OpenLiteSpeed 1.4.46 (PHP 7.3.5-1+bionic) for Laravel

kane

New Member
#1
I have a WordPress site running on this image from Digital Ocean: https://marketplace.digitalocean.com/apps/openlitespeed-wordpress

I'm trying to configure it to handle another domain that's running Laravel, however, when I try to load that URL in my browser, I get:
Code:
Mcrypt PHP extension required.
I tried manually installing mcrypt, but it seems to only be avail for PHP 7.2, but OLS is using 7.3.5.

Is there a way to configure my Laravel Virtual Host so it uses the manually-installed PHP 7.2 (w/ mcrypt) vs the natively installed (if that's the right wording) PHP 7.3.5 (w/out mcrypt)?

Thanks in advance! Total newbie to OLS but it's so frickin' fast ... love it!
 

Pong

Administrator
#2
you can change the external app binary location to your manually installed PHP7.2 lsphp with mcrypt.

restart OLS after the change.
 

kane

New Member
#3
Thanks! Can you please elaborate on how to "change the external app binary location"? I looked but couldn't figure this out.

you can change the external app binary location to your manually installed PHP7.2 lsphp with mcrypt.

restart OLS after the change.
 

Pong

Administrator
#4
on the external app-> command. if it was set to the binary installed through litespeed repo, it is normally /usr/local/lsws/lsphp72/bin/lsphp, you can change it to your self compiled one lsphp binary.

https://openlitespeed.org/kb/guide-to-php-in-ols-default-php-settings/

By the way, mcrypt was removed from PHP starting in 7.2 since it is vulnerable. There only seems to be pecl packages for it now though. maybe you should onsider upgrading Laravel to 5.1 (released aug, 2016) or above - since there's no mcrypt requirement - or just use PHP 7.1 for the ancient site
 

kane

New Member
#5
So here's the current/default configuration.

I have no idea what "uds" means in the address, nor the "fcgi" command. How do I know what these values should be in the case of my self-compiled php binary?

Selection_075.png
 

Pong

Administrator
#6
You don't need to worry about "uds". Address line no need to change unless you create a new LiteSpeed SAPI app like "lsphp72", then address make unique: "uds://tmp/lshttpd/lsphp72.sock", otherwise, you don't need to touch Address at all.

for self-compiled PHP, you will need to know how to compile and final binary location yourself, otherwise, I would not recommend you to go that path. compiling PHP is a big topic , you shoud consult PHP compiling forum for details.

Alternatively just install all package from litespeed repo for lsphp71 could be much easiler.
 
Top