# Squirrelmail with php5.4



## xwwu (Oct 4, 2013)

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


```
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:


```
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


```
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?


----------



## ShelLuser (Oct 4, 2013)

Install lang/php53?

At least that's what the port maintainer suggests:


```
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.


----------



## xwwu (Oct 4, 2013)

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.


----------



## ShelLuser (Oct 4, 2013)

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:


```
# 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.


----------



## xwwu (Oct 5, 2013)

Thanks very much. portmaster can do that. default can be changed.


----------

