LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   z-push on slackware (https://www.linuxquestions.org/questions/slackware-14/z-push-on-slackware-875300/)

luvmax 04-16-2011 05:10 AM

z-push on slackware
 
Hi,

I'm really struggling with this. I'm using Slackware 9. I know it's old but the server is very well used and I'm really happy with it in every other respect.

When I try to run z-push (latest current version), I get ERROR BackendIMAP : PHP-IMAP module not installed!!!!!

In php (4.3.3) if I try to configure --with-imap, I get and error telling me rfc822.h cannot be found. On the web, I've seen lots of examples of people having this problem but I've yet to come accross the solution.

The documentation for z-push seems to be very mimimal in term of requirement etc.

Can anyone suggest how I should proceed?

Many thanks

bathory 04-16-2011 01:19 PM

Hi,

I guess you need an imap server installed, or at least the sources of it.
I'm running courier-imap (on Slackware 13) compiled from source and this file exists in the sources directory. The strange thing is that it isn't installed under /usr/local/include where the other header files of courier are installed.
So you can try to (re)compile php-imap using CPPFLAGS=/path/to/courier-imap-4.9.1/rfc822 and see if it works

Regards

luvmax 04-16-2011 01:29 PM

Thanks. It's good to know someone wants to help. I'm already running imapd all my email connections are imap. I don't want to risk them not working. I'm concerned that courier-imap is another version of imap other than the one in the slackware 9 distribution (imapd-4.53-i386-2) and might lead to other complications.

Does anyone know anything about the sources or imapd-4.53? Do they contain the 'missing' header file?

Alternaively, has anyone got z-push working on slackware 9? If so, how?

Thanks again. All help much appreciated.

bathory 04-16-2011 04:48 PM

Hi,

Here is what you can do. It's a bit tricky, but I've tried it and it worked. You need just to compile imapd (not install it). So get imap-4.5, extract it and do the following:
Open imap-4.5/src/osdep/unix/os_slx.h and add #include <time.h>
From the sources top directory run:
Code:

make slx
ln -s c-client include
mkdir lib
ln -s c-client/c-client.a lib/libc-client.a

Then go to the php sources and recompile it.

*** EDIT ***
Of course to compile php, you have to use:
Code:

./configure --with-imap=/path/to/imap-4.5 ...
HTH

luvmax 04-22-2011 08:20 AM

Thanks or all the suggestions.

No luck so far. I've also tried php 5 but gone back to trying to configure imap 4.3.3 again. I'm currently getting as far as
gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/lib/ -L/usr/local/lib/ conftest.c -limap -lcrypt -lresolv -lm -ldl -lnsl

which complains it can't find -limap.

Assuming its looking for imap.so (there's no imap.a on my system) I've tried pointing it to its location (/usr/lib obtained from a php-imap download) but I seem to have come to a dead end.

Why oh why can't Linux packages state thier dependancies? They used to. Or at least there was more info than seems to be available these days.

Thanks again. Any more help would be much appreciated.

bathory 04-22-2011 12:46 PM

Did you follow the instructions in my previous post? There should be lc-client instead of limap.
Don't forget to run make distclean in php sources before running ./configure again

luvmax 04-22-2011 12:50 PM

after configuring php (which now seems to succeed), typing 'make' produces the following output

/bin/sh /usr/src/php-4.3.3/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/imap/ -I/usr/src/php-4.3.3/ext/imap/ -DPHP_ATOM_INC -I/usr/src/php-4.3.3/include -I/usr/src/php-4.3.3/main -I/usr/src/php-4.3.3 -I/usr/src/php-4.3.3/Zend -I/usr/src/imap-4.5/include -I/usr/src/php-4.3.3/ext/xml/expat -I/usr/src/php-4.3.3/TSRM -g -O2 -prefer-pic -c /usr/src/php-4.3.3/ext/imap/php_imap.c -o ext/imap/php_imap.lo gcc: cannot specify -o with -c or -S and multiple compilations make: *** [ext/imap/php_imap.lo] Error 1

Any ideas anyone?

luvmax 04-23-2011 05:15 AM

Oh, I didn't see anywhere about the need to run 'make disclean'. Thanks.

make now runs a few compilations (including the one that failed above before coming up with.

/usr/src/php-4.3.3/ext/imap/php_imap.c:915: `SET_QUOTA' undeclared (first use in this function)

Looks like this could run and run. Thanks again.

markush 04-23-2011 06:37 AM

Hello luvmax,

if your issue is solved now, please use the "Thread Tools" above your first post of the thread and mark it as "SOLVED". And don't forget to add to bathory's reputation.

Markus

luvmax 04-23-2011 08:41 AM

Quote:

Originally Posted by markush (Post 4333514)
Hello luvmax,

if your issue is solved now, please use the "Thread Tools" above your first post of the thread and mark it as "SOLVED". And don't forget to add to bathory's reputation.

Markus

OK. Will do. Unfortunately, the problem is still on going as yet.

bathory 04-23-2011 11:52 AM

Hi,
Quote:

make now runs a few compilations (including the one that failed above before coming up with.

/usr/src/php-4.3.3/ext/imap/php_imap.c:915: `SET_QUOTA' undeclared (first use in this function)
Unfortunately this is usual when you're trying to compile old software. I'm also afraid that even if you succeed compiling php-4.3.3 with imap support, the fact that you're going to use such an old php version, will not allow z-push to be installed.
Anyway are you sure that the /usr/src/imap-4.5/include symlink points to /usr/src/imap-4.5/c-client? What gives:
Code:

ls -l /usr/src/imap-4.5/include

markush 04-23-2011 12:29 PM

Quote:

Originally Posted by luvmax (Post 4333583)
OK. Will do. Unfortunately, the problem is still on going as yet.

Sorry, I misread that.

Well, I don't have an answer to your problem. But it may be helpful, to report this thread to a Moderator and ask to move it to the Slackware-forum of LQ http://www.linuxquestions.org/questions/slackware-14/. As you know there are many knowledgeable and helpful people.

Another suggestion would be to start a new thread in the Slackware-forum and ask how one can upgrade a server from Slackware 9.0 to 13.1 (or even more recent ;) ) without losing to many of the working configurations.

Good Luck

Markus

luvmax 04-24-2011 05:22 AM

Quote:

Originally Posted by bathory (Post 4333696)
Hi,

Unfortunately this is usual when you're trying to compile old software. I'm also afraid that even if you succeed compiling php-4.3.3 with imap support, the fact that you're going to use such an old php version, will not allow z-push to be installed.
Anyway are you sure that the /usr/src/imap-4.5/include symlink points to /usr/src/imap-4.5/c-client? What gives:
Code:

ls -l /usr/src/imap-4.5/include

I think so:
/usr/src/imap-4.5# ls -las
total 84

4 drwxrwxr-x 10 104 root 4096 Apr 17 10:42 .
4 drwxr-xr-x 33 root root 4096 Apr 20 14:02 ..
4 -rw-rw-r-- 1 104 root 1940 Dec 1 1998 CONTENTS
16 -rw-rw-r-- 1 104 root 13399 Jan 27 1999 Makefile
4 -rw-r--r-- 1 root root 4 Apr 17 10:40 OSTYPE
4 -rw-rw-r-- 1 104 root 2144 Sep 8 1998 README
0 lrwxrwxrwx 1 root root 8 Apr 17 10:37 an -> tools/an
8 drwxr-xr-x 2 root root 8192 Apr 17 10:45 c-client
4 drwxrwxr-x 3 104 root 4096 Dec 16 1998 docs
4 drwxr-xr-x 2 root root 4096 Apr 17 10:41 imapd
0 lrwxrwxrwx 1 root root 8 Apr 17 10:41 include -> c-client
4 drwxr-xr-x 2 root root 4096 Apr 17 10:40 ipopd
4 drwxr-xr-x 2 root root 4096 Apr 17 10:42 lib
4 -rw-rw-r-- 1 104 root 2132 Apr 28 1998 makefile.nt
4 -rw-rw-r-- 1 104 root 2133 Apr 28 1998 makefile.ntk
4 -rw-rw-r-- 1 104 root 1956 Apr 28 1998 makefile.wce
4 drwxr-xr-x 2 root root 4096 Apr 17 10:40 mtest
4 drwxrwxr-x 9 104 root 4096 Dec 1 1998 src
4 drwxrwxr-x 2 104 root 4096 Nov 10 1998 tools

Also, the z-push docs do claim it works with php 4

Thanks everyone

luvmax 04-24-2011 05:28 AM

Quote:

Originally Posted by markush (Post 4333730)
Sorry, I misread that.

Well, I don't have an answer to your problem. But it may be helpful, to report this thread to a Moderator and ask to move it to the Slackware-forum of LQ http://www.linuxquestions.org/questions/slackware-14/. As you know there are many knowledgeable and helpful people.

Another suggestion would be to start a new thread in the Slackware-forum and ask how one can upgrade a server from Slackware 9.0 to 13.1 (or even more recent ;) ) without losing to many of the working configurations.

Good Luck

Markus

Happy to do either. When I cliced 'Report' It said this was only for rude/abusive etc. So I guess I've misunderstood. Perhaps theres some other way to report a thread as such.

Upgrading the server would be good but when I've done that in the past, I've had similar battles to get the more important existing packages going and suffered quite a bit of downtime as a consequence.

Thanks.

bathory 04-24-2011 09:51 AM

D'oh, in this case, I don't know what the actual problem is. It looks like some header file is missing, but you've the include symlink correct. Besides make chokes on php_imap.c line 915, while a few lines before that there is another similar declaration.

Maybe it's worth trying imap-2002e.tar.Z that is of year 2003 (same year as php-4.3.3).
FYI, I've tried it also and it compiled successfully (nb there is no need to add "#include <time.h>" anymore because it's already included), but I had to use no SSL, because my openssl version is newer than the one that existed back on 2003. To do so I used:
Code:

make slx SSLTYPE=none
, but you may not need to do it if imap-2002e compiles ok for you with just "make slx"
Then the usual stuff:
Code:

ln -s c-client include
ln -s c-client lib (it's the same as creating the lib symlink and adding the library there)
cd /path/to/php-4.3.3
make distclean
./configure --with-imap=/path/to/imap-2002e --with-apxs=/path/to/apxs --with-mysql ...
make

Let's hope it goes well this time

Regards


All times are GMT -5. The time now is 04:42 AM.