Forum Moderators: coopster

Message Too Old, No Replies

Confilct between two versions of PHP

         

humandesigner

5:47 pm on Mar 31, 2005 (gmt 0)

10+ Year Member



Hello,

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! :)

jatar_k

11:36 pm on Apr 1, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I honestly don't know if it will work. Having both types of php installed is problematic, to say the least, and not something I would recommend.

IMAP is also a pain, sorry I don't know of a way around this. My recommendation would be to dump the CGI and stick with the module.

StupidScript

12:28 am on Apr 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with jatar_k. The CGI implementation is not as fast or as secure as the module implementation. You should dump it and use only the module.

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. :)

humandesigner

9:42 am on Apr 2, 2005 (gmt 0)

10+ Year Member



Thanks for your inputs :)

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.