Author Archive
PHP 5.2.0 Compatibility
Written by Harald Ponce de Leon on November 6, 2006 – 4:46 pm -PHP 5.2.0 was recently released which “includes a large number of new features, bug fixes and security enhancements” to the PHP 5.x series. The PHP Group also published an upgrade guide for existing PHP 5 users that documents the (incompatibility) changes the new release brings.
osCommerce 2.2 Milestone 2 Update 060817 works fine with PHP 5.2.0 (with register_globals and register_long_arrays enabled).
There is however one change that 5.2.0 brings in that causes osCommerce 3.0 Alpha 3 to produce a PHP FATAL error in the sessions implementation, specifically when the session data is stored in the database (by default for osCommerce 3.0).
This is due to a change in session_set_save_handler() where the “write” and “close” handlers are called after objects have been destructed.
As the sessions implementation in osCommerce 3.0 is done in a class/object, writing session data and closing the session are no longer possible as the registered object would be destructed and no longer exist to perform those duties.
The proper solution here is to use session_write_close() in the destructor of the osC_Session class:
class osC_Session {
...
function __destruct() {
session_write_close();
}
}
As __destruct() is a PHP 5 feature only, an alternative solution is needed for PHP 4 compatibility (the minimum requirement for osCommerce 3.0 will be PHP 4.1), and that is to register session_write_close() as a shutdown function:
session_set_save_handler(array(&$this, '_open'),
array(&$this, '_close'),
array(&$this, '_read'),
array(&$this, '_write'),
array(&$this, '_destroy'),
array(&$this, '_gc'));
register_shutdown_function('session_write_close');
This has already been reported at our new Issue Tracker and has been fixed at r1107.
Referencing Tickets With Commit Logs
Written by Harald Ponce de Leon on November 3, 2006 – 2:51 pm -The Commit Policy for developers has been updated to describe the process of referencing tickets on Jira when the changes involved solve that ticket.
http://svn.oscommerce.com/confluence/x/JQ
When viewing a ticket on Jira, the referenced commit changes will be automatically shown under the “Fisheye” tab where the comments are shown.
The Repository Browser (Fisheye) also automatically links to the tickets when referenced in the commit log.
Arriva! Arriva!
Written by Harald Ponce de Leon on November 2, 2006 – 8:05 pm -The Trac solution on the Development Site that was responsible for the wiki, tickets, and repository browser has been replaced due to the persistent problems it had on the server. The Development Site is now running on 3 new “enterprise-class” solutions that provide more features and flexibility in fostering the developer community.
The solutions now taking care of the wiki, tickets, and repository browser are:
- Confluence (Wiki)
- Jira (Tickets)
- Fisheye (Repository Browser)
Each can be easily reached at:
The contents of the previous Trac installation have been migrated over to the new wiki and ticket sites. Please note that the accounts created previously for Trac are no longer used, and that a new account has to be created on Jira if tickets are to be submitted or tracked. Please also be sure to replace your Trac RSS subscription feeds to the new feeds each solution provides.
A hardware upgrade of more memory is also pending due to the extra resources the solutions place on the server. These are Java based solutions running on 2 Tomcat application servers; one for Confluence and Jira, and one for Fisheye (which currently requires its own application server), and are being served by the Apache webserver.
The Apache webserver has been tuned due to it basically acting as a proxy server. It was infact about to be replaced by lighttpd but realized that Apache is still needed due to the subversion repository. I am personally still interested in seeing what benefits lighttpd can bring in this setup and will look into it again in the coming weeks.
With the new Wiki site now live and running we are also contemplating moving the content from the Knowledge Base site over to it. Due to the content on the Knowledge Base site being based on current development versions, moving it over to the Development Site will make it a perfect fit where all development related work can be found on the one site. This would then leave the oscommerce.info domain serving static documentation that is produced by the Wiki site for the stable releases.
A change to the Tickets site has also been performed where it will be possible to submit tickets regarding language definitions and developer branches. This has been started on the languages with the developers that have already created user accounts on Jira, and will include the other developers as soon as their accounts have been created. The benefit here is submitting a ticket in a specific category will automatically assign it to the developer working on the job.
The Repository Browser (Fisheye) is also a radical change compared to Trac and will take a few mouse clicks understanding how it works.
It’s fun looking at graphical representations of the amount of lines in the codebase with Fisheye. Additional statistical information regarding the development repository can be found at Ohloh:
http://next.ohloh.net/projects/3341
It’s currently only measuring /trunk/oscommerce and will look at updating it to /trunk/ to also include the languages being worked on.
Overall I’m very impressed with the new Development Site and therefore thank Atlassian (Jira, Confluence) and Cenqua (Fisheye) for making it possible by supplying free licenses to the solutions for Open Source projects
Other changes in our network infrastructure have also occurred the past week where the database server for the Community Support Forums was upgraded. A new faster dedicated server is also being currently prepared to move the German Community Support Forums over to from its current dedicated server. The total number of servers running the osCommerce Network of Support Sites is 5 dedicated servers, in addition Sunsite.dk and SourceForge who mirror the downloads for project releases and contribution files.
Some interesting facts I hope ![]()
