Posts
All the articles I've posted.
-
Office 2007 SpreadsheetML classes in PHP
In my evening hours, I've been working on a set of PHP classes to create Offixe 2007 SpreasheetML documents (.xlsx files). I finished my first goals (some basic XLSX writing), and I want to share this set of classes to the community. Currently, the following features are supported: Each cell supports the following data formats: string, number, formula, boolean. Visual formatting is not implemented, but I'll get to that later. An example of what can be achieved, can be found in this example XLSX file. A download of my class set can be found here. Class documentation is included.Please note that I am releasing this under GPL license.
-
Zend Framework custom route
Today, I was once again testing the Zed Framework. One of the things I was trying to do, is creating URL's in different languages. What I did was creating a controller 'user', with the action 'edit' (i.e. www.example.com/user/edit). Now, I want this to be available in Dutch too (i.e. www.example.com/gebruiker/bewerken). The trick is to add custom routes, which map back to the real controller and action. In my case, adding the following in my index.php did the job: Only bad thing is that you should add this for all your actions, otherwise not all routes succeed.Another important note is that routes are matched in reverse order. Make sure your most generic routes are defined first, and more specific routes last.
-
Bart Online
One of my former classmates, Bart Dekeersmaeker, has just created his own blog. He will be posting news from Chennai, India, where he currently resides for work. He is outsourced to KBC, and they asked him to go to India. Good luck on your mission, Bart!
-
Microsoft and Zend collaborate on PHP for Windows
A nice press release today at Microsoft: Microsoft and Zend Technologies Announce Technical Collaboration to Improve Interoperability of PHP on the Windows Server Platform. Both companies admit that PHP is often developed on Windows systems, but the final server environment is mostly *nix. With this collaboration, Microsoft and Zend will try to change that. The specific points of action in this collaboration: I think this is nice news! Looking forward to results of this collaboration...
-
Munin PHP based mod_security
Today, I discovered a nice PHP thing: Munin. This is a PHP version of Apache mod_security, allowing it to be run on IIS too. Munin performs rule based checks on HTTP headers, get and post data, ... The standard rule set disallows some things like path traversal and possible fopen() attacks. In addition to these rulesets, one should add some more for filtering out SQL injection attacks, cross-site script loading, ... These things should already be covered in your code, but an extra filter at the front door is always nice. You also get a nice control panel in which you can check rules that have matched and thus might indicate possible misuse of your website. You can also manage rules in this front-end.
-
PHP WSDL generator
Everyone who has ever created a webservice in PHP, using the PHP5 native functions, NuSOAP, PEAR, ..., certainly has cursed a lot while creating WSDL files for those services. Today, I found a nice helper class, Webservice Helper, which does a lot of tricks for you. Webservice helper creates the WSDL file for your service, and for related classes. Also, a basic authentication system is included. One necessary thing in your code is PHPdoc-style documentation. Webservice helper travels that documentation and uses reflection to generate class mappings. But normally, one should always document code.
-
Use Zend Framework on IIS
A while ago, I was experimenting with the Zend Framework. At first, I tried running a small sample on top of IIS, but unfortunately, that did not work... On Apache, it worked like a charm. Very nice, but what do you do when your site runs on an IIS machine? I started experimenting. First of all, I found out that Zend Framework also accepts URL's like http://localhost/index.php/controller/action/ as well as http://localhost/controller/action/. The first one is really handy! The only thing you have to do is to feed index.php the right query string and you're up and running. Changing all your URL's from /x/y to index.php/x/y should do the trick. But this does not look pretty in my browser. I don't want the index.php in between!
-
CruiseControl.NET configurator
For those looking for a CruiseControl.NET configuration tool: I just stumbled on this one at CodePlex
-
PHP on IIS7 (RC1), but unsafe!
Earlier this week, BillS has posted some information on how to run PHP on the upcoming IIS 7. To be honest, it's quite similar to installing it onto IIS 6 but with a few steps less. But I have a warning to add... PHP is added as an ISAPI extension, which binds to the multi-threaded IIS worker process. Unfortunately, not all PHP extensions are thread-safe... Registering the PHP as a CGI is better, but decreases performance. Use FastCGI! This technique can also be used on some Apache installations, but I still prefer IIS to do the job because it can run both PHP and ASP.NET. FastCGI recycles PHP processes and even persistent database connections! (mysql_pconnect etc.) Optionally, you can follow these steps for other extensions if you want PHP to execute on for example .php3 files.
-
Back from vacation!
I’m back from vacation! I went to Salou, Spain. Not to party or to find a new girlfriend every evening (I have one for almost 4 years now), but just for the sun and some vacation feeling after a year of work. The photo on the left was taken on the beach between Salou and Cambrils. Back to work now, be it a little more tanned than a week ago