php5.5 and the future of Mysql extention

337 views
Skip to first unread message

Danny Terweij | LxCenter

unread,
Sep 15, 2013, 3:44:40 PM9/15/13
to lxd...@googlegroups.com
Hi,

Should we use Mysqli or PDO for accessing the database?

I just got a mail with a intrestring class:

http://www.phpclasses.org/package/8221-PHP-Access-MySQL-databases-using-PDO-wrapper-functions.html

Regards,
Danny

Danny Terweij | LxCenter

unread,
Sep 15, 2013, 9:51:21 PM9/15/13
to lxd...@googlegroups.com
Op 15-9-2013 21:44, Danny Terweij | LxCenter schreef:
php.net says use mysqli so we do that also.

I changed the mysql to mysqli and it is working. I have the GUI and
scripts are running. Tho there are several places with a mysql_connect()
also.. Lets see if i can use the internal libs for that.

For the record: I use lxphp 5.5.3 and for the moment disabled mysql.so
and added mysqli.so (can not be run both? got php errors about mysql
already loaded at lphp.exe -v)


lxphp 5.2.1-400 does not have mysqli support aswell as the lxphp
5.2.17-x rpm's.

This will happen:

* stock HyperVM installation (2.0.xxxx)
Update to lxphp-5.5.3 -> HyperVM dies -> No mysql_connect() support
Update HyperVM to 2.1.0 -> HyperVM dies -> No mysqli_connect() support
Update both -> HyperVM Rocks!

Someone knows by hand if mysql and mysqli can be supported both in php
5.5.3?

Danny.





Otártics András

unread,
Sep 16, 2013, 4:24:29 AM9/16/13
to lxd...@googlegroups.com
Hi, 


 There is a way to support both. However, since php5, mysqli is advised and mysql is only maintained but not developed anymore.


András 

Danny Terweij | LxCenter

unread,
Sep 16, 2013, 9:30:20 AM9/16/13
to lxd...@googlegroups.com
Op 16-9-2013 10:24, Ot�rtics Andr�s schreef:
>
> Hi,
>
> http://dev.mysql.com/doc/refman/5.0/en/php-mysql-mysqli.html
>
> There is a way to support both. However, since php5, mysqli is
> advised and mysql is only maintained but not developed anymore.
>

Wow. Lets try that. It would solve problems :)

Danny.

JCR

unread,
Sep 16, 2013, 10:16:30 AM9/16/13
to lxd...@googlegroups.com

Le lundi 16 septembre 2013 15:30:20 Danny Terweij | LxCenter a écrit :

> Op 16-9-2013 10:24, Otártics András schreef:

> > Hi,

> >

> > http://dev.mysql.com/doc/refman/5.0/en/php-mysql-mysqli.html

> >

> > There is a way to support both. However, since php5, mysqli is

> >

> > advised and mysql is only maintained but not developed anymore.

>

> Wow. Lets try that. It would solve problems :)

>

> Danny.

 

Even better on new PHP builds, use MySQLND, which is a native driver, more performant than mysql and mysqli.

http://www.php.net/manual/en/book.mysqlnd.php

 

 

Danny Terweij | LxCenter

unread,
Sep 16, 2013, 10:37:09 AM9/16/13
to lxd...@googlegroups.com
Op 16-9-2013 16:16, JCR schreef:
Yes i did read about that. Lets focus first on mysqli and for backwards compatibility with mysql. If both supported then we dont have that much trouble with releasing the lxphp5.5.3 package to the public at CentOS 5 and CentOS 6 systems.
Then we can work at the native driver.

I do now change the HyperVM code to be mysqli. With debug mode "on" (commands.php) to see any errors (also fixed some php notices to be gone while on the road :) )

Regards,
Danny

Will

unread,
Sep 16, 2013, 8:13:25 PM9/16/13
to lxd...@googlegroups.com
In another project I switched everything from mysql to PDO mysql.  I think PDO is the way to go as it would make a switch to any DB very easy, including moving to sqlite.
 
-Will
--
You received this message because you are subscribed to the Google Groups "LxCenter Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lxdevel+u...@googlegroups.com.
To post to this group, send email to lxd...@googlegroups.com.
Visit this group at http://groups.google.com/group/lxdevel.
To view this discussion on the web visit https://groups.google.com/d/msgid/lxdevel/7a0bb5d6-923f-4a3c-82d5-5d6716fb1e9a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Otártics András

unread,
Sep 25, 2013, 2:39:05 PM9/25/13
to lxd...@googlegroups.com
Hi,
   what is the state and conclusion of this? 
  I did a dev-deploy and getting mysql deprecated warnings. Should I handle them?

Danny Terweij | LxCenter

unread,
Sep 25, 2013, 3:10:04 PM9/25/13
to lxd...@googlegroups.com
Op 25-9-2013 20:39, Ot�rtics Andr�s schreef:
No. I have changed everything to be mysqli and removed a lot other PHP
(5.5) errors.
It is not pushed yet to my fork as still testing local.

Ignore the warnings for now until i push and make a pull request :)

Danny.


> --
> You received this message because you are subscribed to the Google
> Groups "LxCenter Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lxdevel+u...@googlegroups.com.
> To post to this group, send email to lxd...@googlegroups.com.
> Visit this group at http://groups.google.com/group/lxdevel.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lxdevel/c2a0485f-cf88-429c-81bc-6383f5701de5%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages