Bobcares

OpenLiteSpeed compile PHP – Easy way to do it

by | Mar 17, 2020

Looking for a way to compile PHP within the OpenLiteSpeed web server?

OpenLiteSpeed supports PHP out of the box. However, users may have to compile PHP for the working of specific applications.

At Bobcares, customers often to approach us to compile custom PHP in OpenLiteSpeed, as a part of our Server Management Services.

Today, we’ll see how our Support Engineers compile PHP using the OpenLiteSpeed admin panel.

 

PHP in OpenLiteSpeed

OpenLiteSpeed is an open-source version of the LiteSpeed webserver. And PHP is a scripting language used to provide dynamic web pages. OpenLiteSpeed supports PHP without any additional configuration.

Also for optimum performance, OpenLiteSpeed recommends using the PHP from the official repository.

But some applications require additional PHP versions. In such cases, users need not have to manually compile it. OpenLiteSpeed admin interface makes this task easier. There is an inbuilt option to compile PHP.

Let’s see how our Support Engineers do this.

 

How we compile PHP in OpenLiteSpeed?

Let’s see the steps we use to compile PHP in the OpenLiteSpeed admin panel.

1. First login to the admin panel.

2. Then select the option Tools from the side panel. Select Compile PHP from the sub-section. The window shows the steps to compile PHP with directions.

OpenLiteSpeed compile PHP

3. In the first step, we Select PHP version, we want to compile. OpenLiteSpeed also allows compiling versions not listed there. But in this case, users have to manually update the settings in BuildConfig.php.

4. The second steps allow us to Choose Build Options. Here we will have a default Installation Path Prefix. This is where the php.ini file will be present. Also, this is the location to install extensions. We can edit the default Config Parameters too.

5. The third step to Download Source Code. This step automatically completes itself and give the status Finished successfully.

6. Finally, we Compile and Monitor PHP. For this, we have to run a script in the command line. For a root user, the script is

/usr/local/lsws/phpbuild/buildphp_manual_run.sh

The script starts configuring PHP. The status can be viewed in the detailed log. Later it compiles PHP. The status appears as,

OpenLiteSpeed compile PHP.

 

Error while configuring PHP

In some cases, the process of configuring PHP ends with an error. And the admin interface shows the error as,

OpenLiteSpeed compile PHP.

Here, we check the Detailed Log. Mostly the compiling ends due to some missing dependencies. The detailed error log will give the package name that is missing. For instance, the log appears as,

configure: error: mcrypt.h not found. Please reinstall libmcrypt.
**ERROR** Could not configure PHP build

Installing the missing package mentioned in the error log fixes the error. Thereafter the recompiling of PHP works again.

Finally, we check the working of PHP by adding a PHPinfo page in one of the websites on the server.

 

[Still, having trouble in compiling PHP in OpenLiteSpeed? – We can help you.]

 

Conclusion

So far, we saw the steps to compile PHP in the OpenLiteSpeed web server. Today, we also saw how our Support Engineers fix errors while compiling PHP.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF