[imp] PHP 5

Matt Whitlock mwhitlock at oxmoor.com
Wed Oct 20 12:17:38 PDT 2004


To anyone who might like to run IMP on PHP 5:

I have Horde 2.2.6, IMP 3.2.6, and PHP 5.0.2 on my server and they are running
correctly.

I only changed one line of code in Horde.

In horde/lib/MIME/Viewer.php, the following code:

/* Check that we have a valid MIME_Part object */
if (!is_object($mime_part) || get_class($mime_part) != 'mime_part') {
    return false;
}

Should be changed to:

/* Check that we have a valid MIME_Part object */
if (!is_object($mime_part) || strtolower(get_class($mime_part)) != 'mime_part')
{
    return false;
}

That is all I had to change to get IMP running on PHP 5.  Also, be sure you have
the latest versions of any installed PEAR packages since there was a bug in
PEAR/Mail/RFC822.php that affected IMP's ability to send mail:
pear upgrade-all

Of course, your mileage may vary.  Chuck at Horde was very quick to dismiss this
fix, but it solved a lot of problems for me.  Hopefully someone else out there
can benefit.



Patrick Boutilier wrote:
> Chuck Hagenbuch wrote:
>> Quoting Patrick Boutilier <boutilpj at ednet.ns.ca>:
>>
>>> I just tried PHP 5.0.0 on my test server and it mostly worked with Horde
>>> 2.2.5 and IMP 3.2.4. The only problem I have run into so far is in the
>>> compose window. I get the following error when I click "Send"
>>
>>
>> PHP5 will *not* be supported on IMP 3/Horde 2. It's not currently
>> supported with
>> the HEAD/Alpha versions either, though it'll work in most cases.
>
>
> No problem. Just an FYI for anybody else who might have wanted to try
> PHP5. Couldn't find anything in the archives indicating anybody had
> tried PHP5.
>
>
>>
>>> Fatal error: Using $this when not in object context in
>>> /usr/local/apache-test/php/lib/php/Mail/RFC822.php on line 168
>>
>>
>> This isn't even our code.
>>
>> -chuck
>>
>> --
>> "Regard my poor demoralized mule!" - Juan Valdez



More information about the imp mailing list