Re: Maia on centos 8

Robert LeBlanc <[email protected]>
Newsgroups gmane.mail.virus.maiamailguard
Message-ID <[email protected]>
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 <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] <mailto:[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 <http://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
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQSBR6OyClV7nkt4Wjkaao4RHY0d7AUCXn0C5QAKCRAaao4RHY0d
7KMcAJ9S3BarWjrcbljdEJeI9h/6e2jHDACeKBPwEB1jZUMcZNXr2c6e9RZg7O8=
=a2wV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.