Databases5.8.13-RELEASE: TDS, seekable result sets, REST finishingat 2013-04-13 in Releases, PHP5, Databases, Announcements, 5.8-SERIES by friebeThe XP group is proud to announce the immediate availability of the XP Framework release 5.8.13. This release's highlights are:
This release also contains a workaround for the behaviour changes introduced into PHP in the course of fixing PHP Bug 64370, which has been released by the PHP group in both PHP 5.4.14 and PHP 5.3.24. The details are explained here. You can grab a release as follows: $ cd ~/xp Supports all PHP versions between PHP 5.2.10 - PHP 5.4.14. Sybase / MSSQL support via userland driverat 2012-10-11 in Databases by friebeLast year, in December, we announced the initial availability of a TDS protocol implementation written in PHP userland source code. TDS is used for connectivity with Microsoft SQL Server (version 7) and Sybase (version 5) database servers. At that time, it was not fully functional, and thus only merged to a so-called incubator branch. Development has continued since, and with more than one hundred integration tests successfully running against all of ASE 15/Sun, ASE 12.5/Linux and ASE 15/Windows, as well as SQL Server 2010 for Windows, we feel confident enough to begin including it in our release branch as of XP 5.8.9. Please note that these drivers will not be used by default if a PHP extension is in use! If you have such an extension (for example, ext/sybase_ct) loaded, follow the instructions from our blog "explicitely selecting drivers in DriverManager". RFC #0259: Multiple resultsetsat 2012-10-06 in Databases, RFCs by friebeScope of Change Multiple result set support will be added to database connections. Rationale Handle multiple results instead of silently discarding them - e.g. to enable writing generic database clients. Read the full RFC here 5.8.4-RELEASE: Multiple config sources, selectable database drivers, SQLite3, MySQL local sockets, mocking libraryat 2012-02-26 in Releases, Unittests, Databases, Announcements, 5.8-SERIES by friebeThe XP group is proud to announce the immediate availability of framework release 5.8.4. After four release candidates and about three and a half months, we deliver a bigger release, including the following: Multiple config sources This feature described in RFC #0221 enables combining properties from more than one source (e.g., ini-files). For example, one can now have a global, system-wide configuration and extend on that in your application. This feature is supported by "XPCLI" commands and the web runner - details can be found here. Selectable database drivers With more and more database protocols appearing as userland implementation (MySQL, Sybase, MSSQL), the urge to be able to chose between drivers has come up; and be it just for testing. To select a specific driver, append the implementation name to the driver, e.g. mysql+std to select ext/mysql. To retrieve the default MySQL driver, one can still use mysql://user@host DSN syntax. SQLite3 With the deprecation of SQLIte2 in PHP 5.4, we have decided to implement SQLIte3 support in the XP Framework. At the same time, and because we now offer selectable drivers, the default is SQLIte3. MySQL local sockets We now support local socket connectivity in our MySQL driver implementation by using the special hostname ".": By using "mysql://./DATABASE", we connect through a local socket, while "mysql://localhost/DATABASE" uses TCP/IP. This has been unified throughout the various MySQL drivers. Mocking library The package unittest.mock contains the all-new mocking library. The API is modeled in a fashion similar to EasyMock (Java), Rhino Mocks (.Net). You can read all about the details in RFC #219. ...and more We have almost 20 bugfixes and various features included in this release - all of which can be seen in the ChangeLog. Go get it! $ cd ~/xp Enjoy Heads up: Using local sockets to connect to MySQLat 2012-01-08 in Announcements, Databases by friebe MySQL allows running MySQL servers with disabled networking. This is suggested as security measure if the application and the database server run on the same machine, but in reality we usually don't have this kind of a setup except on the developers' machines. This is where we hit an inconsistency in our userland MySQL driver "mysqlx": It wasn't connecting to the MySQL server on localhost, where the standard MySQL driver was. This has been fixed in the meantime.Some research into this topic revealed the following:
Especially the last part is a bit frustrating, because it's magic, and magic behaviour is never good in software. This is why the XP group has decided to be inconsistent with the MySQL libraries and not support this in mysqlx. Furthermore, we have decided to remove the magic from the standard MySQL driver implementations in order to be consistent. Instead, use the dot (.) as a notation for "this machine", as seen in the following examples: // Connect to the MySQL server on this machine via local sockets.In contrast, this will now always use TCP/IP: $conn= DriverManager::getConnection('mysql://localhost/NEWS'); Support for SQLite3 / SQLite2 deprecationat 2012-01-06 in Announcements, Databases by friebeWith pull request #104 implemented the XP Framework now supports SQLite v3 databases via PHP's sqlite3 extension. To acquire a "connection" to an SQLite database, use "." as the hostname and supply the filename where you usually put the database in the DSN string: $conn= DriverManager::getConnection('sqlite://./test.db?autoconnect=1'); Note: At the same time, the sqlite scheme was changed to default to this new implementation instead of the older SQLite version 2, which will be deprecated in PHP 5.4. To stick with the old implementation, use sqlite+std as scheme to forcefully select the old driver. If you want to be forward-compatible, you may upgrade existing SQLite files as follows: sqlite old.db .dump | sqlite3 new.db. Explicitely selecting drivers in DriverManagerat 2011-12-30 in Databases by friebeIn a recent discussion in the XP Framework's issue tracker, the topic was brought up that the database connectivity layer was preferring the userland MySQL implementation over PHP's builtin-MySQL support. This change occurs in PHP versions using the mysqlnd implementation (default as of PHP 5.3.0) and was causing productive applications to malfunction. While the change in the XP Framework was made due to the fact that mysqlnd doesn't support older MySQL versions, matching our BC strategy, and there should've been more testing before deploying upgraded versions of both PHP and the XP Framework, it's still undesirable that there's no easy way "back". (more) TDS Protocol implementationat 2011-12-23 in PHP5, Editorial, Databases by friebeOne of the XP Framework's strategies is to keep compatibility over a large number of PHP versions on multiple platforms. For example, the message digest API contains a workaround for certain PHP versions with a broken CRC32b implementation, hiding it transparently from the user. In other places like the lang.Process class, we take care of platform differences, employing OS and feature detection, and even compensating for some implementation vagaries. Constructs like this can be found in various other places in our code base, and while this is definitely not desirable, it at least saves the user from going through this hell, and this way, we support the full range of PHP 5.2.10 through 5.3.8 (inofficially 5.2.0 - 5.5.0-dev also works) on a variety of Windows and Un*x systems. Following this strategy, we go as far as rewriting functionality previously available through a PHP extension to userland implementations: The FTP API (because of limitations in streaming support), the parse_url() function rewrite to work around behaviour changes, userland ini file parsing to support Unicode, a reimplemented MD5-crypt to compensate for a critical bug in crypt() in PHP 5.3.7 and our own MySQL protocol implementation to be able to support old MySQL 4.x instances, to name only a few cases. The TDS protocol implementation supporting connectivity with Microsoft SQL Server and Sybase database servers is the most recent addition to this stack. Though not yet completely finished, we expect to be able to add it to one of the upcoming 5.8 releases. 5.8.1-RELEASE: Command line, chains, testing and MySQLxat 2011-03-14 in Announcements, Databases, Unittests, Releases by friebeThe XP group would like to announce the immediate availability of XP, version 5.8.1. This release includes a bigger change to the exception mechanism, lang.ChainedException's functionality has been moved to the base class lang.Throwable and all exceptions may now optionally have a cause. This is consistent with Java (since 1.4, java.lang.Throwable has getCause() and corresponding constructors), C#'s InnerException and PHP's "previous" exception (available since 5.3.0). Other bigger changes are now that MySQL connectivity is provided by a userland driver implementation in certain cases - see Heads up: XP Framework and MySQL for further details. Also noteable are the possibility to run a single test method from the command line as well as the command line reflection improvements. For a full list of changes and to download the release, visit: http://releases.xp-framework.net/xml/release?5.8.1 Heads up: XP Framework and MySQLat 2011-01-16 in Databases, Announcements by friebe The XP Framework's native MySQL driver, rdbms.mysqlx.MySqlxConnection has been committed to SVN head and will now snap into place in two cases:
The reasoning behind the second is that mysqlnd has severe problems, not being able to connect to any of MySQL 4.1+ using the old authentication, MySQL 3.x or MySQL 4.0 servers. |
|