note 127695 added to imap.requirements
| From: | obeco at main dot php dot net | Date: | Thu, 06 Oct 2022 00:01:50 +0000 |
| Subject: | note 127695 added to imap.requirements | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219644@lists.php.net to get a copy of this message | ||
php-imap package is not available neither in Red Hat Enterprise Linux 7 nor 8.
To compile the extension yourself:
Prerequisites
# yum install pam-devel openssl-devel
Follow steps 2 and 3 from the previous post of "ldi at email dot cz"
Download the c-client library from github, you can see the link at the top of the page and compile
with:
# make lr5 SSLINCLUDE=/usr/include/openssl/ EXTRACFLAGS=-fPIC
(if you are using another distro, instead of lr5 you will type something else, you can view the
Makefile for other unix flavors)
Follow step 5 from the previous post of "ldi at email dot cz" which is what the second
paragraph at the top of the page explains.
Download the PHP source code of the version installed in your system and go to the php/ext/imap
folder.
# phpize
(If you installed the PHP packages from the Red Hat Software Collections you must run the following
command before to set the enviroment eg: scl enable rh-php73 bash)
# ./configure
--with-imap=<<path_to_where_you_unpacked_the_c-client_library_and_compiled_it>>
--with-imap-ssl
# make
This creates the file php/ext/imap/modules/imap.so :)
Copy it to your extension_dir (you can find it in the phpinfo() page).
Create an .ini file in the php.d folder with the text: extension=imap.so
Restart apache and be happy.
P.S. You could probably find the extension compiled out there but who knows the trustiness of the
source so better to get the official unaltered sources.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.161 (proxied: 2806:103e:1f:2ab3:998d:5111:25e6:1f2b)
----
Manual Page -- https://php.net/manual/en/imap.requirements.php
Edit -- https://main.php.net/note/edit/127695
Del: integrated -- https://main.php.net/note/delete/127695/integrated
Del: useless -- https://main.php.net/note/delete/127695/useless
Del: bad code -- https://main.php.net/note/delete/127695/bad+code
Del: spam -- https://main.php.net/note/delete/127695/spam
Del: non-english -- https://main.php.net/note/delete/127695/non-english
Del: in docs -- https://main.php.net/note/delete/127695/in+docs
Del: other reasons-- https://main.php.net/note/delete/127695
Reject -- https://main.php.net/note/reject/127695
Search -- https://main.php.net/manage/user-notes.php