Re: Maia on centos 8
jjs - mainphrame <[email protected]>
| Newsgroups | gmane.mail.virus.maiamailguard |
|---|---|
| Message-ID | <CABkzw7wVG-yo599Z0S1CFE1WreVj0gg_Zf-2_d3x3nDte+sWcg@mail.gmail.com> |
Quick and dirty fix - Change line 557 of cache.php from this: $rectmp[] = $recipient; To this: $rectmp = $recipient; and now I can see and display the individual ham and spam messages. Jake On Thu, Mar 26, 2020 at 3:31 PM jjs - mainphrame <[email protected]> wrote: > For those interested in the old maia code base and php-7.2 > > I've actually managed to get somewhat farther with php-7.2, after a few > minor code tweaks. > > I can log into maia, become another user via admin, and see how many ham > and spam they have in the cache. > > [image: maia-screenshot-2020-03-26.png] > > But when I click on the ham or spam, php throws an error: > > Fatal error: Uncaught Error: [] operator not supported for strings in > /var/www/html/maia/cache.php:557 Stack trace: #0 > /var/www/html/maia/list-cache.php(148): MessageCache->render('6') #1 {main} > thrown in /var/www/html/maia/cache.php on line 557 > > So I'll have to figure out how that should be re-written for php 7. > > jake > > On Thu, Mar 26, 2020 at 2:29 PM jjs - mainphrame <[email protected]> > wrote: > >> You know what, the spam filtering part of maia still works fine on new >> distros, or 10 year old distros, so I can manage with the old maia as is, >> and just use a dedicated instance of debian 8 (or some other older distro) >> just for the web interface. >> >> If you'd rather be working on maia 2.0 material, I think that would have >> better long term prospects. >> >> Jake >> >> On Thu, Mar 26, 2020 at 1:31 PM jjs - mainphrame <[email protected]> >> wrote: >> >>> Yes, that simple test doesn't produce an outright failure, but it was a >>> place to start. The show stoppers are further down the road, but there may >>> be clues here. Thanks for the MDB2 link, I'll test with that. >>> >>> Jake >>> >>> On Thu, Mar 26, 2020 at 12:30 PM Robert LeBlanc <[email protected]> >>> wrote: >>> >>>> So far that looks like just deprecated syntax warnings and notices, but >>>> nothing that necessarily breaks functionality. I’d expect that with older >>>> code that hasn’t been updated for PHP 7—it may still work (you did get to >>>> “Success!”), but it’ll generate a lot of complaints in the logs unless you >>>> change the log threshold to ignore warnings and notices. >>>> >>>> According to its “official” changelog, MDB2 was last updated in 2012 (v >>>> 2.5.0b5), so its maintainers are clearly not going to update it for PHP 7. >>>> >>>> That said, there’s a GitHub version that seems to be maintained (as of >>>> 12 months ago) with PHP 7 fixes: >>>> >>>> https://github.com/pear/MDB2 >>>> >>>> >>>> On Mar 26, 2020, at 11:53 AM, jjs - mainphrame <[email protected]> >>>> wrote: >>>> >>>> Simple test - >>>> >>>> OK, I'm going back to basics here with a simple test, comparing Centos >>>> 7 & php-5.4.16 with Centos 8 & php-7.2.11 >>>> >>>> They both have the same pear MDB2 modules installed. A simple DB >>>> connection test was run on both: >>>> >>>> <?php >>>> require_once 'MDB2.php'; >>>> >>>> $dsn = 'mysqli://test:test@dbserv/test'; >>>> $options = array( >>>> 'debug' => 2, >>>> 'result_buffering' => false, >>>> ); >>>> >>>> $mdb2 =& MDB2:: connect($dsn, $options); >>>> if (PEAR::isError($mdb2)) { >>>> die($mdb2->getMessage()); >>>> } else { >>>> echo "Success!\n"; >>>> } >>>> >>>> $mdb2->disconnect(); >>>> ?> >>>> >>>> On Centos 7, it simply returns "Success!" >>>> But on Centos 8 it returns this: >>>> >>>> PHP Warning: count(): Parameter must be an array or an object that >>>> implements Countable in /usr/share/pear/MDB2.php on line 826 >>>> >>>> Warning: count(): Parameter must be an array or an object that >>>> implements Countable in /usr/share/pear/MDB2.php on line 826 >>>> PHP Notice: Only variables should be assigned by reference in >>>> /root/dbtest.php on line 10 >>>> >>>> Notice: Only variables should be assigned by reference in >>>> /root/dbtest.php on line 10 >>>> Success! >>>> >>>> Jake >>>> >>>> >>>> On Tue, Mar 24, 2020 at 11:46 AM jjs - mainphrame <[email protected]> >>>> wrote: >>>> >>>>> Hi folks, >>>>> >>>>> maia works well for me on centos 7, but not on centos 8, with php-7.2 >>>>> >>>>> Actually the perl part is golden, and configtest.pl works fine. But >>>>> the php side of things is broken, and configtest.php fails miserably. >>>>> >>>>> It looks the diverging code bases of php, smarty, pear and maia are >>>>> the issue. >>>>> >>>>> Has anybody had any success getting maia running with php-7.2? If so, >>>>> I'd be curious what tweaks you had to make. I found that as installed, >>>>> configtest.php says it can't connect to the database, but tcpdump shows >>>>> that not a single packet gets sent to the specified db server. >>>>> >>>>> If nobody has any new info, I guess I'll have to look at the old code >>>>> and try to figure out what's broken. >>>>> >>>>> Jake >>>>> >>>> _______________________________________________ >>>> Maia-users mailing list >>>> [email protected] >>>> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users >>>> >>>> >>>> _______________________________________________ Maia-users mailing list [email protected] http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
maia-screenshot-2020-03-26.png
(image/png, 133.4 KB) - not displayed