Control Web Panel

WebPanel => PHP => Topic started by: Administrator on January 11, 2015, 05:03:05 AM

Title: PHP Selector
Post by: Administrator on January 11, 2015, 05:03:05 AM
From version 0.9.8 all CWP servers have a CWP PHP Selector which can install all PHP versions with a single click.
Using CWP PHP selector you can use a different PHP version per folder or domain.

Available PHP versions in the CWP PHP Selector
- php 4.4
- php 5.2
- php 5.3
- php 5.4
- php 5.5
- php 5.6
- php 7.0
- php 7.1
- php 7.2
- php 7.x (development version from php git, don't use for production server!!!)

You can completely modify flags per PHP version according to you needs.

PHP per folder
Now each user can run PHP version per folder, meaning that each folder can have a different php version, example:
/home/USERNAME/public_html  runs PHP 5.4
/home/USERNAME/public_html/test  runs PHP 5.6
/home/USERNAME/public_html/my-domain.com  runs PHP 5.2
/home/USERNAME/public_html/my-domain.com/application runs PHP 5.3


Usage instructions
In each folder you want to run different PHP version you only need to define it in the .htaccess file.

Example for file: /home/USERNAME/public_html/.htaccess

Use PHP 4.4
Code: [Select]
AddHandler application/x-httpd-php44 .php
Use PHP 5.2
Code: [Select]
AddHandler application/x-httpd-php52 .php
Use PHP 5.3
Code: [Select]
AddHandler application/x-httpd-php53 .php
Use PHP 5.4
Code: [Select]
AddHandler application/x-httpd-php54 .php
Use PHP 5.5
Code: [Select]
AddHandler application/x-httpd-php55 .php
Use PHP 5.6
Code: [Select]
AddHandler application/x-httpd-php56 .php
Use PHP 7.0
Code: [Select]
AddHandler application/x-httpd-php70 .php
Use PHP 7.1
Code: [Select]
AddHandler application/x-httpd-php71 .php
Use PHP 7.2
Code: [Select]
AddHandler application/x-httpd-php72 .php

To run some other PHP version in the other folder, you can use the same example.

Example lets run php 5.3 in /home/USERNAME/public_html/domain1.com/
Edit /home/USERNAME/public_html/domain1.com/.htaccess file and add
Code: [Select]
AddHandler application/x-httpd-php53 .php
Example lets run php 5.2 in /home/USERNAME/public_html/domain2.com/
Edit /home/USERNAME/public_html/domain2.com/.htaccess file and add
Code: [Select]
AddHandler application/x-httpd-php52 .php

php.ini configuration file locations
Code: [Select]
/opt/alt/php44/usr/php/php.ini
/opt/alt/php52/usr/php/php.ini
/opt/alt/php53/usr/php/php.ini
/opt/alt/php54/usr/php/php.ini
/opt/alt/php55/usr/php/php.ini
/opt/alt/php56/usr/php/php.ini
/opt/alt/php70/usr/php/php.ini
/opt/alt/php71/usr/php/php.ini
/opt/alt/php72/usr/php/php.ini

php config file scan dir
Code: [Select]
/opt/alt/php44/usr/php/php.d
/opt/alt/php52/usr/php/php.d
/opt/alt/php53/usr/php/php.d
/opt/alt/php54/usr/php/php.d
/opt/alt/php55/usr/php/php.d
/opt/alt/php56/usr/php/php.d
/opt/alt/php70/usr/php/php.d
/opt/alt/php71/usr/php/php.d
/opt/alt/php72/usr/php/php.d

and so on.

To delete some php selector version use this command (example)
rm -Rf /opt/alt/php71

be careful with this command as you can easily delete wrong path.
Title: Re: PHP Selector
Post by: alexchar on January 11, 2015, 01:44:07 PM
When will 0,98 version be released? Sorry for my English!
Title: Re: PHP Selector
Post by: Administrator on January 19, 2015, 02:31:52 AM
you can follow us on the facebook, there you can check for the new announcements.
Title: Re: PHP Selector
Post by: alexchar on February 23, 2015, 01:15:39 PM
It will be good if you can make newsletter via email.

Sorry for my English!
Title: Re: PHP Selector
Post by: Bernie on October 03, 2015, 06:11:54 PM
How to remove a selected version?
Title: Re: PHP Selector
Post by: jayraaj.chavan on October 24, 2015, 07:49:33 AM
I am getting Internal Server Error after adding AddHandler application/x-httpd-php54 .php to .htaccess file.
Title: Re: PHP Selector
Post by: Administrator on October 24, 2015, 05:52:26 PM
you need to check apache logs
Title: Re: PHP Selector
Post by: muhittin on November 07, 2015, 01:27:07 PM
 Problem  :-[
İ install all php versions and my server working no problem. But when i want to use any one version php , i create a .htaccess file and type
AddHandler application/x-httpd-php56 .php
in .htaccess file save and restart copmlete VPS or apache server after try my site my site give  to me my index.php to save  my computer.?
how i am solve this problem?
Title: Re: PHP Selector
Post by: zakrpa on November 09, 2015, 10:48:51 AM
hi

for me not works at all nothing happens even log file not exists strange...
Title: Re: PHP Selector
Post by: Treiero on December 28, 2015, 12:11:41 PM
When installing the prerequisites, I noticed the following error early in the log:

"No package libc-client-devel.x86_64 available."

The rest went well and completed the installation of prerequisites, but when trying to install pacores PHP, the log file is not generated.

Code: [Select]
[root@ip-172-31-33-XXX ~]# tail -f /var/log/php-dependencies.log
Loaded plugins: fastestmirror, presto
Setting up Install Process
Determining fastest mirrors
 * base: centos.xpg.com.br
 * extras: centos.xpg.com.br
 * rpmforge: repoforge.xpg.com.br
 * updates: centos.xpg.com.br
No package libc-client-devel.x86_64 available.
Package libc-client-2007e-11.el6.i686 already installed and latest version
Package libc-client-2007e-11.el6.i686 already installed and latest version
Package flex-2.5.35-9.el6.i686 already installed and latest version
Package libjpeg-turbo-devel-1.2.1-3.el6_5.i686 already installed and latest version
Package gcc-4.4.7-16.el6.i686 already installed and latest version
Package 1:make-3.81-20.el6.i686 already installed and latest version
Package bison-2.4.1-5.el6.i686 already installed and latest version
Package bzip2-1.0.5-7.el6_0.i686 already installed and latest version
Package bzip2-devel-1.0.5-7.el6_0.i686 already installed and latest version
Package libcurl-devel-7.19.7-46.el6.i686 already installed and latest version
Package curl-7.19.7-46.el6.i686 already installed and latest version
Package 2:libpng-1.2.49-2.el6_7.i686 already installed and latest version
Package 2:libpng-devel-1.2.49-2.el6_7.i686 already installed and latest version
Package freetype-2.3.11-15.el6_6.1.i686 already installed and latest version
Package freetype-devel-2.3.11-15.el6_6.1.i686 already installed and latest version
Package krb5-devel-1.10.3-42.el6.i686 already installed and latest version
Package krb5-libs-1.10.3-42.el6.i686 already installed and latest version
Package libmcrypt-2.5.8-9.el6.i686 already installed and latest version
Package libmcrypt-devel-2.5.8-9.el6.i686 already installed and latest version
Package expat-devel-2.0.1-11.el6_2.i686 already installed and latest version
Package libxml2-2.7.6-20.el6_7.1.i686 already installed and latest version
Package libxml2-devel-2.7.6-20.el6_7.1.i686 already installed and latest version
Package libxslt-1.1.26-2.el6_3.1.i686 already installed and latest version
Package libxslt-devel-1.1.26-2.el6_3.1.i686 already installed and latest version
Nothing to do

Install Completed
###############################

Code: [Select]
[root@ip-172-31-33-XXX ~]# tail -f /var/log/php-selector-rebuild.log
tail: cannot open `/var/log/php-selector-rebuild.log' for reading: No such file or directory
tail: no files remaining
Title: Re: PHP Selector
Post by: rflsantana on January 05, 2016, 01:58:58 PM
Same problem!
Why?
Title: Re: PHP Selector and PHP Switcher
Post by: pixelpadre on February 16, 2016, 12:17:52 PM
I am not clear on the difference between PHP Switcher and PHP Selector.  Can you explain?
Title: Re: PHP Selector
Post by: become on March 06, 2016, 01:34:38 PM
How can I use PHP 7 ?
I have added:

AddHandler application/x-httpd-php71 .php

and when I try to run php script It get downloaded by browser
Title: Re: PHP Selector
Post by: devnull on March 06, 2016, 01:55:01 PM


What result do you get if you use?:

AddHandler application/x-httpd-php7 .php

That is working for me.

I think the wiki should be updated though.

Php 7 is not there yet ;)

See http://wiki.centos-webpanel.com/php-selector
Title: Re: PHP Selector
Post by: become on March 06, 2016, 04:54:44 PM
used CWP build in compilation function
Title: Re: PHP Selector
Post by: hrace009 on August 03, 2016, 04:10:16 PM


What result do you get if you use?:

AddHandler application/x-httpd-php7 .php

That is working for me.

I think the wiki should be updated though.

Php 7 is not there yet ;)

See http://wiki.centos-webpanel.com/php-selector

Code: [Select]
AddHandler application/x-httpd-php7 .phpjust add it
Title: Re: PHP Selector
Post by: hrace009 on August 25, 2016, 03:50:50 PM
how do i load php module?
i try to install imagemagic, it only apply to default php 54 that used by CWP server
Title: Re: PHP Selector
Post by: vavy on September 04, 2016, 04:32:17 PM
Please tell me where in CWP defined url of php destro for particular php-selector?
Today, I've installed php-5.6 in new php-selector, and CWP downloaded and installed php-5.6.14,
but it's already outdated: php.net offers php-5.6.23. And my soft wants php >= 5.6.19.
What CWP's config should I change in order to download and install the version of php which I need?
Thank you!
Title: Re: PHP Selector
Post by: Com-QuadTech on September 18, 2016, 11:38:38 AM
Error PHP Selector

if the .htaccess is installed we get the error message, it is deleted everything goes and I can call the phpinfo.php.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, vxxxxxx@mail.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


the logs dosent exent
Title: Re: PHP Selector
Post by: djheiko on May 12, 2017, 04:47:55 PM
Hello can someone tell me how I get 4.5 on it and not 4.5.45 ??
Since the one script probably only under 4.5 goes right

I thank you ever for an answer
Title: Re: PHP Selector
Post by: vajenec on May 17, 2017, 08:16:31 AM
Problem  :-[
İ install all php versions and my server working no problem. But when i want to use any one version php , i create a .htaccess file and type
AddHandler application/x-httpd-php56 .php
in .htaccess file save and restart copmlete VPS or apache server after try my site my site give  to me my index.php to save  my computer.?
how i am solve this problem?
Same problem on my CWP. I try with AddHandler application/x-httpd-php56 .php in htaccess and all i get is file download after web site visit.
Title: Re: PHP Selector
Post by: Administrator on May 17, 2017, 08:24:25 AM
check that you have installed required php versions in cwp.admin php selector
Title: Re: PHP Selector
Post by: vajenec on May 18, 2017, 06:11:32 AM
Yes, i have 5.6 installed... Is it safe to change PHP to 5.6 on CWP basis?
(https://mazoretke-bakovci.si/php1.jpg)
Title: Re: PHP Selector
Post by: become on September 30, 2017, 10:50:13 AM
I can't compile PHP 5.2 version.
I get error like this:

/tmp/php-build/php-5.2.17/ext/dom/node.c: In function 'dom_canonicalization':
/tmp/php-build/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type
    ret = buf->buffer->use;
                     ^
In file included from /tmp/php-build/php-5.2.17/main/php.h:38:0,
                 from /tmp/php-build/php-5.2.17/ext/dom/node.c:26:
/tmp/php-build/php-5.2.17/ext/dom/node.c:1955:40: error: dereferencing pointer to incomplete type
     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
                                        ^
/tmp/php-build/php-5.2.17/Zend/zend_API.h:472:14: note: in definition of macro 'ZVAL_STRINGL'
   char *__s=(s); int __l=l;  \
              ^
/tmp/php-build/php-5.2.17/ext/dom/node.c:1955:5: note: in expansion of macro 'RETVAL_STRINGL'
     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
     ^
make: *** [ext/dom/node.lo] Error 1
make: *** Waiting for unfinished jobs....
/bin/sh /tmp/php-build/php-5.2.17/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/dom/ -I/tmp/php-build/php-5.2.17/ext/dom/ -DPHP_ATOM_INC -I/tmp/php-build/php-5.2.17/include -I/tmp/php-build/php-5.2.17/main -I/tmp/php-build/php-5.2.17 -I/tmp/php-build/php-5.2.17/ext/date/lib -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/imap -I/tmp/php-build/php-5.2.17/ext/mbstring/oniguruma -I/tmp/php-build/php-5.2.17/ext/mbstring/libmbfl -I/tmp/php-build/php-5.2.17/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/tmp/php-build/php-5.2.17/TSRM -I/tmp/php-build/php-5.2.17/Zend    -I/usr/include -g -O2  -c /tmp/php-build/php-5.2.17/ext/dom/node.c -o ext/dom/node.lo
/tmp/php-build/php-5.2.17/ext/dom/node.c: In function 'dom_canonicalization':
/tmp/php-build/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type
    ret = buf->buffer->use;
                     ^
In file included from /tmp/php-build/php-5.2.17/main/php.h:38:0,
                 from /tmp/php-build/php-5.2.17/ext/dom/node.c:26:
/tmp/php-build/php-5.2.17/ext/dom/node.c:1955:40: error: dereferencing pointer to incomplete type
     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
                                        ^
/tmp/php-build/php-5.2.17/Zend/zend_API.h:472:14: note: in definition of macro 'ZVAL_STRINGL'
   char *__s=(s); int __l=l;  \
              ^
/tmp/php-build/php-5.2.17/ext/dom/node.c:1955:5: note: in expansion of macro 'RETVAL_STRINGL'
     RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
     ^
make: *** [ext/dom/node.lo] Error 1
Redirecting to /bin/systemctl restart httpd.service
Title: Re: PHP Selector
Post by: Gogo on December 14, 2017, 11:04:30 AM
@become Why do you need 5.2 at all? Jeez that's deprecated for a long time now. It's freaking insecure, to many known exploits available for <5.5 that can seriously damage your server.
Title: Re: PHP Selector
Post by: Wamphyri on January 06, 2018, 09:15:39 PM
after clicking install dependencies
https://prnt.sc/hwz8ak (https://prnt.sc/hwz8ak)

after 5 minutes + nothing shows in tail -f /var/log/php-dependencies.log



Title: Re: PHP Selector
Post by: Gogo on February 14, 2018, 10:03:02 AM
Can't install 7.2, no errors at all.

EDIT: I found error: configure: error: Problem with libXpm.(a|so) or libX11.(a|so).
Title: Re: PHP Selector
Post by: n8v8r on February 28, 2018, 04:47:18 PM
Is CWP PHP Selector blocked and is only in the paid version of CWPpro?`
No
Title: Re: PHP Selector
Post by: n8v8r on February 28, 2018, 04:54:45 PM
oops. my bad. seems like a pro feature then indeed.
Title: Re: PHP Selector
Post by: bullten on February 28, 2018, 05:10:54 PM
lol the blocked it :P Now cwppro is required. Bad luck.
Title: Re: PHP Selector
Post by: bullten on February 28, 2018, 05:25:12 PM
I dont think 10$ for a year is huge.
Title: Re: PHP Selector
Post by: comepso on March 04, 2018, 09:42:57 AM
I dont think 10$ for a year is huge.
It's advertised as a free panel. If a charge is imposed for everything, it is not a free commercial panel.
It's even advertised as a free feature on the front page

"CWP PHP Selector (FREE)"
Title: Re: PHP Selector
Post by: marcelosb on June 20, 2018, 03:51:35 PM
I tried to do this  with .htaccess but doesn´t work.

I put = AddHandler application/x-httpd-php71 .php

And the page shows

Internal Server Error (500)
The server encountered an internal error or misconfiguration and was unable to complete your request.

and the error_log show

Wed Jun 20 12:43:45.650621 2018] [core:error] [pid 25002:tid 140403528488704] [client 138.204.25.171:45632] End of script output before headers: info.php
[Wed Jun 20 12:43:46.141581 2018] [:error] [pid 12398:tid 140403353286400] [client 138.204.25.171:45893] SoftException in Application.cpp:542: Could not execute script "/home/tabcorde/public_html/info.php"
[Wed Jun 20 12:43:46.141740 2018] [:error] [pid 12398:tid 140403353286400] [client 138.204.25.171:45893] Caused by SystemException in API_Linux.cpp:444: execve() for program "/opt/alt/php71/usr/bin/php-cgi" failed: No such file or directory
[Wed Jun 20 12:43:46.141781 2018] [core:error] [pid 12398:tid 140403353286400] [client 138.204.25.171:45893] End of script output before headers: info.php
Title: Re: PHP Selector
Post by: Gogo on June 20, 2018, 10:43:15 PM
@marcelosb Are you sure you have installed 71 version?
"/opt/alt/php71/usr/bin/php-cgi" failed: No such file or directory
Title: Re: PHP Selector
Post by: maleksandrov on November 10, 2018, 06:14:55 PM
Hi there,

i'm trying to install PHP 5.2, but getting this error:
 
Code: [Select]
phar-2.0.0/zip.c
/usr/local/cwpsrv/htdocs/resources/conf/php_selector/external_modules/5.2/phar.sh: line 9: /opt/alt/php52/usr/bin/phpize: No such file or directory
/usr/local/cwpsrv/htdocs/resources/conf/php_selector/external_modules/5.2/phar.sh: line 10: ./configure: No such file or directory
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
/usr/local/cwpsrv/htdocs/resources/conf/php_selector/external_modules/5.2/phar.sh: line 14: /opt/alt/php52/usr/bin/php-config: No such file or directory
ERROR: Missing extension file /phar.so
Redirecting to /bin/systemctl restart  httpd.service

Build Completed
###################

I switch a few weeks ago from 5.2 to 7, and now I need 5.2 again. But I want to keep PHP 7 for all user on the server.

Thanks,
Milen Aleksandrov
Title: Re: PHP Selector
Post by: maleksandrov on November 23, 2018, 05:50:24 AM
Hi there,

Is it there someone who can help here?

Thanks,
Milen
Title: Re: PHP Selector
Post by: dg1 on December 06, 2018, 11:15:23 PM
What about instructions for PHP-FPM Selector (v3)?
Title: Re: PHP Selector
Post by: NychosX on December 07, 2018, 05:04:24 PM
Hello,
how can I assign a different PHP-FPM version to a certain user/website?
I tried adding "AddHandler application/x-httpd-php71 .php" to htaccess file but it does not work.

Thanks
Title: Re: PHP Selector
Post by: GTMAN on December 07, 2018, 06:10:26 PM
WebServer Settings>WebServers Domain Conf

Select Username > View /Edit Configuration

Scroll down to last option block and select version
Title: Re: PHP Selector
Post by: geolaw on December 07, 2018, 08:15:43 PM
For the most part my CWP install runs and I never have to touch it

Today I logged in to add an email address

Every menu item from the main menu takes me to the PHP selector - I cannot do ANYTHING else within CWP

I just paid for the pro option hoping that will give more access but at the moment, the only access within CWP is to the PHP selector which does not appear to work.
Title: Re: PHP Selector
Post by: NychosX on December 10, 2018, 11:22:05 AM
WebServer Settings>WebServers Domain Conf

Select Username > View /Edit Configuration

Scroll down to last option block and select version

Thank you very much!  ;)
Title: Re: PHP Selector
Post by: host56 on December 10, 2018, 11:01:17 PM
It'll be greate, if users can change PHP version by yourself, without contacting with hosting administrator. I see, that in lang files users zone have php selector. How to enable it there? Or, when this function will be allowed to users? Thanks.
Title: Re: PHP Selector
Post by: studio4host on December 11, 2018, 08:49:48 AM
it still in test phase, but will come soon for sure.
Title: Re: PHP Selector
Post by: geolaw on December 21, 2018, 05:07:34 PM
WebServer Settings>WebServers Domain Conf

