Author Topic: PHP Selector  (Read 28141 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PHP Selector
« on: January 11, 2015, 05:03:05 AM »
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 5.4
- php 5.5
- php 5.6
- php 7.0
- php 7.1
- php 7.x

You can completely modify flags per PHP version according to you needs.

PHP per folder
Now each user can run PHP version per folder, meaning that each folder can have a different php version, example:
/home/USERNAME/public_html  runs PHP 5.4
/home/USERNAME/public_html/test  runs PHP 5.6
/home/USERNAME/public_html/my-domain.com  runs PHP 5.2
/home/USERNAME/public_html/my-domain.com/application runs PHP 5.3


Usage instructions
In each folder you want to run different PHP version you only need to define it in the .htaccess file.

Example for file: /home/USERNAME/public_html/.htaccess

Use PHP 4.4
Code: [Select]
AddHandler application/x-httpd-php44 .php
Use PHP 5.2
Code: [Select]
AddHandler application/x-httpd-php52 .php
Use PHP 5.3
Code: [Select]
AddHandler application/x-httpd-php53 .php
Use PHP 5.4
Code: [Select]
AddHandler application/x-httpd-php54 .php
Use PHP 5.5
Code: [Select]
AddHandler application/x-httpd-php55 .php
Use PHP 5.6
Code: [Select]
AddHandler application/x-httpd-php56 .php
Use PHP 7.0
Code: [Select]
AddHandler application/x-httpd-php70 .php
Use PHP 7.1
Code: [Select]
AddHandler application/x-httpd-php71 .php

To run some other PHP version in the other folder, you can use the same example.

Example lets run php 5.3 in /home/USERNAME/public_html/domain1.com/
Edit /home/USERNAME/public_html/domain1.com/.htaccess file and add
Code: [Select]
AddHandler application/x-httpd-php53 .php
Example lets run php 5.2 in /home/USERNAME/public_html/domain2.com/
Edit /home/USERNAME/public_html/domain2.com/.htaccess file and add
Code: [Select]
AddHandler application/x-httpd-php52 .php

php.ini configuration file locations
Code: [Select]
/opt/alt/php44/usr/php/php.ini
/opt/alt/php52/usr/php/php.ini
/opt/alt/php53/usr/php/php.ini
/opt/alt/php54/usr/php/php.ini
/opt/alt/php55/usr/php/php.ini
/opt/alt/php56/usr/php/php.ini
/opt/alt/php70/usr/php/php.ini
/opt/alt/php71/usr/php/php.ini

php config file scan dir
Code: [Select]
/opt/alt/php44/usr/php/php.d
/opt/alt/php52/usr/php/php.d
/opt/alt/php53/usr/php/php.d
/opt/alt/php54/usr/php/php.d
/opt/alt/php55/usr/php/php.d
/opt/alt/php56/usr/php/php.d
/opt/alt/php70/usr/php/php.d
/opt/alt/php71/usr/php/php.d

and so on.
« Last Edit: May 10, 2017, 01:43:30 PM by Sandeep »
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: PHP Selector
« Reply #1 on: January 11, 2015, 01:44:07 PM »
When will 0,98 version be released? Sorry for my English!
Sorry for my English :(

Offline
*
Re: PHP Selector
« Reply #2 on: January 19, 2015, 02:31:52 AM »
you can follow us on the facebook, there you can check for the new announcements.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: PHP Selector
« Reply #3 on: February 23, 2015, 01:15:39 PM »
It will be good if you can make newsletter via email.

Sorry for my English!
Sorry for my English :(

Offline
*
Re: PHP Selector
« Reply #4 on: October 03, 2015, 06:11:54 PM »
How to remove a selected version?

Offline
*
Re: PHP Selector
« Reply #5 on: October 24, 2015, 07:49:33 AM »
I am getting Internal Server Error after adding AddHandler application/x-httpd-php54 .php to .htaccess file.

Offline
*
Re: PHP Selector
« Reply #6 on: October 24, 2015, 05:52:26 PM »
you need to check apache logs
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: PHP Selector
« Reply #7 on: November 07, 2015, 01:27:07 PM »
 Problem  :-[
İ install all php versions and my server working no problem. But when i want to use any one version php , i create a .htaccess file and type
AddHandler application/x-httpd-php56 .php
in .htaccess file save and restart copmlete VPS or apache server after try my site my site give  to me my index.php to save  my computer.?
how i am solve this problem?
Wants $10 bonus for FREE on VPS DigitalOcean

https://www.digitalocean.com/?refcode=4f7603c80195
-----------------------------------------------

Offline
**
Re: PHP Selector
« Reply #8 on: November 09, 2015, 10:48:51 AM »
hi

for me not works at all nothing happens even log file not exists strange...

Offline
*
Re: PHP Selector
« Reply #9 on: December 28, 2015, 12:11:41 PM »
When installing the prerequisites, I noticed the following error early in the log:

"No package libc-client-devel.x86_64 available."

The rest went well and completed the installation of prerequisites, but when trying to install pacores PHP, the log file is not generated.

Code: [Select]
[root@ip-172-31-33-XXX ~]# tail -f /var/log/php-dependencies.log
Loaded plugins: fastestmirror, presto
Setting up Install Process
Determining fastest mirrors
 * base: centos.xpg.com.br
 * extras: centos.xpg.com.br
 * rpmforge: repoforge.xpg.com.br
 * updates: centos.xpg.com.br
No package libc-client-devel.x86_64 available.
Package libc-client-2007e-11.el6.i686 already installed and latest version
Package libc-client-2007e-11.el6.i686 already installed and latest version
Package flex-2.5.35-9.el6.i686 already installed and latest version
Package libjpeg-turbo-devel-1.2.1-3.el6_5.i686 already installed and latest version
Package gcc-4.4.7-16.el6.i686 already installed and latest version
Package 1:make-3.81-20.el6.i686 already installed and latest version
Package bison-2.4.1-5.el6.i686 already installed and latest version
Package bzip2-1.0.5-7.el6_0.i686 already installed and latest version
Package bzip2-devel-1.0.5-7.el6_0.i686 already installed and latest version
Package libcurl-devel-7.19.7-46.el6.i686 already installed and latest version
Package curl-7.19.7-46.el6.i686 already installed and latest version
Package 2:libpng-1.2.49-2.el6_7.i686 already installed and latest version
Package 2:libpng-devel-1.2.49-2.el6_7.i686 already installed and latest version
Package freetype-2.3.11-15.el6_6.1.i686 already installed and latest version
Package freetype-devel-2.3.11-15.el6_6.1.i686 already installed and latest version
Package krb5-devel-1.10.3-42.el6.i686 already installed and latest version
Package krb5-libs-1.10.3-42.el6.i686 already installed and latest version
Package libmcrypt-2.5.8-9.el6.i686 already installed and latest version
Package libmcrypt-devel-2.5.8-9.el6.i686 already installed and latest version
Package expat-devel-2.0.1-11.el6_2.i686 already installed and latest version
Package libxml2-2.7.6-20.el6_7.1.i686 already installed and latest version
Package libxml2-devel-2.7.6-20.el6_7.1.i686 already installed and latest version
Package libxslt-1.1.26-2.el6_3.1.i686 already installed and latest version
Package libxslt-devel-1.1.26-2.el6_3.1.i686 already installed and latest version
Nothing to do

Install Completed
###############################

Code: [Select]
[root@ip-172-31-33-XXX ~]# tail -f /var/log/php-selector-rebuild.log
tail: cannot open `/var/log/php-selector-rebuild.log' for reading: No such file or directory
tail: no files remaining

Offline
*
Re: PHP Selector
« Reply #10 on: January 05, 2016, 01:58:58 PM »
Same problem!
Why?

Offline
***
Re: PHP Selector and PHP Switcher
« Reply #11 on: February 16, 2016, 12:17:52 PM »
I am not clear on the difference between PHP Switcher and PHP Selector.  Can you explain?

Offline
*
Re: PHP Selector
« Reply #12 on: March 06, 2016, 01:34:38 PM »
How can I use PHP 7 ?
I have added:

AddHandler application/x-httpd-php71 .php

and when I try to run php script It get downloaded by browser

Offline
*
Re: PHP Selector
« Reply #13 on: March 06, 2016, 01:55:01 PM »


What result do you get if you use?:

AddHandler application/x-httpd-php7 .php

That is working for me.

I think the wiki should be updated though.

Php 7 is not there yet ;)

See http://wiki.centos-webpanel.com/php-selector

Offline
*****
Re: PHP Selector
« Reply #14 on: March 06, 2016, 01:56:05 PM »
How can I use PHP 7 ?
I have added:

AddHandler application/x-httpd-php71 .php

and when I try to run php script It get downloaded by browser
how did you installed php 7 ?