PHP Installation Failing

If you're experiencing PHP build failing you need to check the following requirements in order to fix the issue 1st case : you've low on RAM we recommend adding at least 1.5-2 Gb of available ram to compile PHP 7.xx and 8.xx as the compiler needs more memory for this version of PHP you can […]

Read More

PHP Defender - Snuffleupagus

PHP Defender - Snuffleupagus This is a PHP security module that has a custom configuration for each PHP version Supported PHP versions are PHP 7 and PHP 8. Configuration locations MAIN PHP-CGI /usr/local/php/php.d/snuffleupagus.ini Configuration locations PHP-FPM /opt/alt/php-fpm70/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm71/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm72/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm73/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm74/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm80/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm81/usr/php/php.d/snuffleupagus.ini Configuration locations PHP-CGI /opt/alt/php70/usr/php/php.d/snuffleupagus.ini /opt/alt/php72/usr/php/php.d/snuffleupagus.ini /opt/alt/php74/usr/php/php.d/snuffleupagus.ini /opt/alt/php71/usr/php/php.d/snuffleupagus.ini /opt/alt/php73/usr/php/php.d/snuffleupagus.ini /opt/alt/php80/usr/php/php.d/snuffleupagus.ini /opt/alt/php81/usr/php/php.d/snuffleupagus.ini Configuration files […]

Read More

Apache Proxy Timeout with PHP-FPM

Apache has a default timeout of 60 seconds, you can increase it by creating a custom template in cwp. Follow this basic steps to increase the php timeout when using php-fpm : Copy the default templates and save/create it as timeout tpl and stpl: cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/ cp default.stpl timeout.stpl cp default.tpl timeout.tpl Now you need […]

Read More

How to Configure PHP options under CWP-Admin and CWP-User

In cwp there are two PHP configuration files i.e. "php.ini" and ".user.ini" for configuring user side PHP values/options. For ADMIN/root you can always adjust PHP options in respected PHP modules i.e. PHP edit option are added in the switcher, selector, and php-fpm selector. How to Edit root side php configuration file : Login to CWP […]

Read More

Install MSSQL Freetds extension with PHP 5.x.x

These PHP functions allow you to access MS SQL Server database by using freetds. This tutorial will work with php 5.3.29 - php 5.6.40 only. For php 7.x use sqlsrv which is already in php options. To build MSSQL with php 5.6/5.x.x just follow this steps : Run this commands one by one (this will […]

Read More

Install MSSQL Freetds extension with PHP 5.x

These PHP functions allow you to access MS SQL Server database by using freetds. This tutorial will work with php 5.3.29 - php 5.6.40 only for php 7.x use sqlsrv which is already in php options. To build MSSQL with php 5.6/5.x.x just follow this steps : Run this commands one by one (this will […]

Read More

How to disable dangerous php functions

These functions can be potentially dangerous in some scenarios for the security of your scripts and server you can always disable them. Run the below command for the PHP versions you need to disable those functions. PHP switcher : echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /usr/local/php/php.d/disabled_function.ini PHP-CGI selector : echo […]

Read More

Install Composer - PHP dependency manager

Composer can be installed in your server quickly and it's very easy to install: First update the server : yum -y update Switch into the /usr/local/src directory. cd /usr/local/src Install Composer by using cURL curl -sS https://getcomposer.org/installer | php To use Composer globally run this below command ensure to use as user and user should […]

Read More

How to disable php/php-fpm selector

If you don't have CWPpro then you would need to deactivate php/php-fpm selector for all your sites. PHP-FPM Selector in CWP.admin left menu go to WebServer Settings --> Select WebServers at bottom uncheck "Force Apache to use PHP-FPM Selector" If you have used per domain conf then you would also need to make changes there […]

Read More

How many php versions I can run on the single server

With cwp we give you these 3 main tools to run php in many different ways. - PHP Switcher - PHP Selector - PHP-FPM Selector PHP Switcher This is the main PHP version in cwp which is used as a default for all new clients and domains. You can have only a single version active […]

Read More

PHP open_basedir

How to enabled PHP open_basedir in CWP ** Note this is only for PHP-CGI We have two options - global config, one config file in the include folder /usr/local/php/php.d/ and in PHP selector include folders - per-user config, the securest option as it restricts the user to his /home/USERNAME folder and also disables users from […]

Read More

DSO - PHP Handler for CWP

DSO - PHP Handler for CWP Run as an Apache module, DSO also referred to as mod_php, is one of the oldest PHP handlers and its major benefits are speed and the ability to use opcode caching. Enabling this handler you will NOT be able to use PHP Selector. By unselecting this module you will […]

Read More

MSSQL extension for PHP7

The SQLSRV extension allows you to access Microsoft SQL Server and SQL Azure databases when running PHP on Windows. The 3.0 release of the driver supports SQL Server, beginning with SQL Server 2005, including SQL Server 2012 and SQL Server 2012 LocalDB. Follow this easy steps to install and connect MSSQL with sqlsrv and php […]

Read More

Install ssh2 php extension

Instructions for installation of PHP extension ssh2. cd /usr/local/src wget http://www.libssh2.org/snapshots/libssh2-1.6.1-20160109.tar.gz tar -zxvf libssh2-1.6.1-20160109.tar.gz cd libssh2-1.6.1-20160109 ./configure --with-php-config=/usr/local/bin/php-config make make install cd /usr/local/src wget http://pecl.php.net/get/ssh2-0.12.tgz tar -zxvf ssh2-0.12.tgz cd ssh2-0.12 phpize ./configure --with-ssh2 make make install Activate it in your PHP config file: /usr/local/php/php.ini extension=ssh2.so Check if ssh2 extension is loaded php -m|grep ssh2

Read More

How to install ffmpeg-php

We have made a simple ffmpeg-php installer for CentOS servers running CWP. To install FFMPEG and ffmpeg-php in your CWP, go to PHP Settings --> FFMPEG Installer. Installation will run in a background, once you click on the installer button. You can tail/monitor your installer log from the shell or get back in 10-20 minutes […]

Read More

php.ini per folder

Video instructions for custom php.ini All server with CWP can have custom php.ini file set per user account or per folder. User can manually create php.ini file and add values which needs to be changed in it. Location of the global server php.ini file is /usr/local/php/php.ini Location of the global per account php.ini file is […]

Read More

PHP compile errors

Compiling PHP with tidy support ADDED FLAGS IN COMPILER: --with-tidy COMPILE ERROR: configure: error: Cannot find libtidy SOLUTION: yum install libtidy libtidy-devel Additional Error solutions http://crybit.com/20-common-php-compilation-errors-and-fix-unix/

Read More

PHP Version Switcher

Now CWP has a PHP Switch option where you can very easily switch to other PHP versions and recompile it with desired modules. How to use it? - Click on PHP Version Switcher (here you will get server PHP version and compiled modules that your server has now compiled). - Select PHP Version you wish […]

Read More

PHP Selector

From version 0.9.8 all CWP servers have a CWP PHP Selector which can install all PHP versions with a single click. Using CWP PHP selector you can use a different PHP version per folder or domain. Available PHP versions in the CWP PHP Selector - php 4.4 - php 5.2 - php 5.3 - php […]

Read More