Re: Call to undefined function imap_open()

"J.O. Aho" <[email protected]>
Newsgroups comp.lang.php
Message-ID <[email protected]>
On 03/09/2022 10.34, Mark5320 wrote:
> $ 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

> 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

No there ain't a tool to tell you to which extension a function may 
belong to.

As the extensions tend to have functions with the extension name, so 
that the common part of the functions name and search for it with

apt-cache search imap | grep php

and you would have a good chance to see the extension as part of the 
result, sure not all extensions do have this the uniformity in function 
names and not all are included in the official ubuntu/debian repository.

-- 
   //Aho
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.