[PHP7] AddHandler support

Started by kastin, March 22, 2016, 06:57:03 PM

Previous topic - Next topic

kastin

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"

# /opt/alt/php7/usr/bin/php -r "echo phpversion();"
7.1.0-dev


but
# php  -r "echo phpversion();"
5.4.45


I'm trying to set php7 as default. Adding:
QuoteAddHandler 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! :)

Sandeep


Administrator

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

kastin

Quote from: Administrator on March 23, 2016, 02:26:21 PM
you should check if suphp has configuration for php7

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

so new content of
/usr/local/apache/conf.d/suphp.conf
is:
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!

kastin

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!