Squirrelmail with php5.4

PostfixAdmin works fine. But the next problem is coming. Squirrelmail can't work properly with php5.4. The error messages are:

Code:
Strict Standards: Non-static method Message::parseStructure() should not be called statically in /usr/local/www/squirrelmail/functions/mime.php on line 36

Strict Standards: Non-static method Message::parseBodyStructure() should not be called statically in /usr/local/www/squirrelmail/class/mime/Message.class.php on line 296
Current Folder: INBOX

After I send an email, the error messages are:

Code:
Strict Standards: Declaration of Deliver_SMTP::initStream() should be compatible with Deliver::initStream($message, $length = 0, $host = '', $port = '', $user = '', $pass = '') in /usr/local/www/squirrelmail/src/compose.php on line 1645

and

Code:
Message not sent. Server replied:

    Authentication failed
    535 5.7.8 Error: authentication failed: authentication failure

When installing Squirrelmail, the server told me that php5.4 does not support Squirrelmail. So what can I do for this issue?
 
Install lang/php53?

At least that's what the port maintainer suggests:

Code:
root@smtp2:/usr/ports/mail/squirrelmail # grep -A8 -m 1 USE_PHP Makefile
USE_PHP=        session mhash gettext mbstring pcre openssl xml
WANT_PHP_WEB=   yes
### Folks, please stop removing the following line and asking me why
### squirrelmail doesn't work. I know the canned error says that SM
### is incompatible with php 5, but it is just php-5.4 that it is
### incompatible with. Install lang/php53 and it will work.
### This will be fixed if/when the SM team releases the next version.
IGNORE_WITH_PHP=5 # known incompatibilities with php-5.4, use 5.3 for now
DEFAULT_PHP_VER=53
Or perhaps lang/php55 but I have no idea how well that would go.
 
Dear @ShelLuser:

I have installed php55 a couple of days ago. Squirrelmail installed well. But the IMAP extension is php55-imap-5.5.4 instead of php5-imap-5.5.4 which is needed by others. So I have to come back to php5.4.
 
Last edited by a moderator:
xwwu said:
But the IMAP extension is php55-imap-5.5.4 instead of php5-imap-5.5.4 which is needed by others. So I have to come back to php5.4.
Not necessarily.

Keep in mind that port dependencies aren't carved in stone so to say. In many cases there is a "default version" which will get automatically installed, but this only means that a certain version is preferred over the other. But normally this doesn't mean that you can't use another version instead.

For example; you're currently running lang/php55 and also using mail/squirrelmail. Yet if you check what Squirrelmail would prefer by default (so in an unconfigured situation) you'd get to see this:

Code:
# make -C /usr/ports/mail/squirrelmail run-depends-list
/usr/ports/converters/php53-mbstring
/usr/ports/devel/gettext
/usr/ports/devel/php53-gettext
/usr/ports/lang/php53
/usr/ports/security/php53-hash
/usr/ports/security/php53-openssl
/usr/ports/textproc/php53-xml
/usr/ports/www/php53-session
Same applies to your IMAP extension issue. A very good utility to solve these kind of problems is ports-mgmt/portmaster. You can easily tell it to replace mail/php5-imap with mail/php55-imap during which it will also take care of any dependencies by changing the dependency setting and rebuilding the ports involved (so that they'll use the new environment).

It might help you to solve this issue.
 
Back
Top