Hacker News new | ask | show | jobs
by g4m8i7 4606 days ago
A lot of the big distros have transitioned to MariaDB already (https://mariadb.com/kb/en/distributions-which-include-mariad...). Debian probably will soon as well, which will trickle down into Ubuntu probably.

I think there's plenty of room outside Oracle if they were to ever shut down MySQL. I moved to MariaDB, and it really was a drop-in replacement.

1 comments

TL;DR: It's 100% binary compatible, but PHP manages to have problems anyway

/facepalm

I think it's only a problem if you're using mysql_ instead of mysqli_.

https://mariadb.com/kb/en/installation-issues-with-php5/

Since mysql_ is being deprecated soon (so they say, maybe PHP6 haha), it'd be good to migrate to mysqli_ anyway.

Shouldn't everyone be on PDO by now? If you're still on mysql[i]_ you must be used to having problems.
Should be, absolutely.

Are, nope.

PHP's long-lived popularity means there's a huge amount of ancient PHP articles and tutorials still out there on the web that use the old library. Because these articles are both old and widely linked-to, they tend to come up when newbies search for PHP help. So they learn how to do things the wrong/deprecated way.

Resources like PHP the Right Way (http://www.phptherightway.com/) help counter this, but it'll continue to be a problem as long as using the old library doesn't cause any obvious problems like immediate crashes, screaming in-your-face error messages, etc.

I maintain an early 2000's php website that is pretty functional and has a lot of features, but uses the classic spaghetti code. I can't exactly just switch to PDO without considerable time investment, and otherwise things are working just fine. I don't think this is an uncommon scenario.
I converted an OSS application that I wrote back in '03 to PDO in just a few hours. It actually helped me find security holes because of strong typing in bound parameters. Have a go!
Probably. I'm a pretty poor developer. I'm a sysadmin who sometimes writes PHP apps for work. So, I'll look into PDO. :D
lmm: (For some reason your post doesn't have a reply link) These are usually webapps for department-specific needs, and I generally find PHP to be easier. I have a few python things that I use on the backend, as well as a plethora of bash scripts. But, I admit to knowing PHP more than Python. (I'm in a smallish company, so I end up wearing a lot of hats)

generalpf: I will do so! Do you have any go-to references that you prefer? Or shall I just dig through the PHP docs?

Definitely recommended! It will also help you when you swap out MySQL for something else later on... little to no rework!
If you've got the time, try writing one in python and see what you think.
More details: https://mariadb.com/kb/en/installation-issues-with-php5/ It's apparently not an issue with 5.4+ and has several fairly simple workarounds.