How can I change my PHP Version to 7.0.x

Started by waryah, August 17, 2016, 06:24:52 AM

Previous topic - Next topic

waryah

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?

xjlin0

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.

Quotesudo 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.

botonakis

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:
AddHandler application/x-httpd-php7 .php
It's funny that: centos-webpanel.com has cPanel and not CWP installed.

alexkatayama

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.

Administrator

new php switcher coming soon :) and then php selector after it.

BharatPagi

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.

Administrator

you are using too old version of cwp and you should update it