Fatal error on login after upgrading to PHP 5.5.36 and SquirrelMail 1.4.22

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fatal error on login after upgrading to PHP 5.5.36 and SquirrelMail 1.4.22

George Johnson
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Greetings. I have been successfully using SquirrelMail since 2008 on my server (a Mac Pro running Snow Leopard) and am grateful to all the people who make that possible. A couple of weeks ago I upgraded to El Capitan. Apache, postfix, and dovecot seem to be working fine, but I can't log in to SquirrelMail without getting a fatal error:

Fatal error: Call to undefined function session_unregister() in /Library/WebServer/Documents/squirrel/functions/global.php on line 244

I have searched the web and the SquirrelMail forums and have been unable to figure out what I've done wrong.

Here are the details:

SquirrelMail 1.4.16 and 1.4.22 installed manually. (First I tried my old SquirrelMail configuration, and when that failed I did a fresh install of 1.4.22.)

I have no plugins

PHP 5.5.36 (cli) (built: May 29 2016 01:07:06)

Server version: Apache/2.4.18 (Unix)
Server built:   Feb 20 2016 20:03:19

Dovecot 2.2.14 (running on ports 146 and 993)

Postfix 2.11.0

web browser used to access: Safari 9.1.3

When I run configtest.php it hangs for awhile and then displays the following:

SquirrelMail configtest

This script will try to check some aspects of your SquirrelMail configuration and point you to errors whereever it can find them. You need to go run conf.pl in the config/ directory first before you run this script.


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /Library/WebServer/Documents/squirrelmail-webmail-1.4.22/src/configtest.php on line 80
SquirrelMail version: 1.4.22
Config file version: 1.4.0
Config file last modified: 24 August 2017 01:12:42
Checking PHP configuration...
   PHP version 5.5.36 OK.
   Running as _www(70) / _www(70)
   display_errors: 1
   error_reporting: 22519
   variables_order OK: EGPCS.
   PHP extensions OK. Dynamic loading is enabled.
Checking paths...
   Data dir OK.
   Attachment dir OK.
   Plugins are not enabled in config.
   Themes OK.
   Default language OK.
   Base URL detected as: http://sanacacio.net/squirrelmail-webmail-1.4.22/src (location base autodetected)
Checking outgoing mail service....
   SMTP server OK (220 sanacacio.net ESMTP Postfix)
Checking IMAP service....

ERROR: Error connecting to IMAP server. Server error:


But no error information is displayed.

I'd very much appreciate your help.

George Johnson
Reply | Threaded
Open this post in threaded view
|

Re: Fatal error on login after upgrading to PHP 5.5.36 and SquirrelMail 1.4.22

George Johnson
This post has NOT been accepted by the mailing list yet.
OK, now I think I understand why the newest stable version of SquirrelMail (1.4.22) does not work on El Capitan (and presumably on later versions of OS X) and gives the fatal error message about the session_unregister function in the file global.php.

The documentation on the PHP website notes that session_unregister "has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0." (http://php.net/manual/en/function.session-unregister.php) El Capitan comes with PHP 5.5.36. So SquirrelMail was trying to call a function that doesn't exist on my system.

Next I downloaded the SquirrelMail developer version 1.5.2 and found this in the ChangeLog file:

"Removed use of session_unregister() for compatibility with PHP 5.3.0 and PHP 6"

With a bit of tinkering I have SquirrelMail 1.5.2 running on El Capitan.

I'm sure most people here already know about the incompatibility, but I thought I'd record it in case any other Mac users come looking.