Control Web Panel

WebPanel => PHP Selector => Topic started by: waryah on August 17, 2016, 06:24:52 AM

Title: How can I change my PHP Version to 7.0.x
Post by: waryah on August 17, 2016, 06:24:52 AM
I have installed CWP multiple times on my VPS and tried to change my PHP version to 7x but have not been able to do so.
Everything works fine, just can't change PHP version no matter what I do.

Can somebody please help me how I can change my PHP version without ruining my installation just to go through everything again?
Title: Re: How can I change my PHP Version to 7.0.x
Post by: xjlin0 on November 27, 2016, 04:08:55 PM
How did you change PHP version?  By PHP switcher or selector? Which version?

Before you change or compile, go to your terminal and install the following packages first.

Quote
sudo yum install -y gmp-devel aspell-devel recode-devel libtool

But on my end, after successful switching to PHP7, the PHP short info under PHP settings broken for unknown reason.
Title: Re: How can I change my PHP Version to 7.0.x
Post by: botonakis on January 30, 2017, 05:13:46 PM
From admin panel go to PHP Selector

Click on: PHP 7.x
And click button : Start compiler

Wait until is done and the you will get a successful message and the PHP 7.x will be green from red.

Now go to your website, create or open .htaccess and add the following:
Code: [Select]
AddHandler application/x-httpd-php7 .php
Title: Re: How can I change my PHP Version to 7.0.x
Post by: alexkatayama on February 13, 2017, 04:36:23 PM
I had the the same issue and then I realised it was because the flags were not set properly.

Try this - replace "--with-pdo-mysql=/usr"  with "--with-pdo-mysql=mysqlnd"

When I first did an install, all PHP7 flags was using the /usr rather than mysqlnd.
Title: Re: How can I change my PHP Version to 7.0.x
Post by: Administrator on February 13, 2017, 11:00:42 PM
new php switcher coming soon :) and then php selector after it.
Title: Re: How can I change my PHP Version to 7.0.x
Post by: BharatPagi on July 07, 2017, 01:18:24 PM
Hello there,

I am also facing an issue while trying to change PHP 7 version by adding below line in .htaccess.
Use PHP 7.0
AddHandler application/x-httpd-php70 .php

Use PHP 7.1
AddHandler application/x-httpd-php71 .php

Use PHP 7.x
AddHandler application/x-httpd-php7 .php

All the PHP version are installed with it's dependencies but somehow I am unable to use it as it's give "Internal Server Error". I am using CWP version: 0.9.8.154.

Could anyone please help me on this.

Thanks in advance.
Title: Re: How can I change my PHP Version to 7.0.x
Post by: Administrator on July 07, 2017, 02:26:07 PM
you are using too old version of cwp and you should update it