php-imap extensie instaleren onder Centos Virtual Machine
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.
Fijne jaarwisseling allemaal!
Ja dat heb ik gedaan en daarna de hele VM opnieuw opgestart omdat ik alleen apache niet voor elkaar kreeg.
Heb je zin om even met me mee te kijken via skype en / of teamviewer?
Ik heb nu even geen tijd, maar ik heb ook niet veel verstand van CentOS, meer van Ubuntu server. Als het morgen nog niet is opgelost, wil ik je wel helpen via Skype of TeamViewer.
Koen dat zou super zijn. Ik ga je iig even een PM sturen
Ozzie ja dank je. dat is eigenlijk hetzelfde als Koen zijn eerste post. Ik heb dat gedaan en het lijkt goed te gaan maar na een herstart krijg ik nog steeds die php foutmelding...
Gewijzigd op 31/12/2013 11:06:00 door Local Dev
Gebruik je DirectAdmin? In dat geval wordt het gebruik van yum voor de meegeleverde pakketten (mysql, php apache) afgeraden.
Aar, ik heb inderdaad DirectAdmin.
Kun je me de goede richting opduwen?
Kijk ook eens naar dit:
http://forum.directadmin.com/showthread.php?t=37357
Gewijzigd op 31/12/2013 11:36:03 door - Ariën -
Kan ik dat stappenplannetje gewoon volgen?
Gewijzigd op 31/12/2013 11:46:49 door Frank Nietbelangrijk
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()
Gewijzigd op 31/12/2013 12:03:56 door Local Dev
Frank Nietbelangrijk op 31/12/2013 11:45:12:
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?
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.
Gewijzigd op 31/12/2013 13:06:42 door - Ariën -
4: Re-compilling PHP
./build php n
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[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]#
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]#
Toevoeging op 31/12/2013 14:27:07:
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.
Gewijzigd op 31/12/2013 15:32:27 door Frank Nietbelangrijk
dit al geprobeerd?
Heb je het eerste antwoord van Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
[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
-- 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
Mijn configure.php5:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[root@ws1 custombuild]# cd /usr/local/directadmin/custombuild
[root@ws1 custombuild]# nano configure/ap2/configure.php5
GNU nano 2.0.9 File: configure/ap2/configure.php5
#!/bin/sh
./configure \
--with-apxs2 \
--with-curl=/usr/local/lib \
--with-gd \
--with-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-pdo-mysql=/usr \
--with-pcre-regex=/usr/local \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-magic-quotes \
--enable-safe-mode \
--enable-soap \
--enable-sockets \
--enable-mbstring \
--enable-zip \
--enable-wddx \
--with-imap=/usr/lib/dovecot/imap \
--with-imap-ssl
[root@ws1 custombuild]# nano configure/ap2/configure.php5
GNU nano 2.0.9 File: configure/ap2/configure.php5
#!/bin/sh
./configure \
--with-apxs2 \
--with-curl=/usr/local/lib \
--with-gd \
--with-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-pdo-mysql=/usr \
--with-pcre-regex=/usr/local \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-magic-quotes \
--enable-safe-mode \
--enable-soap \
--enable-sockets \
--enable-mbstring \
--enable-zip \
--enable-wddx \
--with-imap=/usr/lib/dovecot/imap \
--with-imap-ssl
Toevoeging op 31/12/2013 15:30:13:
de onderste twee regels heb ik zelf toegevoegd.
Quote:
On CentOS 64-bit, if you see the error:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
and cannot find libc-client.a anywhere on your box:
updatedb
locate libc-client.a
Download a uw-imap src.rpm from the internet. They can be found on rpmfind.net, eg:
http://rpmfind.net/linux/rpm2html/search.php?query=uw-imap&submit=Search+...&system=&arch=src
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
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
and cannot find libc-client.a anywhere on your box:
updatedb
locate libc-client.a
Download a uw-imap src.rpm from the internet. They can be found on rpmfind.net, eg:
http://rpmfind.net/linux/rpm2html/search.php?query=uw-imap&submit=Search+...&system=&arch=src
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