Forum Moderators: coopster
I'm having some problem with PHP and IMAP.
I have 2 versions of PHP installed on my server :
- Apache module
- CGI version
IMAP has been installed on both versions.
The problem is that it seems impossible to have IMAP work for both of them as you can see in this short explanation :
if :
extension=imap.so in php.ini
and :
;extension=imap.so in imap.ini
then :
only module version of php can use imap
if :
;extension=imap.so in php.ini
and :
extension=imap.so in imap.ini
then :
only cgi version of php can use imap
if :
;extension=imap.so in php.ini
and :
;extension=imap.so in imap.ini
then :
IMAP won't be activated on both version
if :
extension=imap.so in php.ini
and :
extension=imap.so in imap.ini
then :
IMAP will outpout errors because IMAP functions will be called twice.
Then, how am I supposed to make it work on both versions?
Thanks for helping! :)
Are you thinking you may NEED both versions installed? You shouldn't, unless you are running some kind of app that doesn't utilize the module. If that's the case, my suggestion is to find another solution that uses the module instead of using that particular app.
There are several mail programs that will happily install IMAP and POP3 capabilities fully integrated with your existing PHP installation. ilohaMail [sourceforge.net] comes to mind. You should also check out phpmailer [sourceforge.net] for working with mail functions from within PHP. Works real good. :)
Well, I really need the CGI version but I can't explain in detail the main reasons here.
Anyway, I've been advised to reinstall it with the option --with-config-file-path so that a different php.ini is used for this version.
I remember I had IMAP working in the past on both versions ... then it's far from being an impossible task I gues.
Thanks again.