Bij een migratie van een website ben ik er achter gekomen dat de nieuwe server (Centos virtual machine) geen IMAP extensie aan heeft staan waardoor de foutmelding Call to undefined function imap_open() optreedt.
Ik ben zelf ijverig aan de slag gegaan om deze extensie met behulp van Putty te installeren maar helaas zonder succes.
Als er mensen zijn die hier verstand van hebben en mij willen helpen (tegen een kleine vergoeding) dan hoor ik dat graag. Stuur me in dat geval even een PM.
Directadmin moet ten aller tijde op een minimale installatie van het gebruikte besturingssysteem worden geïnstalleerd, PHP, NGINX, Apache, etc dienen indien aanwezig, eerst te worden verwijderd.
Okay maar voor de duidelijkheid: De server is helemaal geconfigureerd en alles werkt. Er was alleen geen php-imap extensie geïnstalleerd. Dat wil ik nu wel, en ik heb het met sudo yum install php-imap geprobeerd. De installatie lijkt goed te verlopen maar in PHP krijg ik de error Call to undefined function imap_open()
okee eerst even oliebollen bakken en dan ga ik even kijken. PHP was al geïnstalleerd en werkt verder prima.
Kan ik dat stappenplannetje gewoon volgen?
Ik raad dat zeker aan. Straks heb je het misschien wel werkend op een ranzige werkwijze buiten DirectAdmins's custombuild om, en dan ben je de hele imap-module weer kwijt na een rebuild.
Ik kom nog een probleem tegen bij stap 4:
4: Re-compilling PHP
./build php n
[root@ws1 ~]# yum -y install libc-client-devel.i386 rpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.weepeetelecom.nl
* extras: centos.weepeetelecom.nl
* rpmforge: mirror.nl.leaseweb.net
* updates: mirror.colocenter.nl
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
Setting up Install Process
No package libc-client-devel.i386 available.
Resolving Dependencies
--> Running transaction check
---> Package rpm.x86_64 0:4.8.0-27.el6 will be updated
--> Processing Dependency: rpm = 4.8.0-27.el6 for package: rpm-libs-4.8.0-27.el6.x86_64
--> Processing Dependency: rpm = 4.8.0-27.el6 for package: rpm-python-4.8.0-27.el6.x86_64
---> Package rpm.x86_64 0:4.8.0-37.el6 will be an update
--> Running transaction check
---> Package rpm-libs.x86_64 0:4.8.0-27.el6 will be updated
---> Package rpm-libs.x86_64 0:4.8.0-37.el6 will be an update
---> Package rpm-python.x86_64 0:4.8.0-27.el6 will be updated
---> Package rpm-python.x86_64 0:4.8.0-37.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Updating:
rpm x86_64 4.8.0-37.el6 base 901 k
Updating for dependencies:
rpm-libs x86_64 4.8.0-37.el6 base 313 k
rpm-python x86_64 4.8.0-37.el6 base 57 k
Transaction Summary
====================================================================================================
Upgrade 3 Package(s)
Total download size: 1.2 M
Downloading Packages:
(1/3): rpm-4.8.0-37.el6.x86_64.rpm | 901 kB 00:00
(2/3): rpm-libs-4.8.0-37.el6.x86_64.rpm | 313 kB 00:00
(3/3): rpm-python-4.8.0-37.el6.x86_64.rpm | 57 kB 00:00
----------------------------------------------------------------------------------------------------
Total 2.8 MB/s | 1.2 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : rpm-libs-4.8.0-37.el6.x86_64 1/6
Updating : rpm-4.8.0-37.el6.x86_64 2/6
Updating : rpm-python-4.8.0-37.el6.x86_64 3/6
Cleanup : rpm-python-4.8.0-27.el6.x86_64 4/6
Cleanup : rpm-libs-4.8.0-27.el6.x86_64 5/6
Cleanup : rpm-4.8.0-27.el6.x86_64 6/6
Verifying : rpm-4.8.0-37.el6.x86_64 1/6
Verifying : rpm-python-4.8.0-37.el6.x86_64 2/6
Verifying : rpm-libs-4.8.0-37.el6.x86_64 3/6
Verifying : rpm-python-4.8.0-27.el6.x86_64 4/6
Verifying : rpm-4.8.0-27.el6.x86_64 5/6
Verifying : rpm-libs-4.8.0-27.el6.x86_64 6/6
Updated:
rpm.x86_64 0:4.8.0-37.el6
Dependency Updated:
rpm-libs.x86_64 0:4.8.0-37.el6 rpm-python.x86_64 0:4.8.0-37.el6
Complete!
[root@ws1 ~]# cd /usr/local/directadmin/custombuild
[root@ws1 custombuild]# nano configure/ap2/configure.php5
[root@ws1 custombuild]# ./build php n
File already exists: php-5.3.22.tar.gz
MD5 Checksum on php-5.3.22.tar.gz passed.
You cannot install curl, because you do not have it set in options.conf file.
Found /usr/local/directadmin/custombuild/php-5.3.22.tar.gz
Extracting ...
Done.
Disabling asm/atomic in /usr/include/mysql/my_global.h
Configuring php-5.3.22...
creating cache ./config.cache
checking for Cygwin environment... no
-- KNIP! --
checking for IMAP support... yes
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... yes
checking for utf8_mime2text signature... new
checking for U8T_DECOMPOSE...
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
[root@ws1 custombuild]# configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing.^C
[root@ws1 custombuild]#
[size=xsmall]Toevoeging op 31/12/2013 14:27:07:[/size]
Volgens de eerste google resultaten zou dit mogelijk op te lossen zijn door de imap bibliotheken eerst te compileren. Maar ik ben nogal een leek op dit gebied.
Okee ik heb Local Dev zijn stappen doorlopen. Ik krijg nu één regel verder een foutmelding:
[root@ws1 ~]# yum -y install libc-client-devel.i386 rpm
-- KNIP! --
checking for IMAP support... yes
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... yes
checking for utf8_mime2text signature... new
checking for U8T_DECOMPOSE...
checking for pam_start in -lpam... no
checking for crypt in -lcrypt... yes
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
Then type (using the relevant src.rpm package url for your system, when possible):
wget http://files.directadmin.com/services/uw-imap-2007e-10.el6.src.rpm
rpmbuild --rebuild uw-imap-2007e-10.el6.src.rpm
cd /usr/src/redhat/RPMS/x86_64/
rpm -ivh uw-imap-static-2007e-10.el6.x86_64.rpm uw-imap-devel-2007e-10.el6.x86_64.rpm libc-client-2007e-10.el6.x86_64.rpm
Note, you may need to remove the newer version of libc-client and libc-client-devel, if the above conflict.
Also, link the .a file:
ln -s /usr/lib64/libc-client.a /usr/lib/libc-client.a