Control Web Panel

WebPanel => Installation => Topic started by: Devanshu on December 05, 2021, 10:04:26 AM

Title: PHP Version Switcher v2 not changing version
Post by: Devanshu on December 05, 2021, 10:04:26 AM
By default the version of PHP set is 5.6.37.
When I try to change the version to 7.4.26, the process does not gets complete. I have set it up on digital ocean. tried with centos 7 and centos 8 stream. But same problem happens. Following is the log.

#define PHP_SODIUM_ZSTR_TRUNCATE(zs, len) do { ZSTR_LEN(zs) = (len); } while(0)
                                                             ^
/usr/local/src/libsodium-2.0.23/libsodium.c:4160:5: note: in expansion of macro 'PHP_SODIUM_ZSTR_TRUNCATE'
     PHP_SODIUM_ZSTR_TRUNCATE(msg, (size_t) msg_real_len);
     ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/src/libsodium-2.0.23/libsodium.c:4161:18: error: subscripted value is neither array nor pointer nor vector
     ZSTR_VAL(msg)[msg_real_len] = 0;
                  ^
make: *** [Makefile:181: libsodium.lo] Error 1

================================================================================

And if I redo the above step of setting php version to 7.4.26 by deselecting the modules "sodium" and "argon2", I get following in log file. And on dashboard, still default php is shown as 5.6.37.

tail -f /var/log/php-rebuild.log
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files:           /usr/local/include/php/




Title: Re: PHP Version Switcher v2 not changing version
Post by: Radical Redemption on December 06, 2021, 04:27:03 PM
I am having the same problem on Centos Stream 8, any solution available?
Title: Re: PHP Version Switcher v2 not changing version
Post by: Sandeep on December 07, 2021, 09:15:04 AM
check full php build log it can be your server related issue like low on ram or some deps are missing or corrupted.
Title: Re: PHP Version Switcher v2 not changing version
Post by: Radical Redemption on December 07, 2021, 11:44:39 AM
check full php build log it can be your server related issue like low on ram or some deps are missing or corrupted.

https://pastebin.com/mYn62tZX here is the full build log. I also did a full OS reinstall and CWP reinstall and same thing happens.
Title: Re: PHP Version Switcher v2 not changing version
Post by: Namaste on December 07, 2021, 12:45:20 PM
Same problem for me centos stream.  Unable to change php.

error

Make libsodium.lo error 1
Title: Re: PHP Version Switcher v2 not changing version
Post by: Namaste on December 07, 2021, 01:34:20 PM
I am having the same problem on Centos Stream 8, any solution available?

I couldnt install 7.4.26 but I was able to switch to 7.3

Try 7.3
Title: Re: PHP Version Switcher v2 not changing version
Post by: Radical Redemption on December 07, 2021, 01:41:00 PM
I was able somehow to change it to 7.4.26 after 100 attempts. But i can't switch to 8.x
Title: Re: PHP Version Switcher v2 not changing version
Post by: flexsocialbox on December 07, 2021, 02:22:17 PM
PHP-FPM Selector works fine PHP Version Switcher v2 after they added the php version 8.10 am not able to switch to 8.10 only on the php-fpm works

this my results what am got on centos stream 8.5 and almalinux 8.5

https://prnt.sc/225zw5q
https://prnt.sc/225zxss
Title: Re: PHP Version Switcher v2 not changing version
Post by: itneed on January 31, 2022, 08:20:29 PM
I have this problem too
Title: Re: PHP Version Switcher v2 not changing version
Post by: iraqiboy90 on February 01, 2022, 10:25:00 AM
I have this problem too
well... The guy above you has a problem that doesnt matter. He is forcing the use of php-fpm and he wants to update the main php version. It won't matter because it's not in use....

So, what's your problem exactly?

Also, do what @Sandeep said
Title: Re: PHP Version Switcher v2 not changing version
Post by: Martins-phpbb on February 01, 2022, 11:54:23 AM
Main php also fails to update buddy go try it  ;)
Title: Re: PHP Version Switcher v2 not changing version
Post by: iraqiboy90 on February 01, 2022, 06:42:17 PM
Main php also fails to update buddy go try it  ;)

