$ php -r 'imap_open();'
PHP Fatal error: Uncaught Error: Call to undefined function imap_open()
in Command line code:1
I know, you have to install the appropriate extension (sudo apt install SOMETHING).
But there is a special command (for Ubuntu 22.04.1) to establish
precisely (without going to google) what extension (package) should we install?
For example
$ php-owner-package imap_open
imap_open() function it's included into package SOMETHING
$ php -r 'imap_open();'
PHP Fatal error: Uncaught Error: Call to undefined function
imap_open() in Command line code:1
I know, you have to install the appropriate extension (sudo apt
install SOMETHING).
sudo apt install php-imap
Il 03/09/22 11:45, J.O. Aho ha scritto:
$ php -r 'imap_open();'
PHP Fatal error: Uncaught Error: Call to undefined function
imap_open() in Command line code:1
I know, you have to install the appropriate extension (sudo apt
install SOMETHING).
sudo apt install php-imap
Where is the official documentation that says you need to install this extension?
How did you come to this conclusion?
The official php documentation mentions these in the build instructions,
but talking about which features you need, you need to give different
build options, each of those build options are generally made into a php extending package in different Linux distributions.
The Unix-philosophy has an element of having only the bar minimum
installed that makes it possible to do what you need to do, so you want
to connect to a postgresql database, then you don't need all the stuff
to connect to mysql nor mssql databases.
This also has a security benefit, the attack vector becomes smaller the
less extensions you have installed, as you know from time to time there
are vulnerabilities found and say there would be a xml related
vulnerability in php version you are using, but if you don't have the
xml support built in nor an xml extension, then you not affected by that vulnerability, but if you have xml support then you are vulnerable.
See the positive thing, all you need to do is use apt to install the extensions, while those with microsoft windows has to search on the net
to find the extension built for the same version of php as you are using
and you won't be sure if the one you find has a backdoor built into it
or not.
How did you come to this conclusion?
Been around Linux for a long time and even been building packages once i
the time.
thanks from info
Il 03/09/22 15:00, Mark5320 ha scritto:
thanks from info
by the way, what are the differences between the various versions found
php-imap/jammy,jammy 2:8.1+92ubuntu1 all
php8.1-imap/jammy-updates 8.1.2-1ubuntu2.3 amd64
php-net-imap/jammy,jammy 1:1.1.3-2.1 all
by the way, what are the differences between the various versions found
~$ apt search imap | grep php
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
php-imap/jammy,jammy 2:8.1+92ubuntu1 all
php-net-imap/jammy,jammy 1:1.1.3-2.1 all
php8.1-imap/jammy-updates 8.1.2-1ubuntu2.3 amd64
...
$ php -r 'imap_open();'
PHP Fatal error: Uncaught Error: Call to undefined function imap_open()
in Command line code:1
I know, you have to install the appropriate extension (sudo apt install SOMETHING).
But there is a special command (for Ubuntu 22.04.1) to establish
precisely (without going to google) what extension (package) should we install?
For example
$ php-owner-package imap_open
imap_open() function it's included into package SOMETHING
Implement this then.[...]
Mark5320 kirjutas Laupäev, 3. september 2022 kl 11:34:31 UTC+3:
$ php -r 'imap_open();'
PHP Fatal error: Uncaught Error: Call to undefined function imap_open()
in Command line code:1
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 349 |
Nodes: | 16 (2 / 14) |
Uptime: | 119:41:22 |
Calls: | 7,612 |
Files: | 12,787 |
Messages: | 5,684,114 |