Author Topic: PHP Selector  (Read 207823 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
Re: PHP Selector
« Reply #60 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

Offline
***
Re: PHP Selector
« Reply #61 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...

Offline
*
Re: PHP Selector
« Reply #62 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.

Offline
*
Re: PHP Selector
« Reply #63 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.

Offline
*
Re: PHP Selector
« Reply #64 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!!!
« Last Edit: October 07, 2019, 11:21:18 PM by Administrator »

Offline
*
Re: PHP Selector
« Reply #65 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....

Offline
**
Re: PHP Selector
« Reply #66 on: October 08, 2019, 09:57:52 AM »
I dont know I m using 5.* version and still everything works fine....

Offline
*
Re: PHP Selector
« Reply #67 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.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: PHP Selector
« Reply #68 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.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: PHP Selector
« Reply #69 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?

Offline
*
Re: PHP Selector
« Reply #70 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.

Offline
*
Re: PHP Selector
« Reply #71 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

Offline
*
Re: PHP Selector
« Reply #72 on: October 22, 2019, 08:27:18 AM »

Offline
*
Re: PHP Selector
« Reply #73 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.

Offline
*
Re: PHP Selector
« Reply #74 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.