The Lebkuchen Is Still In The Oven
Written by Harald Ponce de Leon on March 6, 2007The core roadmap entries for the 3.0 Alpha 4 release have been finalized today in trunk on the development repository. There is still some cleaning up to do and some tickets to still take care of, which means a public release of 3.0 Alpha 4 is just around the corner.
As most of the changes in the 3.0 Alpha 4 release are with framework improvements, the coolest feature that can be seen is the new Administrators Log section on the Administration Tool. This section displays all database modifications performed on the Administration Tool and can be used with a simple call to the database class:
$Query = $osC_Database->query('update :table_customers set customers_firstname = :customers_firstname where customers_id = :customers_id');
$Query->bindTable(':table_customers', TABLE_CUSTOMERS);
$Query->bindValue(':customers_firstname', 'Joe');
$Query->bindInt(':customers_id', 1);
$Query->setLogging('customers', 1);
$Query->execute();
The parameters passed to the setLogging() class method are the section of the Administration Tool the modification is occurring from (”customers” being the Customers section) and the ID of the database record (optional). The query above would log the old value of the customers first name and the new value in the administrators_log database table.
The Administrators Log feature is used together with the Administrators Access Levels implementation and serves to keep the store owner up to date with modifications other administrators have performed.
The output of the Administrators Log is currently rather raw and will be improved in later releases where modules can display the data in a more human readable format.
A movie presenting the Administrators Log feature will be posted in the coming days.
We are also now registered at the CIA site that displays the activity occurring on the development repository server. Commit changes are also now displayed in the development IRC chat room in real-time.
BSD Posix Bug In PHP 5.2.1
Written by Harald Ponce de Leon on February 28, 2007There’s a posix related bug in PHP 5.2.1 that affects BSD systems. The closest bug report is 40410 which was reported for 5.2.1 RC 4 and is marked as closed.
Although 40410 fixed a posix related compilation error, usage of the PHP function posix_getgrgid() in PHP 5.2.1 returns the following fatal error:
Fatal error: Out of memory (allocated 2097152) (tried to allocate -1 bytes) in /tmp/test.php
This was reported to Anthony Dovgal, who took care of 40410, and confirmed that this problem was fixed in 5.2.2-dev (php5.2-200702281330).
I came across this problem today while working on the Administration Tool -> Tools -> File Manager section, which uses the posix_getgrgid() function to display the group owner name of the files and directories. As Mac OS X is based on BSD, it also affected my development environment.
Restoring From A Backup
Written by Harald Ponce de Leon on February 28, 2007Some updates were backported today to the osCommerce 2.2 development branch regarding the Backup Manager section on the Administration Tool.
The problem that was addressed was that the contents of the sessions database table was being restored from an earlier state when the backup was made. This behaviour could introduce a conflict in session data when a database restoration would merge the session data if an earlier session ID is currently in use again.
The chances of this occurring would be rare and has been fixed so that the backup logic does not store the contents of the sessions database table in the sql dump, and the restoration logic clears the sessions table when an import is performed.
The changes here will be included in the next 2.2 Milestone 2 update package, and can be manually performed by reviewing commit r1274.
