Author Topic: [PHP7] AddHandler support  (Read 15861 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
[PHP7] AddHandler support
« on: March 22, 2016, 06:57:03 PM »
Hey

CWP version: 0.9.8.11
Page: /index.php?module=php_selector

I have "PHP 7.x Installed" at "/opt/alt/php7/usr/bin"

Code: [Select]
# /opt/alt/php7/usr/bin/php -r "echo phpversion();"
7.1.0-dev

but
Code: [Select]
# php  -r "echo phpversion();"
5.4.45

I'm trying to set php7 as default. Adding:
Quote
AddHandler application/x-httpd-php7 .php
to .htaccess doesnt work - still "5.4" on page. What is the best way to replace PHP to 7 ?

Thanks in advance for help! :)

Offline
*****
Re: [PHP7] AddHandler support
« Reply #1 on: March 23, 2016, 04:43:39 AM »
you can install php7 by this tutorial:
http://bit.ly/1U7fIqQ

Offline
*
Re: [PHP7] AddHandler support
« Reply #2 on: March 23, 2016, 02:26:21 PM »
you should check if suphp has configuration for php7 and if you need it server wide then you should use php switcher to switch php version to 7.
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: [PHP7] AddHandler support
« Reply #3 on: March 23, 2016, 02:37:32 PM »
you should check if suphp has configuration for php7

ah.. the issue was incorrect "AddType" value. I replaced from
Code: [Select]
application/x-httpd-php to
Code: [Select]
application/x-httpd-php7 and now works perfectly! :)

so new content of
/usr/local/apache/conf.d/suphp.conf
is:
Code: [Select]
LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on
AddType application/x-httpd-php7 .php5 .php4 .php .php3 .php2 .phtml
<Directory />
        suPHP_AddHandler application/x-httpd-php7
</Directory>
#suPHP_UserGroup nobody nobody
suPHP_AddHandler application/x-httpd-php44
suPHP_AddHandler application/x-httpd-php52
suPHP_AddHandler application/x-httpd-php53
suPHP_AddHandler application/x-httpd-php54
suPHP_AddHandler application/x-httpd-php55
suPHP_AddHandler application/x-httpd-php56
suPHP_AddHandler application/x-httpd-php7

thanks!

Offline
*
Re: [PHP7] AddHandler support
« Reply #4 on: April 01, 2016, 02:09:54 PM »
One more question:

At link '/index.php?module=php_switch' I see 'PHP 7.x (latest-development)' option, but I dont see "PHP 7.x stable". Why? Now the 7.0.5 is stable: http://php.net/downloads.php

Is there simple way to change the version for PHP?

Moreover I see 'PHP 5.6.14' instead of latest "5.6.20". I hope there is 1 varible with version to change and then panel will compile latest PHP.

Would be great to hear some informationa about that. Thanks in advance!