So, we have been building up our code library at dealnews for 9 years. It was started at the end of PHP3 and the beginning of PHP4. So, we did not have autoloading, static functions, and all that jazz. Classes had lots of overhead in early PHP4 so we started down a pure procedural road in 2000. And for a long time, it was very maintainable. We had 2 or 3 developers for most of this time. We now have 5 or 6 depending on whether we have contractors. There are starting to be too many files and too many functions. We find ourselves adding new files when some new function is created instead of adding it to an existing file because we don't want to have huge files with 100 functions in them. File names and function names are getting longer and more ambiguous. For example, we have a file called url_functions.php. It contains functions to generate URLs for different types of pages on the site, functions to …
[Read more]Installing Apache2 With PHP5 And MySQL Support On Mandriva 2009.1 (LAMP)
LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a Mandriva 2009.1 server with PHP5 support (mod_php) and MySQL support.
As a developer you’re probably using a versioning control system,
like subversion or git, to safeguard your data. Advantages of
using a VCS are that you can walk to the individual changes for a
document, see who made each change and revert back to specific
revision if needed. These are features which would also be nice
for data stored in a database. With the use of triggers we can implement versioning for data
stored in a MySQL db.
The revisioning table
We will not store the different versions of the records in the
original table. We want this solution to be in the database layer
instead of putting all the logic in the application layer.
Instead we’ll create a new table, which stores all the different
versions and lives next to the original table, which only
contains the current version of each record. This revisioning
table …
Installing Apache2 With PHP5 And MySQL Support On Fedora 11 (LAMP)
LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a Fedora 11 server with PHP5 support (mod_php) and MySQL support.
Monitoring a replication is an important aspect. As replication includes multiple nodes, it is essential to track activity and status across all mysql servers involved in replication. To monitor replication…
The post Monitor multiple mysql replication using php: Updated first appeared on Change Is Inevitable.
As eWeek reports, the EC handed down a formal objection to the Oracle-Sun deal. To quote the article:
The regulators see a major conflict of interest in the world's largest commercial database company owning its largest open source competitor.
Oracle responded with a statement yesterday. To quote from it:
It is well understood by those knowledgeable about open source software that because MySQL is open source, it cannot be controlled by anyone.
Yes, thank God that true Open Source (as we knew it 10 years ago) can't be controlled by anyone and everybody has the right to fork the software (as has already been done by forking into Drizzle or …
[Read more]The New York Times posted an article called "Decision on Oracle a Test for Kroes" where they cite me with a suggestion what should be done when allowing the merger - splitting off MySQL from Sun/Oracle.
I had some tweets about the situation and briefly chatted with Florian Müller whom everybody should know from 2004's anti software patent EU campaign and who is acting as a formal advisor in the current EU observation regarding the deal. I believe in Open Source being "free as in freedom". In the last months I haven't heard anything from Oracle itself regarding its future plans for MySQL. And when I read this article ("Oracle …
[Read more]
In the article ‘An alternative way of EAV modelling’,
I discussed how to do EAV modelling by casting all values (except
text) to integers. I’ll continue on that and talk about more
advanced topics like multi-value fields.
As binary set
Not all questions have only a single option. Some fields we want
to represent by radio-buttons, allow the user to select any
number of options. For this we can mimic the behaviour of the SET
field type of MySQL. A SET is almost similar to an ENUM, except
that each bit represents an option. The value can have multiple
bits enabled to represent multiple options.
Example: field options for field ‘programming language’
+-------+-------------+ | value | description | +-------+-------------+ | 1 | C/C++ | | 2 | PHP | | 4 | Java | | 8 …[Read more]
I’ve released version 1.1.4 of my improved Cacti templates. Unlike the prior release, which was solely bug fixes, this one includes new graphs in the MySQL template. Some of the graphs are of data that’s exposed in standard MySQL versions, but some of it is available only in Percona’s high-performance builds of the MySQL database server. If you don’t have a Percona build, those graphs will just contain nothing, but there is no detrimental effect.
This template release is fully backwards compatible with the previous release. The upgrade process is to copy the new PHP file into place and import the new template file. You can then add the new graphs to your hosts.
I’ve also taken the opportunity to address many of the other open issues. Most of these were minor, such as a debug …
[Read more]Lukas is making another attempt at jumpstarting PDO development. I welcome this effort, and will do what I can to help fill in details and make suggestions. Unfortunately, I'm just way too busy with work to be able to commit to more than that.
I also wanted to share some of my thoughts on why PDO has been in a holding pattern for a while, so that more people are aware of it and can work to avoid repeating the same mistakes.
The first thing to note is that the guts of PDO were hard to develop. The PHP script facing API sounds simple enough, but the underlying libraries for each different databases work in different ways, and it was and is a challenge to build PDO in such a way that it can work in the most efficient way.
The second thing, which is really a follow-on from the first, is that the database libraries are complex and nuanced. …
[Read more]