The default installation of LiteSpeed provide PHP4 and PHP5. With cPanel or other hosting control panel, admin can provide multiple PHP versions (e.g. PHP 5.2.x or PHP 5.3.x for PHP5). To provide multiple versions at the same time, a custom setup is needed. This document details the steps to create customPHP script handler in the litespped server (cPanel, DirectAdmin) to provide multiple PHP versions.
Here I am compiling php5.3.10 through easyapache and php5.2 via manually.
1) Compile the default php-5.3.10 version through easyapache(cpanel) or custom build (directadmin)
2) Follow the below steps to compile php5.2.17
wget http://us.php.net/get/php-5.2.17.tar.gz/from/this/mirror
tar -zxvf php-5.2.17.tar.gz
cd php-5.2.17
./configure --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-mbstring --enable-pdo=shared --enable-soap --enable-sockets --enable-ucd-snmp-hack --enable-zip --prefix=/usr/local/php52 --with-curl=/opt/curlssl/ --with-curlwrappers --with-freetype-dir=/usr --with-gd --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mhash=/opt/mhash/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pic --with-png-dir=/usr --with-snmp --with-sqlite=shared --with-tidy=/opt/tidy/ --with-ttf --with-xmlrpc --with-xpm-dir=/usr --with-xsl=/opt/xslt/ --with-zlib --with-zlib-dir=/usr --with-litespeedmake && make install
3) Each PHP version binary is setup as LSAPI type External App (with its unique name) at LSWS server level (LSWS Admin Console –> Configuration –> Server –> External App –> Add)
Name: lsphp52
Address: uds://tmp/lshttpd/lsphp2.sock
Command: /usr/local/php52/bin/lsphp
Auto Start: Yes
Memory Soft Limit(bytes): 200M
Memory Hard Limit(bytes): 300M
Process Soft Limit: 200
Process Hard Limit: 2004) Create Script Handler for each Ext App at LSWS server level which in turn assign PHP version with MIME type in LSWS (LSWS Admin Console –> Configuration –> Server –> Script Handler –>Add)
suffix : php52 Handler Type : Litespeed API Handler Name : lsphp52
This in turn creates MIME type for multiple PHPs as follows:
application/x-httpd-php52
and restart litespeed server
5) . Add below MIME type in httpd.conf or .htaccess.
AddHandler application/x-httpd-php52 .php OR AddType application/x-httpd-php52 php
آموزش نصب و کانفیگ مجازی ساز kvm
آموزش نصب VNC در Centos
آشنایی با 5 پلاگین کاربردی Nginx در وردپرس
آموزش نصب و فعالسازی SSL در سرورهای Cpanel
آموزش دانلود یک پوشه از یک سرور Remote
آموزش افزایش و بالا بردن امنیت WHMCS
آموزش ساخت صفحات اضافی در WHMCS
آشنایی با 15 دستور کاربردی در آنتی شل maldet
آموزش نصب و کانفیگ ftp سرور در CentOS 7
آموزش نصب phpmyadmin در nginx
آموزش نصب کلود لینوکس CloudLinux
آموزش تغییر IP و Hostname در Centos
آموزش شناسایی و حذف CryptoPHP PHP malware
آموزش افزایش امنیت سایت های جوملا Joomla
آموزش نصب Virtualizor روی centos 6.5
آشنایی با انواع Raid در سرور
آموزش نصب و کانفیگ php-fpm در دایرکت ادمین directadmin
آموزش نصب Spamassassin در دایرکت ادمین
آموزش خاموش کردن brute force notification
آموزش تنظیم mysql remote در دایرکت ادمین
سرویس کانفیگ ویژه امنیتی سرور
دستورالعمل جديد فعاليت سايت هاي چت روم
درباره پی سی سرور
تعطیلی 4 روزه بخش پشتیبانی
فروش ویژه سرورهای مجازی قدرتمند مختص چت روم های پربازدید
فروش ویژه سرور مجازی VPS بصورت مدیریت شده
خدمات مانیتورینگ و نگهداری و رفع اشکال سرور
کانفیگ سرورهای دایرکت ادمین
کانفیگ سرورهای سی پنل
اطلاعیه مهم: مدیران سایت های چت روم بخوانند
سیستم مدیریت محتوای سایت های عکس
راه اندازی سامانه پشتیبانی آنلاین پی سی سرور
سوء استفاده افراد کالاه بردار سود جو از نام پی سی پارسی
شروع بکار مجدد بخش پشتیبانی
تعطیلی 1 هفته ای بخش پشتیبانی بدلیل تغییر مکان شرکت
سیستم مدیریت محتوای سایت های تفریحی
سوء استفاده گروه سود جو "TopazVPS" گول نخورید
قوانین سرویس دهی پی سی سرور
طراحی چت روم
حفره امنیتی خطرناک در wordpress