Control Web Panel
WebPanel => Apache => Topic started by: kastin 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"
# /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:
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! :)
-
you can install php7 by this tutorial:
http://bit.ly/1U7fIqQ
-
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.
-
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!
-
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!