To enable aspell to function correctly, I changed the line containing SQSPELL_EREG from ereg to preg_match. in "/usr/local/www/squirrelmail/plugins/squirrelspell/sqspell_config.php". /* $SQSPELL_EREG = 'ereg'; */ $SQSPELL_EREG = 'preg_match'; Magically the embedded plugin for spell-checker functionality worked. I modified another line, negating a general patch. For reference: $SQSPELL_APP = array('English' => '/usr/local/bin/aspell -d en_AU -a'); For uzsolt@uzsolt.hu sed -i '' -e "/_EREG/s/ereg/preg_match/1" "/usr/local/www/squirrelmail/plugins/squirrelspell/sqspell_config.php"
(In reply to dewayne from comment #0) Are you able to produce a patch against the port using `make makepatch` ?
I think because it's a config file the user should overwrite this. IMHO it's better to create a pkg-message which describes this method if user wants spell-checking (and I should create a sqspell_config.php.sample file as in /usr/local/etc). What do you think?
Hm, I can see the problem: the ereg is deprecated and removed from PHP7+ and should use preg_match instead. But there are one problem (at least): these functions return values differ, ereg: "Returns the length of the matched string if a match for pattern was found in string, or FALSE if no matches were found or an error occurred. If the optional parameter regs was not passed or the length of the matched string is 0, this function returns 1." preg_match: "preg_match() returns 1 if the pattern matches given subject, 0 if it does not, or false on failure. " We should check every calls of ereg and check the parameters and the handle of return value - and change it if needed.