To fix the php_extension

To fix the php_extension

by Praveen George -
Number of replies: 7
installation error


Not able to fix the installation error, please find the  PHP and OS version 

 php -v

PHP Warning:  Module "pgsql" is already loaded in Unknown on line 0

PHP 8.1.16 (cli) (built: Feb 14 2023 18:59:41) (NTS gcc x86_64)

Copyright (c) The PHP Group

Zend Engine v4.1.16, Copyright (c) Zend Technologies

    with Zend OPcache v8.1.16, Copyright (c), by Zend Technologies

-------------------

uname -a

Linux ip-10-80-0-4.eu-west-1.compute.internal 6.1.25-37.47.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Apr 24 23:20:16 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux


Average of ratings: -
In reply to Praveen George

Re: To fix the php_extension

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
No idea on Amazon Linux. On Debian and derived distributions it would be '# apt-get install php-zip'.

BTW, '$ php -v' could be misleading, since Moodle is interested in the CGI version of PHP. Run phpinfo() in a php file and call it from the server to see the details of the CGI PHP.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: To fix the php_extension

by Praveen George -
Its cloud installation on moodle, I try to install on AWS EC2 instance (its same like redhat8)
I am using PHP 8.16 and same version of php-zip is not available and how to fix the sodium (php_extension error) error ?

$_SERVER['GATEWAY_INTERFACE']CGI/1.1

In reply to Praveen George

Re: To fix the php_extension

by Ken Task -
Picture of Particularly helpful Moodlers
Maybe we can get what the cloud OS is based upon?

uname -an

If true RedHat, RH has always been 'conservative' in what PHP extensions they offer from their own repos - thus one has to find a reputable 3rd party repo that does provide more.

Any Amazon docs on what 3rd part repos can be used if true RH?

'SoS', Ken

In reply to Ken Task

Re: To fix the php_extension

by Praveen George -
Thanks Ken.

I rebuild the machine due to the error, I build the machine with ubuntu and now moodle 4.2 is working .
thanks for your support.

Thanks,
Praveen George
In reply to Praveen George

Re: To fix the php_extension

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Beware - 'php -v' and so on is command line PHP. It's completely separate from the PHP that drives the web side of things. While it might be the same version and have the same plugins, it doesn't have to. Don't rely on command line PHP to diagnose mod-php or php-fpm (whichever you are using).
Average of ratings: Useful (1)