yeah, buddy. I just went and tried it. Upgraded from 5.6.40 to 7.4.26. It worked fine..... The problem seems to happen with new CWP installations.
Title: Re: PHP Version Switcher v2 not changing version
Post by: flexsocialbox on February 01, 2022, 07:06:37 PM
 am have 3 test servers VPS with centos stream 8.5 preinstalled Centos Stream 8 and use sandeep setup from step 2 step 3 step 4
 
https://www.mysterydata.com/convert-centos-8-to-centos-8-stream-install-cwp-control-panel-in-centos-8-stream/

PHP-FPM Selector works fine PHP Version Switcher v2 works  now olso after today automatic updated 

https://prnt.sc/26n0n2d
https://prnt.sc/26n0nif
Title: Re: PHP Version Switcher v2 not changing version
Post by: Martins-phpbb on February 01, 2022, 08:53:54 PM
Main php also fails to update buddy go try it  ;)

yeah, buddy. I just went and tried it. Upgraded from 5.6.40 to 7.4.26. It worked fine..... The problem seems to happen with new CWP installations.

 ;)8.1 to 8.1.2  ;) try that. and my install is 4 years old so far from new.
Title: Re: PHP Version Switcher v2 not changing version
Post by: iraqiboy90 on February 01, 2022, 09:27:42 PM
Main php also fails to update buddy go try it  ;)

yeah, buddy. I just went and tried it. Upgraded from 5.6.40 to 7.4.26. It worked fine..... The problem seems to happen with new CWP installations.

 ;)8.1 to 8.1.2  ;) try that. and my install is 4 years old so far from new.

I won't keep changing my php version on my production server. If CWP's devs grants me a free license for my test server then I can test all i want. But the thing is, you are complaining but won't bother with giving your proof or the details about the error message....
Title: Re: PHP Version Switcher v2 not changing version
Post by: iraqiboy90 on February 01, 2022, 09:45:29 PM
am have 3 test servers VPS with centos stream 8.5 preinstalled Centos Stream 8 and use sandeep setup from step 2 step 3 step 4
 
https://www.mysterydata.com/convert-centos-8-to-centos-8-stream-install-cwp-control-panel-in-centos-8-stream/

PHP-FPM Selector works fine PHP Version Switcher v2 works  now olso after today automatic updated 

https://prnt.sc/26n0n2d
https://prnt.sc/26n0nif

I'm wondering why you have automatic updates enabled on php-fpm? Don't you have settings changed or secured in the php.ini files? These auto updates will reset php.ini every time.
Title: Re: PHP Version Switcher v2 not changing version
Post by: Martins-phpbb on February 01, 2022, 10:05:34 PM
I'm not complaining at all i have not started a topic about  it failing to update  ;) i just pointed out the last update does not allow you to update php versions also i dont need to supply logs for it either another member has already in one of the four topics thats open  ::)
Title: Re: PHP Version Switcher v2 not changing version
Post by: jijib on February 05, 2022, 11:12:17 PM
If you get a sqlite3 error when switching from php 8.x to php 7.4 like undefined reference to 'sqlite3_ you can try and install a newer version of sqlite3:

Code: [Select]
cd /usr/local/src
wget https://www.sqlite.org/2022/sqlite-autoconf-3370200.tar.gz
tar xvfz sqlite-autoconf-3370200.tar.gz
cd sqlite-autoconf-3370200.tar.gz
CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
make & make install

Title: Re: PHP Version Switcher v2 not changing version
Post by: rcschaff on February 06, 2022, 01:46:45 AM
am have 3 test servers VPS with centos stream 8.5 preinstalled Centos Stream 8 and use sandeep setup from step 2 step 3 step 4
 
https://www.mysterydata.com/convert-centos-8-to-centos-8-stream-install-cwp-control-panel-in-centos-8-stream/

PHP-FPM Selector works fine PHP Version Switcher v2 works  now olso after today automatic updated 

https://prnt.sc/26n0n2d
https://prnt.sc/26n0nif

I'm wondering why you have automatic updates enabled on php-fpm? Don't you have settings changed or secured in the php.ini files? These auto updates will reset php.ini every time.

Your second screenshot tells you everything you need to know.  You are forcing all domains to use FPM, thus there is no need for a default PHP.  If you turn off forced FPM, please respond back with any errors you receive while switching.