PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

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

PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

craigarno
Moved my working SquirrelMail 1.4.22 installation/config to the new
Ubuntu 16.04 LTR platform.  Now occasionally INBOX message lines are
missing [From and/or Subject will be blank, the line with Date istill
shows] and I see these messages in my Apache 2.4 error_log:

[Sat Jul 09 22:11:22.905334 2016] [:error] [pid 18805] [client
50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e modifier* is
no longer supported, use *preg_replace_callback* instead in
/home/www/public/squirrelmail/functions/*mime.php on line 705*, referer:
https://mydomain.com/squirrelmail/src/webmail.php

[Sat Jul 09 22:11:22.930801 2016] [:error] [pid 18805] [client
50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e modifier* is
no longer supported, use *preg_replace_callback* instead in
/home/www/public/squirrelmail/functions/decode/*utf_8.php on line 77*,
referer: https://mydomain.com/squirrelmail/src/webmail.php
[Sat Jul 09 22:11:22.930816 2016] [:error] [pid 18805] [client
50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e modifier* is
no longer supported, use *preg_replace_callback* instead in
/home/www/public/squirrelmail/functions/decode/*utf_8.php on line 82*,
referer: https://mydomain.com/squirrelmail/src/webmail.php
[Sat Jul 09 22:11:22.930827 2016] [:error] [pid 18805] [client
50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e modifier* is
no longer supported, use *preg_replace_callback* instead in
/home/www/public/squirrelmail/functions/decode/*utf_8.php on line 87*,
referer: https://mydomain.com/squirrelmail/src/webmail.php

Good news is it looks like only 4 lines in two files containing
preg_replace() need to be modified for PHP7 to use a  
preg_replace_callback().  I can edit the files myself if I know what to
type.  Anybody solved this yet?  What is the exact format of the new
preg_replace_callback() function for these four source code lines?

I spent over an hour searching the web and SquirrelMail mailing list
archives and didn't find anything I can use to solve this issue. Now I'm
asking for help!  BTW, my users like SquirrelMail and are patiently
waiting for me to find an answer.

*
Installation Versions*:

- *SquirrelMail 1.4.22
*Plugin's:*
*  + administrator
   + calendar
   + fortune
   + gpg
   + html_mail
   + spamcop
   + squirrelspell

/Checking PHP configuration/...
     PHP version 7.0.4-7ubuntu2.1 OK.
     Running as www-data(33) / www-data(33)
     display_errors:
     error_reporting: 22527
     variables_order OK: GPCS.
     PHP extensions OK. Dynamic loading is disabled.
   ... Congratulations, your SquirrelMail setup looks fine to me!

- *PHP 7.0.4-7ubuntu2.1* (cli) ( NTS )
     Copyright (c) 1997-2016 The PHP Group
     Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
         with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend
Technologies

- Apache Server version: *Apache/2.4.18 (Ubuntu)*
     Server built:   2016-04-15T18:00:57

- Dovecot IMAP

- Frontier.com SMTP server

- OS: Ubuntu Server / Ubuntu Desktop 16.04 LTR

- SqurrelMail 1.4.22 installed manually from tar package many years ago,
and still working, except as noted.

- Firefox 47.0 browser


Thank you,
Craig
Craig Arno - Signature Block
------------------------------------------------------------------------

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

"Andrés Chandía"


The answer I got from Paul Lesniewski was:

SquirrelMail has
not yet been updated to work with PHP 7

and this was on May, 2nd, I don't
know if this status has changed, but I'm in the same situation

check:

http://readlist.com/lists/lists.sourceforge.net/squirrelmail-users/2/12332.html

So if you find further solutions please share...

thanks


Moved my
working SquirrelMail 1.4.22 installation/config to the new  Ubuntu 16.04 LTR platform.  Now
occasionally INBOX message lines are  missing [From and/or Subject will be blank, the line
with Date istill  shows] and I see these messages in my Apache 2.4 error_log:  [Sat Jul 09
22:11:22.905334 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP Warning:
*preg_replace()*: The */e modifier* is  no longer supported, use *preg_replace_callback*
instead in  /home/www/public/squirrelmail/functions/*mime.php on line 705*, referer:  https://mydomain.com/squirrelmail/src/webmail.php
 [Sat Jul 09 22:11:22.930801 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP
Warning: *preg_replace()*: The */e modifier* is  no longer supported, use
*preg_replace_callback* instead in  /home/www/public/squirrelmail/functions/decode/*utf_8.php
on line 77*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
[Sat Jul 09 22:11:22.930816 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP
Warning: *preg_replace()*: The */e modifier* is  no longer supported, use
*preg_replace_callback* instead in  /home/www/public/squirrelmail/functions/decode/*utf_8.php
on line 82*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
[Sat Jul 09 22:11:22.930827 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP
Warning: *preg_replace()*: The */e modifier* is  no longer supported, use
*preg_replace_callback* instead in  /home/www/public/squirrelmail/functions/decode/*utf_8.php
on line 87*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
 Good news is it looks like only 4 lines in two files containing  preg_replace() need to be
modified for PHP7 to use a   preg_replace_callback().  I can edit the files myself if I know
what to  type.  Anybody solved this yet?  What is the exact format of the new
preg_replace_callback() function for these four source code lines?  I spent over an hour
searching the web and SquirrelMail mailing list  archives and didn't find anything I can use
to solve this issue. Now I'm  asking for help!  BTW, my users like SquirrelMail and are
patiently  waiting for me to find an answer.  * Installation Versions*:  - *SquirrelMail
1.4.22 *Plugin's:* *  + administrator    + calendar    + fortune    + gpg    + html_mail    +
spamcop    + squirrelspell  /Checking PHP configuration/...      PHP version 7.0.4-7ubuntu2.1
OK.      Running as www-data(33) / www-data(33)      display_errors:      error_reporting:
22527      variables_order OK: GPCS.      PHP extensions OK. Dynamic loading is disabled.  
... Congratulations, your SquirrelMail setup looks fine to me!  - *PHP 7.0.4-7ubuntu2.1* (cli)
( NTS )      Copyright (c) 1997-2016 The PHP Group      Zend Engine v3.0.0, Copyright (c)
1998-2016 Zend Technologies          with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by
Zend  Technologies  - Apache Server version: *Apache/2.4.18 (Ubuntu)*      Server built:  
2016-04-15T18:00:57  - Dovecot IMAP  - Frontier.com SMTP server  - OS: Ubuntu Server / Ubuntu
Desktop 16.04 LTR  - SqurrelMail 1.4.22 installed manually from tar package many years ago,
and still working, except as noted.  - Firefox 47.0 browser   Thank you, Craig Craig Arno -
Signature Block ------------------------------------------------------------------------
------------------------------------------------------------------------------ Attend Shape:
An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore
cutting-edge tech and listen to tech luminaries present their vision of the future. This
family event has something for everyone, including kids. Get more information and register
today. http://sdm.link/attshape -----
squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users




_______________________
            andrés
chandía

NMT | Dungupeyem | Corlexim

administrador de:
parles.upf | delingua | amind
terapia | mapuche koyaktu | mail ong mapuche koyaktu | mail psicoaching |
P No imprima innecesariamente. ¡Cuide el medio ambiente!
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

Paul Lesniewski


On 2016年07月10日 02:54, "Andrés Chandía" wrote:
>
>
> The answer I got from Paul Lesniewski was:
>
> SquirrelMail has
> not yet been updated to work with PHP 7

The errors below are not PHP7 issues.  They are fixed in version
1.4.23-SVN, which is available (nightly snapshots) on our downloads page.

> Moved my
> working SquirrelMail 1.4.22 installation/config to the new  Ubuntu 16.04 LTR platform.  Now
> occasionally INBOX message lines are  missing [From and/or Subject will be blank, the line
> with Date istill  shows] and I see these messages in my Apache 2.4 error_log:  [Sat Jul 09
> 22:11:22.905334 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP Warning:
> *preg_replace()*: The */e modifier* is  no longer supported, use *preg_replace_callback*
> instead in  /home/www/public/squirrelmail/functions/*mime.php on line 705*, referer:  https://mydomain.com/squirrelmail/src/webmail.php
>  [Sat Jul 09 22:11:22.930801 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP
> Warning: *preg_replace()*: The */e modifier* is  no longer supported, use
> *preg_replace_callback* instead in  /home/www/public/squirrelmail/functions/decode/*utf_8.php
> on line 77*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
> [Sat Jul 09 22:11:22.930816 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP
> Warning: *preg_replace()*: The */e modifier* is  no longer supported, use
> *preg_replace_callback* instead in  /home/www/public/squirrelmail/functions/decode/*utf_8.php
> on line 82*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
> [Sat Jul 09 22:11:22.930827 2016] [:error] [pid 18805] [client  50.46.232.213:41874] PHP
> Warning: *preg_replace()*: The */e modifier* is  no longer supported, use
> *preg_replace_callback* instead in  /home/www/public/squirrelmail/functions/decode/*utf_8.php
> on line 87*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
>  Good news is it looks like only 4 lines in two files containing  preg_replace() need to be
> modified for PHP7 to use a   preg_replace_callback().  I can edit the files myself if I know
> what to  type.  Anybody solved this yet?  What is the exact format of the new
> preg_replace_callback() function for these four source code lines?  I spent over an hour
> searching the web and SquirrelMail mailing list  archives and didn't find anything I can use
> to solve this issue. Now I'm  asking for help!  BTW, my users like SquirrelMail and are
> patiently  waiting for me to find an answer.  * Installation Versions*:  - *SquirrelMail
> 1.4.22 *Plugin's:* *  + administrator    + calendar    + fortune    + gpg    + html_mail    +
> spamcop    + squirrelspell  /Checking PHP configuration/...      PHP version 7.0.4-7ubuntu2.1
> OK.      Running as www-data(33) / www-data(33)      display_errors:      error_reporting:
> 22527      variables_order OK: GPCS.      PHP extensions OK. Dynamic loading is disabled.  
> ... Congratulations, your SquirrelMail setup looks fine to me!  - *PHP 7.0.4-7ubuntu2.1* (cli)
> ( NTS )      Copyright (c) 1997-2016 The PHP Group      Zend Engine v3.0.0, Copyright (c)
> 1998-2016 Zend Technologies          with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by
> Zend  Technologies  - Apache Server version: *Apache/2.4.18 (Ubuntu)*      Server built:  
> 2016-04-15T18:00:57  - Dovecot IMAP  - Frontier.com SMTP server  - OS: Ubuntu Server / Ubuntu
> Desktop 16.04 LTR  - SqurrelMail 1.4.22 installed manually from tar package many years ago,
> and still working, except as noted.  - Firefox 47.0 browser   Thank you, Craig Craig Arno -

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

rich.greder
In reply to this post by craigarno
I have exactly the same problem and posted about it on July 4.  I ended up on a business trip and haven't had time to deal with it, but the results I got from others are very promising.  Below is the promising reply I got.  Excited to see this has been worked on.

https://sourceforge.net/p/squirrelmail/mailman/message/35200210/

If it works for you, send me an email.  I'd like to know how it turned out.  If you have trouble/questions, I'll make time to fix mine so that I can help you out.  So far, only junk mail has been goofing over here, so I haven't made it a priority yet.

Rick

On 7/10/2016 at 8:59 AM, "Craig Arno" <[hidden email]> wrote:

>
>Moved my working SquirrelMail 1.4.22 installation/config to the
>new
>Ubuntu 16.04 LTR platform.  Now occasionally INBOX message lines
>are
>missing [From and/or Subject will be blank, the line with Date
>istill
>shows] and I see these messages in my Apache 2.4 error_log:
>
>[Sat Jul 09 22:11:22.905334 2016] [:error] [pid 18805] [client
>50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e
>modifier* is
>no longer supported, use *preg_replace_callback* instead in
>/home/www/public/squirrelmail/functions/*mime.php on line 705*,
>referer:
>https://mydomain.com/squirrelmail/src/webmail.php
>
>[Sat Jul 09 22:11:22.930801 2016] [:error] [pid 18805] [client
>50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e
>modifier* is
>no longer supported, use *preg_replace_callback* instead in
>/home/www/public/squirrelmail/functions/decode/*utf_8.php on line
>77*,
>referer: https://mydomain.com/squirrelmail/src/webmail.php
>[Sat Jul 09 22:11:22.930816 2016] [:error] [pid 18805] [client
>50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e
>modifier* is
>no longer supported, use *preg_replace_callback* instead in
>/home/www/public/squirrelmail/functions/decode/*utf_8.php on line
>82*,
>referer: https://mydomain.com/squirrelmail/src/webmail.php
>[Sat Jul 09 22:11:22.930827 2016] [:error] [pid 18805] [client
>50.46.232.213:41874] PHP Warning: *preg_replace()*: The */e
>modifier* is
>no longer supported, use *preg_replace_callback* instead in
>/home/www/public/squirrelmail/functions/decode/*utf_8.php on line
>87*,
>referer: https://mydomain.com/squirrelmail/src/webmail.php
>
>Good news is it looks like only 4 lines in two files containing
>preg_replace() need to be modified for PHP7 to use a  
>preg_replace_callback().  I can edit the files myself if I know
>what to
>type.  Anybody solved this yet?  What is the exact format of the
>new
>preg_replace_callback() function for these four source code lines?
>
>I spent over an hour searching the web and SquirrelMail mailing
>list
>archives and didn't find anything I can use to solve this issue.
>Now I'm
>asking for help!  BTW, my users like SquirrelMail and are
>patiently
>waiting for me to find an answer.
>
>*
>Installation Versions*:
>
>- *SquirrelMail 1.4.22
>*Plugin's:*
>*  + administrator
>   + calendar
>   + fortune
>   + gpg
>   + html_mail
>   + spamcop
>   + squirrelspell
>
>/Checking PHP configuration/...
>     PHP version 7.0.4-7ubuntu2.1 OK.
>     Running as www-data(33) / www-data(33)
>     display_errors:
>     error_reporting: 22527
>     variables_order OK: GPCS.
>     PHP extensions OK. Dynamic loading is disabled.
>   ... Congratulations, your SquirrelMail setup looks fine to me!
>
>- *PHP 7.0.4-7ubuntu2.1* (cli) ( NTS )
>     Copyright (c) 1997-2016 The PHP Group
>     Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
>         with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by
>Zend
>Technologies
>
>- Apache Server version: *Apache/2.4.18 (Ubuntu)*
>     Server built:   2016-04-15T18:00:57
>
>- Dovecot IMAP
>
>- Frontier.com SMTP server
>
>- OS: Ubuntu Server / Ubuntu Desktop 16.04 LTR
>
>- SqurrelMail 1.4.22 installed manually from tar package many
>years ago,
>and still working, except as noted.
>
>- Firefox 47.0 browser
>
>
>Thank you,
>Craig
>Craig Arno - Signature Block
>-------------------------------------------------------------------
>-----
>
>-------------------------------------------------------------------
>-----------
>Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park
>in San
>Francisco, CA to explore cutting-edge tech and listen to tech
>luminaries
>present their vision of the future. This family event has
>something for
>everyone, including kids. Get more information and register today.
>http://sdm.link/attshape
>-----
>squirrelmail-users mailing list
>Posting guidelines: http://squirrelmail.org/postingguidelines
>List address: [hidden email]
>List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>List info (subscribe/unsubscribe/change options):
>https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

Fjolsvith
I'd like to post a solution to the Preg_replace() issue in Squirrelmail.

I rewrote the code in utf_8.php (starting line 76) to modify the functions generating the errors:

<code>
    // decode four byte unicode characters
    $string = preg_replace_callback("/([\360-\367])([\200-\277])([\200-\277])([\200-\277])/",
        function ($matches) {
                return '&#' . ((ord($matches[1])-240)*262144 + (ord($matches[2])-128)*4096 + (ord($matches[3])-128)*64 + (ord($matches[4])-128)) . ';';
},
//    "'&#'.((ord('\\1')-240)*262144+(ord('\\2')-128)*4096+(ord('\\3')-128)*64+(ord('\\4')-128)).';'",
    $string);

    // decode three byte unicode characters
    $string = preg_replace_callback("/([\340-\357])([\200-\277])([\200-\277])/",
        function ($matches) {
                return '&#' . ((ord($matches[1])-224)*4096 + (ord($matches[2])-128)*64 + (ord($matches[3])-128)) . ';';
},
//    "'&#'.((ord('\\1')-224)*4096+(ord('\\2')-128)*64+(ord('\\3')-128)).';'",
    $string);

    // decode two byte unicode characters
    $string = preg_replace_callback("/([\300-\337])([\200-\277])/",
        function ($matches) {
                return '&#' . ((ord($matches[1])-192)*64 + (ord($matches[2])-128)) . ';';
},
//    "'&#'.((ord('\\1')-192)*64+(ord('\\2')-128)).';'",
    $string);

    // remove broken unicode
    $string = preg_replace("/[\200-\237]|\240|[\241-\377]/",'?',$string);

    return $string;
}

</code>

And the code for the mime.php file starting at line 705:

<code>

                    $replace = preg_replace_callback('/=([0-9a-f]{2})/i',
                            function ($matches) {
                                return chr(hexdec($matches[1]));
                            },
//'chr(hexdec("\1"))',
                            $replace);
 
</code>
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

Paul Lesniewski


On 2016年10月08日 23:52, Fjolsvith wrote:
> I'd like to post a solution to the Preg_replace() issue in Squirrelmail.
>
> I rewrote the code in utf_8.php (starting line 76) to modify the functions
> generating the errors:

Hi Fjolsvith,

Please post to the squirrelmail-devel mailing list, and most
importantly, post a unified diff (diff -u) when proposing patches so
changes can be reproduced and analyzed.

Thanks for your interest in helping!

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

Paul Lesniewski


On 2016年10月12日 00:44, Paul Lesniewski wrote:

>
>
> On 2016年10月08日 23:52, Fjolsvith wrote:
>> I'd like to post a solution to the Preg_replace() issue in Squirrelmail.
>>
>> I rewrote the code in utf_8.php (starting line 76) to modify the functions
>> generating the errors:
>
> Hi Fjolsvith,
>
> Please post to the squirrelmail-devel mailing list, and most
> importantly, post a unified diff (diff -u) when proposing patches so
> changes can be reproduced and analyzed.
>
> Thanks for your interest in helping!

Also, sorry for the multiple messages, but you'll also need to work
against our SVN code for version 1.4.23.

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

craigarno
In reply to this post by "Andrés Chandía"


I'm reporting SquirrelMail 1.4.23-SVN works well with Ubuntu 1604 LTR x64
/ PHP 7 / Apache, fixing the problems I mentioned below with 1.4.22.

I was also able to move the small number of plugins I use, like
html_mail, over to 1.4.23-svn and it also works. I'm using SquirrelMail
1.4.23-svn to produce this message.

Thanks to Paul for
responding with the solution.  It works!

Craig

>
>
> The answer I got from Paul Lesniewski was:
>
> SquirrelMail has
> not yet been updated to work
with PHP 7
>
> and this was on May, 2nd, I don't
> know if this status has changed, but I'm in the same situation
>
> check:
>
>
http://readlist.com/lists/lists.sourceforge.net/squirrelmail-users/2/12332.html
>
> So if you find further solutions please share...
>
> thanks
>
>
> Moved my
> working SquirrelMail 1.4.22 installation/config to the new  Ubuntu
16.04
> LTR platform.  Now
> occasionally INBOX message
lines are  missing [From and/or Subject will be
> blank, the
line
> with Date istill  shows] and I see these messages in my
Apache 2.4
> error_log:  [Sat Jul 09
> 22:11:22.905334
2016] [:error] [pid 18805] [client  50.46.232.213:41874]
> PHP
Warning:
> *preg_replace()*: The */e modifier* is  no longer
supported, use
> *preg_replace_callback*
> instead in
/home/www/public/squirrelmail/functions/*mime.php on line
> 705*,
referer:  https://mydomain.com/squirrelmail/src/webmail.php
>
[Sat Jul 09 22:11:22.930801 2016] [:error] [pid 18805] [client
>
50.46.232.213:41874] PHP
> Warning: *preg_replace()*: The */e
modifier* is  no longer supported, use
> *preg_replace_callback*
instead in
>
/home/www/public/squirrelmail/functions/decode/*utf_8.php
> on
line 77*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
> [Sat Jul 09 22:11:22.930816 2016] [:error] [pid 18805] [client
> 50.46.232.213:41874] PHP
> Warning: *preg_replace()*: The
*/e modifier* is  no longer supported, use
>
*preg_replace_callback* instead in
>
/home/www/public/squirrelmail/functions/decode/*utf_8.php
> on
line 82*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
> [Sat Jul 09 22:11:22.930827 2016] [:error] [pid 18805] [client
> 50.46.232.213:41874] PHP
> Warning: *preg_replace()*: The
*/e modifier* is  no longer supported, use
>
*preg_replace_callback* instead in
>
/home/www/public/squirrelmail/functions/decode/*utf_8.php
> on
line 87*,  referer: https://mydomain.com/squirrelmail/src/webmail.php
>  Good news is it looks like only 4 lines in two files containing

> preg_replace() need to be
> modified for PHP7 to use a
 preg_replace_callback().  I can edit the
> files myself if I
know
> what to  type.  Anybody solved this yet?  What is the exact
format of the
> new
> preg_replace_callback() function for
these four source code lines?  I
> spent over an hour
>
searching the web and SquirrelMail mailing list  archives and didn't
find
> anything I can use
> to solve this issue. Now I'm
asking for help!  BTW, my users like
> SquirrelMail and are
> patiently  waiting for me to find an answer.  * Installation
Versions*:  -
> *SquirrelMail
> 1.4.22 *Plugin's:* *  +
administrator    + calendar    + fortune    + gpg
>   + html_mail
   +
> spamcop    + squirrelspell  /Checking PHP configuration/...
     PHP
> version 7.0.4-7ubuntu2.1
> OK.      Running as
www-data(33) / www-data(33)      display_errors:    
>
error_reporting:
> 22527      variables_order OK: GPCS.      PHP
extensions OK. Dynamic
> loading is disabled.
> ...
Congratulations, your SquirrelMail setup looks fine to me!  - *PHP
> 7.0.4-7ubuntu2.1* (cli)
> ( NTS )      Copyright (c)
1997-2016 The PHP Group      Zend Engine
> v3.0.0, Copyright
(c)
> 1998-2016 Zend Technologies          with Zend OPcache
v7.0.6-dev,
> Copyright (c) 1999-2016, by
> Zend
Technologies  - Apache Server version: *Apache/2.4.18 (Ubuntu)*    
> Server built:
> 2016-04-15T18:00:57  - Dovecot IMAP  -
Frontier.com SMTP server  - OS:
> Ubuntu Server / Ubuntu
>
Desktop 16.04 LTR  - SqurrelMail 1.4.22 installed manually from tar
> package many years ago,
> and still working, except as
noted.  - Firefox 47.0 browser   Thank you,
> Craig Craig Arno
-
> Signature Block
>
------------------------------------------------------------------------
>
------------------------------------------------------------------------------
> Attend Shape:
> An AT&T Tech Expo July 15-16. Meet us
at AT&T Park in San Francisco, CA to
> explore
>
cutting-edge tech and listen to tech luminaries present their vision of
> the future. This
> family event has something for everyone,
including kids. Get more
> information and register
>
today. http://sdm.link/attshape -----
> squirrelmail-users mailing
list Posting guidelines:
>
http://squirrelmail.org/postingguidelines
> List address:
[hidden email]
> List archives:
http://news.gmane.org/gmane.mail.squirrelmail.user
> List info
(subscribe/unsubscribe/change options):
>
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>

>
>
>
> _______________________
>
            andrés
> chandía
>
> NMT | Dungupeyem |
Corlexim
>
> administrador de:
> parles.upf |
delingua | amind
> terapia | mapuche koyaktu | mail ong mapuche
koyaktu | mail psicoaching |
> P No imprima innecesariamente.
¡Cuide el medio ambiente!
>
------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T
Park in San
> Francisco, CA to explore cutting-edge tech and
listen to tech luminaries
> present their vision of the future.
This family event has something for
> everyone, including kids.
Get more information and register today.
>
http://sdm.link/attshape
> -----
> squirrelmail-users
mailing list
> Posting guidelines:
http://squirrelmail.org/postingguidelines
> List address:
[hidden email]
> List archives:
http://news.gmane.org/gmane.mail.squirrelmail.user
> List info
(subscribe/unsubscribe/change options):
>
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|

Re: PHP5 -> PHP7 with SquirrelMail 1.4.22 causes large quantity of error_log warnings

Paul Lesniewski
In reply to this post by Fjolsvith


On 2016年10月08日 23:52, Fjolsvith wrote:
> I'd like to post a solution to the Preg_replace() issue in Squirrelmail.

FWIW, you'd want to grab a snapshot of version 1.4.23, which is
compatible with PHP 7.
--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users