Select Username > View /Edit Configuration

Scroll down to last option block and select version

Thank you very much!  ;)


That's just it -- no matter how many times I start the "build" I never get past the inital screen so I can never select the web server settings for users because it is never populated.

Select a user, "create configuration", select one option ... drop down menu is empty :(
Title: Re: PHP Selector
Post by: lucaslealdev on December 24, 2018, 12:19:25 AM
Not working for me, and I just got PRO just for this feature btw. That htaccess code has no effect at all and I have installed all php versions and tried with all of them.
Title: Re: PHP Selector
Post by: lucaslealdev on December 24, 2018, 01:12:25 PM
Not working for me, and I just got PRO just for this feature btw. That htaccess code has no effect at all and I have installed all php versions and tried with all of them.

fixed it!

WebServer Settings>WebServers Domain Conf

Select Username > View /Edit Configuration

I Changed the first dropdown to php-cgi and not the htaccess addhandler works like a charm!
Title: Re: PHP Selector
Post by: venty on January 15, 2019, 06:46:42 PM
Build Completed
###################


Error:Can't add notification!              ???????????????????????????

Title: Re: PHP Selector
Post by: studio4host on January 15, 2019, 07:40:31 PM
you probably have some old notifications in the panel about php build so you can't add duplicate
Title: Re: PHP Selector
Post by: venty on January 15, 2019, 08:43:34 PM
What to do?
In the PHP selector, I had an alternate version PHP 5.6.38, but I also had a message that there is a new one, I chose 5.6.4 and wanted to refresh by pressing the button Start Compiler, the result you can see here, there is no new version 5.6.4, not the old version 5.6.38 also ...

http://prntscr.com/m7ngjm

What to do?
Title: Re: PHP Selector
Post by: venty on January 16, 2019, 06:46:41 AM
pls, help...
Title: Re: PHP Selector
Post by: ekgrad on January 16, 2019, 07:17:05 AM
Once you have an old version installed properly, it should show up as a green button with the installed version number and if an update is available it will show up also as a button mentioning "upgrade available"

If you have no green button showing up, it means you need to install the desired version first.
Title: Re: PHP Selector
Post by: venty on January 16, 2019, 09:00:58 AM
thanks for the answer, but here is the second option, I have no version installed ... or more precisely ...

I had a old version installed and tried to upgrade it but it did not work, and then I deleted the old version with the link "delete" and tried to install again with PHP selector the cleaner version, but again it did not work ...

when I go and uncover Contents of File: /var/log/php-selector-rebuild.log at the end I see it, what is in the picture below:

http://prntscr.com/m7uaf7

BR
Venty
Title: Re: PHP Selector
Post by: venty on January 16, 2019, 09:48:56 AM
you probably have some old notifications in the panel about php build so you can't add duplicate

?!?
Title: Re: PHP Selector
Post by: Gogo on January 16, 2019, 10:13:53 AM
@venty paste full log (use pastebin due large log file) /var/log/php-selector-rebuild.log
Title: Re: PHP Selector
Post by: venty on January 16, 2019, 10:54:24 AM
what should I use to pаste the full log?
Title: Re: PHP Selector
Post by: Gogo on January 16, 2019, 04:41:19 PM
https://pastebin.com/  because that log is large and you won't be able to paste it full here on the forum
Title: Re: PHP Selector
Post by: venty on January 17, 2019, 10:51:53 AM
Hi,

The problem was found in the ICU version - because of the use of prestashop, I had to compile the latest version of ICU,  version 63.1...

I did so by following and applying the help my colleagues gave to the following address:

http://forum.centos-webpanel.com/php/update-icu-system-package-and-the-intl-php-extension/msg20852/#msg20852

and more precisely, in the following terms:

Quote
[root@cwp7 source]# yum list available | grep libicu
libicu.i686                               50.1.2-15.el7                  base
libicu-devel.i686                         50.1.2-15.el7                  base
libicu-doc.noarch                         50.1.2-15.el7                  base

Quote
[root@cwp7 ~]# icuinfo | grep version
    <param name="version">50.1.2</param>
    <param name="version.unicode">6.2</param>
    <param name="cldr.version">22.1.1</param>
    <param name="tz.version">2012j</param>


Well 50.1.2 the latest version of icu available for centos 7 base repository.

If you need any other version then you need to compile it from source (http://download.icu-project.org/files/icu4c/).

So lets take 62.1 version and compile it.


Quote
cd /usr/local/src
wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz
tar -xvf icu4c-*.tgz
cd icu/source/
sed -i '/#define __UCONFIG_H__/a #define UCONFIG_ENABLE_PLUGINS 1' common/unicode/uconfig.h
./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --datadir=/usr/share --enable-plugins
make -j4 && make install

Quote
[root@cwp7 source]# icuinfo | grep version
    <param name="version">62.1</param>
    <param name="version.unicode">11.0</param>
    <param name="cldr.version">33.1</param>
    <param name="tz.version">2018e</param>

More compiling options can be found inside "configure" and you can use as per your need.

This version of ICU works with PHP 7 and later, but it did not work with PHP 5.6.38 - 40 ... and when compiling with the PHP selector does not get ...
When removed the "INTL" from option list, the version 5.6.40 is installed without problems ...

With PHP Switcher I have installed a version of PHP 7.2.14 and there things are ok ...

Before I changed the ICU version to 63.1 with the other PHP-FPM selector I have compiled a version of PHP 5.6.38 and it is still active and uses the old version of ICU 50.1

This means I have both ICU versions, but when compiling an older version of a PHP, for example, 5.6.38 or 5.6.40 should be said to use the older ICU or maybe in the compilation of the PHP and choosing the "INTL" module should be told to which version of the ICU should be compiled ...

Thanks in advance!

BR

Venty
Title: Re: PHP Selector
Post by: Loz702 on January 21, 2019, 04:53:25 AM
My server just hangs now, 503 bad gateway when I try to install it.

So much for the onscreen recommendation to install this thing.

so what do i do now since I cant login to my admin control panel??
Title: Re: PHP Selector
Post by: Loz702 on January 28, 2019, 05:39:17 AM
WORSE SUPPORT EVER! Hell would freeze over before these ppl reply!
Title: Re: PHP Selector
Post by: Gogo on January 28, 2019, 08:08:00 PM
@Loz702   this forum ain't support forum, this is support http://centos-webpanel.com/support-services
Title: Re: PHP Selector
Post by: venty on March 18, 2019, 04:01:34 PM
Hi,

The problem was found in the ICU version - because of the use of prestashop, I had to compile the latest version of ICU,  version 63.1...

I did so by following and applying the help my colleagues gave to the following address:

http://forum.centos-webpanel.com/php/update-icu-system-package-and-the-intl-php-extension/msg20852/#msg20852

and more precisely, in the following terms:

Quote
[root@cwp7 source]# yum list available | grep libicu
libicu.i686                               50.1.2-15.el7                  base
libicu-devel.i686                         50.1.2-15.el7                  base
libicu-doc.noarch                         50.1.2-15.el7                  base

Quote
[root@cwp7 ~]# icuinfo | grep version
    <param name="version">50.1.2</param>
    <param name="version.unicode">6.2</param>
    <param name="cldr.version">22.1.1</param>
    <param name="tz.version">2012j</param>


Well 50.1.2 the latest version of icu available for centos 7 base repository.

If you need any other version then you need to compile it from source (http://download.icu-project.org/files/icu4c/).

So lets take 62.1 version and compile it.


Quote
cd /usr/local/src
wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz
tar -xvf icu4c-*.tgz
cd icu/source/
sed -i '/#define __UCONFIG_H__/a #define UCONFIG_ENABLE_PLUGINS 1' common/unicode/uconfig.h
./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --datadir=/usr/share --enable-plugins
make -j4 && make install

Quote
[root@cwp7 source]# icuinfo | grep version
    <param name="version">62.1</param>
    <param name="version.unicode">11.0</param>
    <param name="cldr.version">33.1</param>
    <param name="tz.version">2018e</param>

More compiling options can be found inside "configure" and you can use as per your need.

This version of ICU works with PHP 7 and later, but it did not work with PHP 5.6.38 - 40 ... and when compiling with the PHP selector does not get ...
When removed the "INTL" from option list, the version 5.6.40 is installed without problems ...

With PHP Switcher I have installed a version of PHP 7.2.14 and there things are ok ...

Before I changed the ICU version to 63.1 with the other PHP-FPM selector I have compiled a version of PHP 5.6.38 and it is still active and uses the old version of ICU 50.1

This means I have both ICU versions, but when compiling an older version of a PHP, for example, 5.6.38 or 5.6.40 should be said to use the older ICU or maybe in the compilation of the PHP and choosing the "INTL" module should be told to which version of the ICU should be compiled ...

Thanks in advance!

BR

Venty

To ask again is there a variant of not one server to use two versions of intl (both ICU versions)???

BR
Venty
Title: Re: PHP Selector
Post by: venty on March 28, 2019, 03:28:11 PM
Hi,

The problem was found in the ICU version - because of the use of prestashop, I had to compile the latest version of ICU,  version 63.1...

I did so by following and applying the help my colleagues gave to the following address:

http://forum.centos-webpanel.com/php/update-icu-system-package-and-the-intl-php-extension/msg20852/#msg20852

and more precisely, in the following terms:

Quote
[root@cwp7 source]# yum list available | grep libicu
libicu.i686                               50.1.2-15.el7                  base
libicu-devel.i686                         50.1.2-15.el7                  base
libicu-doc.noarch                         50.1.2-15.el7                  base

Quote
[root@cwp7 ~]# icuinfo | grep version
    <param name="version">50.1.2</param>
    <param name="version.unicode">6.2</param>
    <param name="cldr.version">22.1.1</param>
    <param name="tz.version">2012j</param>


Well 50.1.2 the latest version of icu available for centos 7 base repository.

If you need any other version then you need to compile it from source (http://download.icu-project.org/files/icu4c/).

So lets take 62.1 version and compile it.


Quote
cd /usr/local/src
wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz
tar -xvf icu4c-*.tgz
cd icu/source/
sed -i '/#define __UCONFIG_H__/a #define UCONFIG_ENABLE_PLUGINS 1' common/unicode/uconfig.h
./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --datadir=/usr/share --enable-plugins
make -j4 && make install

Quote
[root@cwp7 source]# icuinfo | grep version
    <param name="version">62.1</param>
    <param name="version.unicode">11.0</param>
    <param name="cldr.version">33.1</param>
    <param name="tz.version">2018e</param>

More compiling options can be found inside "configure" and you can use as per your need.

This version of ICU works with PHP 7 and later, but it did not work with PHP 5.6.38 - 40 ... and when compiling with the PHP selector does not get ...
When removed the "INTL" from option list, the version 5.6.40 is installed without problems ...

With PHP Switcher I have installed a version of PHP 7.2.14 and there things are ok ...

Before I changed the ICU version to 63.1 with the other PHP-FPM selector I have compiled a version of PHP 5.6.38 and it is still active and uses the old version of ICU 50.1

This means I have both ICU versions, but when compiling an older version of a PHP, for example, 5.6.38 or 5.6.40 should be said to use the older ICU or maybe in the compilation of the PHP and choosing the "INTL" module should be told to which version of the ICU should be compiled ...

Thanks in advance!

BR

Venty

To ask again is there a variant of not one server to use two versions of intl (both ICU versions)???

BR
Venty
Pls, help...
Title: Re: PHP Selector
Post by: DeveloperMcD on October 07, 2019, 12:41:03 PM
I woke up today, and a bunch of my websites are down. Just the ones that use PHP 5.6 I think!

Caused by SystemException in API_Linux.cpp:444: execve() for program "/opt/alt/php56/usr/bin/php-cgi" failed: Permission denied

Why would this happen ALL THE SUDDEN? I didn't touch anything. Everything was configured perfectly and ALL my websites worked fine, for many months now.
Title: Re: PHP Selector
Post by: saulius on October 07, 2019, 01:06:39 PM
The same happened to me. I use 5.6 and 7.1. And now my all clients backend systems are down.
Title: Re: PHP Selector
Post by: higorvaz on October 07, 2019, 10:27:40 PM
The same happened to me. I use 5.3 and 7.1.
Now my all website and apps systems are down
Help!!!
Title: Re: PHP Selector
Post by: DangerD on October 08, 2019, 04:33:30 AM
WHAT THE FUCK!!!! Site are keeping going down every day.... CWP is stopping php-fpm on all my servers....
Title: Re: PHP Selector
Post by: zakrpa on October 08, 2019, 09:57:52 AM
I dont know I m using 5.* version and still everything works fine....
Title: Re: PHP Selector
Post by: studio4host on October 08, 2019, 02:49:55 PM
it's very simple, if you want to use a php-selector then you need to use cwppro version.
You still can use php switcher to change php version.
Title: Re: PHP Selector
Post by: studio4host on October 09, 2019, 07:01:32 AM
I think this is very simple, if you want to use services that are marked as pro then you need to have pro version.
By using pro you are making all us others dump for paying for it and you are slowing down development.
Title: Re: PHP Selector
Post by: apsuva on October 09, 2019, 08:55:52 AM
same issue!!!
solution : dont use web panels

So you don't see the difference in word meaning between "switch" and "shut down server"? What next? You delete all my data one day because I use free version?
Title: Re: PHP Selector
Post by: PeterJP on October 09, 2019, 11:32:05 AM
I think this is very simple, if you want to use services that are marked as pro then you need to have pro version.
By using pro you are making all us others dump for paying for it and you are slowing down development.

So you believe it's alright to hold users hostage by causing servers to malfunction? I have a couple of servers that aren't even using PHP Selector that have had issues with the permissions update. Then I have some that are on pro that also had issues so it's not clear-cut case of going pro will resolve the issue. If you want to limit a features then limit it, don't allow users to use it then hold them hostage.

Seriously, it should be handled better. I had in mind to move my remaining servers all over to pro but I have lost faith trustworthiness of the platform.

I get that support in the form of income from Pro licenses is needed to fund further development, but this is not the correct way to go about it.
Title: Re: PHP Selector
Post by: NonTestatum on October 09, 2019, 02:15:37 PM
Quote
So you believe it's alright to hold users hostage by causing servers to malfunction? I have a couple of servers that aren't even using PHP Selector that have had issues with the permissions update. Then I have some that are on pro that also had issues so it's not clear-cut case of going pro will resolve the issue. If you want to limit a features then limit it, don't allow users to use it then hold them hostage.

Seriously, it should be handled better. I had in mind to move my remaining servers all over to pro but I have lost faith trustworthiness of the platform.

I get that support in the form of income from Pro licenses is needed to fund further development, but this is not the correct way to go about it.

I feel the same way
Title: Re: PHP Selector
Post by: IgorA100 on October 22, 2019, 08:27:18 AM
I feel the same way
Similarly :(
Title: Re: PHP Selector
Post by: luydjmix on October 23, 2019, 04:43:13 PM
In my server this no work, and ejecut one error 500
From version 0.9.8 all CWP servers have a CWP PHP Selector which can install all PHP versions with a single click.
Using CWP PHP selector you can use a different PHP version per folder or domain.

Available PHP versions in the CWP PHP Selector
- php 4.4
- php 5.2
- php 5.3
- php 5.4
- php 5.5
- php 5.6
- php 7.0
- php 7.1
- php 7.2
- php 7.x (development version from php git, don't use for production server!!!)

You can completely modify flags per PHP version according to you needs.

PHP per folder
Now each user can run PHP version per folder, meaning that each folder can have a different php version, example:
/home/USERNAME/public_html  runs PHP 5.4
/home/USERNAME/public_html/test  runs PHP 5.6
/home/USERNAME/public_html/my-domain.com  runs PHP 5.2
/home/USERNAME/public_html/my-domain.com/application runs PHP 5.3


Usage instructions
In each folder you want to run different PHP version you only need to define it in the .htaccess file.

Example for file: /home/USERNAME/public_html/.htaccess

Use PHP 4.4
Code: [Select]
AddHandler application/x-httpd-php44 .php
Use PHP 5.2
Code: [Select]
AddHandler application/x-httpd-php52 .php
Use PHP 5.3
Code: [Select]
AddHandler application/x-httpd-php53 .php
Use PHP 5.4
Code: [Select]
AddHandler application/x-httpd-php54 .php
Use PHP 5.5
Code: [Select]
AddHandler application/x-httpd-php55 .php
Use PHP 5.6
Code: [Select]
AddHandler application/x-httpd-php56 .php
Use PHP 7.0
Code: [Select]
AddHandler application/x-httpd-php70 .php
Use PHP 7.1
Code: [Select]
AddHandler application/x-httpd-php71 .php
Use PHP 7.2
Code: [Select]
AddHandler application/x-httpd-php72 .php

To run some other PHP version in the other folder, you can use the same example.

Example lets run php 5.3 in /home/USERNAME/public_html/domain1.com/
Edit /home/USERNAME/public_html/domain1.com/.htaccess file and add
Code: [Select]
AddHandler application/x-httpd-php53 .php
Example lets run php 5.2 in /home/USERNAME/public_html/domain2.com/
Edit /home/USERNAME/public_html/domain2.com/.htaccess file and add
Code: [Select]
AddHandler application/x-httpd-php52 .php

php.ini configuration file locations
Code: [Select]
/opt/alt/php44/usr/php/php.ini
/opt/alt/php52/usr/php/php.ini
/opt/alt/php53/usr/php/php.ini
/opt/alt/php54/usr/php/php.ini
/opt/alt/php55/usr/php/php.ini
/opt/alt/php56/usr/php/php.ini
/opt/alt/php70/usr/php/php.ini
/opt/alt/php71/usr/php/php.ini
/opt/alt/php72/usr/php/php.ini

php config file scan dir
Code: [Select]
/opt/alt/php44/usr/php/php.d
/opt/alt/php52/usr/php/php.d
/opt/alt/php53/usr/php/php.d
/opt/alt/php54/usr/php/php.d
/opt/alt/php55/usr/php/php.d
/opt/alt/php56/usr/php/php.d
/opt/alt/php70/usr/php/php.d
/opt/alt/php71/usr/php/php.d
/opt/alt/php72/usr/php/php.d

and so on.

To delete some php selector version use this command (example)
rm -Rf /opt/alt/php71

be careful with this command as you can easily delete wrong path.
Title: Re: PHP Selector
Post by: daniel981 on March 06, 2020, 11:41:32 PM
WebServer Settings>WebServers Domain Conf

Select Username > View /Edit Configuration

Scroll down to last option block and select version

You're a legend my friend! I was going crazy trying to figure this out and now that I see how it's done, I feel dumb. So easy after you know where to look! lol. Thanks again.