Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #19092

Re: Call to undefined function imap_open()

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: Call to undefined function imap_open()
Date 2022-09-03 13:30 +0200
Message-ID <jngs6kF28b3U1@mid.individual.net> (permalink)
References <tev3if$1pn3$1@gioia.aioe.org> <jngm2lF1adpU1@mid.individual.net> <tevc74$1dko$2@gioia.aioe.org>

Show all headers | View raw


On 03/09/2022 13.01, Mark5320 wrote:
> 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?

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.

-- 
  //Aho

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Call to undefined function imap_open() Mark5320 <xxx@ma.rk> - 2022-09-03 10:34 +0200
  Re: Call to undefined function imap_open() "J.O. Aho" <user@example.net> - 2022-09-03 11:45 +0200
    Re: Call to undefined function imap_open() Mark5320 <xxx@ma.rk> - 2022-09-03 13:01 +0200
      Re: Call to undefined function imap_open() "J.O. Aho" <user@example.net> - 2022-09-03 13:30 +0200
        Re: Call to undefined function imap_open() Mark5320 <xxx@ma.rk> - 2022-09-03 15:00 +0200
          Re: Call to undefined function imap_open() Mark5320 <xxx@ma.rk> - 2022-09-03 15:05 +0200
            Re: Call to undefined function imap_open() "J.O. Aho" <user@example.net> - 2022-09-03 17:30 +0200
            Re: Call to undefined function imap_open() John-Paul Stewart <jpstewart@personalprojects.net> - 2022-09-03 15:08 -0400
              Re: Call to undefined function imap_open() Mark5320 <xxx@ma.rk> - 2022-09-05 11:23 +0200
  Re: Call to undefined function imap_open() Kristjan Robam <he12091983@gmail.com> - 2022-09-09 04:00 -0700
    Re: Call to undefined function imap_open() Arno Welzel <usenet@arnowelzel.de> - 2022-09-09 16:30 +0200

csiph-web