PHP is calling the latest PHP version

Using Web Server, PHP, MySQL, MariaDB.
Post Reply
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

PHP is calling the latest PHP version

Post by sanctimon »

I have installed PHP 7.3 using the beta applications under "Applications" in TOS.

However, when running the php command, I get the following error:

Code: Select all

This version of Nextcloud requires at least PHP 7.3<br/>You are currently running 7.1.13. Please update your PHP version.
First of all, how do I update system variables to use the latest version of PHP installed?

Second, where is the php 7.3 installation located, in case I need to call that version of php specifically?
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: PHP is calling the latest PHP version

Post by sanctimon »

Also, where are the php 7.3 libraries? When attempting to run php73-cgi I am receiving error:

Code: Select all

 error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory
When running

Code: Select all

 /usr/local/bin/php73-cgi --version
It gives:

Code: Select all

PHP Warning:  Failed loading Zend extension 'opcache.so' (tried: /usr/lib/php/modules/opcache.so (/usr/lib/php/modules/opcache.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/modules/opcache.so.so (/usr/lib/php/modules/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: bcmath: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: ctype: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: exif: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: ftp: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pcntl.so' (tried: /usr/lib/php/modules/pcntl.so (/usr/lib/php/modules/pcntl.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/modules/pcntl.so.so (/usr/lib/php/modules/pcntl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql.so' (tried: /usr/lib/php/modules/pgsql.so (/usr/lib/php/modules/pgsql.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/modules/pgsql.so.so (/usr/lib/php/modules/pgsql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'phar.so' (tried: /usr/lib/php/modules/phar.so (/usr/lib/php/modules/phar.so: undefined symbol: spl_ce_Countable), /usr/lib/php/modules/phar.so.so (/usr/lib/php/modules/phar.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'php_terra_master.so' (tried: /usr/lib/php/modules/php_terra_master.so (/usr/lib/php/modules/php_terra_master.so: undefined symbol: _tsrm_ls_cache), /usr/lib/php/modules/php_terra_master.so.so (/usr/lib/php/modules/php_terra_master.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: posix: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: redis: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: shmop: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: /usr/lib/php/modules/simplexml.so (/usr/lib/php/modules/simplexml.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/modules/simplexml.so.so (/usr/lib/php/modules/simplexml.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'soap.so' (tried: /usr/lib/php/modules/soap.so (/usr/lib/php/modules/soap.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/modules/soap.so.so (/usr/lib/php/modules/soap.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: sockets: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: sysvshm: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: tokenizer: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: xml: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: xmlreader: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: xmlwriter: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: zip: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP 7.3.2 (cgi-fcgi) (built: Jun  1 2021 12:09:45)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: PHP is calling the latest PHP version

Post by TMroy »

You better refer to this: viewtopic.php?f=37&t=1619
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: PHP is calling the latest PHP version

Post by sanctimon »

Thank you, I have done this, but I do not see a specific response to this question. The question is specific to the Beta 7.3 application available under TOS Applications.

Once installed, where are the libraries? And more importantly, why do they not replace the standard 7.1 php that is shipped with the current version of TOS?

Thank you.
Attachments
Στιγμιότυπο 2021-12-05, 11.23.07.png
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: PHP is calling the latest PHP version

Post by TMroy »

No, just because many services in TOS call the default php, it can't replace the system default php version like that way.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: PHP is calling the latest PHP version

Post by sanctimon »

Ok, that's fair, it is very possible to have multiple PHP installations on the same system.

However, the question remains:

Where in the filesystem are these new php installations deployed?

Thank you.
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: PHP is calling the latest PHP version

Post by sanctimon »

Bump.
User avatar
TMUser
Posts: 3
Joined: 29 Dec 2021, 05:36

Re: PHP is calling the latest PHP version

Post by TMUser »

Bump. Having the same issue. How to call PHP 7.4 from command line to run occ command for NextCloud?
Having the same error as OP:
/mnt/md1/application/bin/php74-cgi: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
/usr/local/bin/php74-cgi: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Version 7.3 is also missing some libs. Where to find them?
User avatar
TMUser
Posts: 3
Joined: 29 Dec 2021, 05:36

Re: PHP is calling the latest PHP version

Post by TMUser »

sanctimon wrote: 19 Dec 2021, 00:56Bump.
I found how to use occ with Nextcloud. It works if you have installed Nextcloud with Docker. You simply have to execute occ inside your docker container.
First go to application bin:
cd /mnt/md1/application/bin
Then enter your container command prompt:
docker exec --user 911 -it nextcloud /bin/bash
Then navigate to the correct directory and you can execute occ:
cd config/www/nextcloud/
./occ files:scan --all
Tadaa!
Image
Post Reply