Debian: How to install php extension without installing php4

I'm running Debian Woody.  I needed a more up-to-date version of PHP than Woody offered so compiled and installed from the source code instead of using apt-get.  It looks like this decision is coming back to haunt me.  

I need to install the imap extension for php and I don't really know where to begin.  I can't use apt-get install because Debian wants to install php4 (apt doesn't know it's already installed).

I looked at to see how to manually install it but I simply don't understand it.  Plus, even if I do figure it out, I'm worried about how this will affect Apache.  Will I need to recompile PHP into Apache, too?

So, because I'm not sure how to accomplish this, I'm stuck because I'm worried I'm going to end up breaking something on my server.  Can anyone offer some basic guidance?  Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can re-build PHP and include --with-imap in the args to configure. You will need the c-client libs & include files from the UWash IMAP distribution.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If you already have succesfully built and installed PHP from source, then you might as well do what jlevie suggested. On the other hand, if you want to use apt to manage your packages, you could search If you take that route, please note that those packages are strictly unofficial. Good thing with using backports is that it's easier to replace them with official packages when Sarge comes out.
nysus1Author Commented:
I downloaded the c-client files and now I'm trying to compile it.  To compile it properly, I need to know which kind of authentication my machine uses.  My choices are:

lnx   Linux with traditional passwords and crypt() in the C library
lnp   Linux with Pluggable Authentication Modules (PAM)
sl4   Linux using -lshadow to get the crypt() function
sl5   Linux with shadow passwords, no extra libraries
slx   Linux using -lcrypt to get the crypt() function

I'm guessing it's 'lnp' but I can't be totally sure.  I have the pam.conf file in /etc and a pam.d directory but how do I tell if Debian is actually using them?

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

I believe lnp will be correct for Debian (it is for RedHat & Mandrake).
nysus1Author Commented:

No, 'lnp'  didn't work.  I tried every other one, too, until it finally compiled with 'slx.'  I recompiled php4 with imap and it worked.  It doesn't look like I'm going to need to rebuild Apache, either.  Thanks for your help.
lnp should work, but it does require that you have the pam-devel package installed.
nysus1Author Commented:
Yeah, I didn't have that installed.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.