Kohana & FastCGI routing problems

If you’re developing on Kohana framework and your server is setup with Apache and FastCGI, you’ll run into some weird trouble regarding URL processing. This is happening because Kohana’s Router class is not looking at the REQUEST_URI key in the $_SERVER global, and gets the PHP_SELF...

Migrating a Subversion (SVN) repository

Migrating a Subversion (SVN) repository
Recently I have a brand new stand-alone server for my repositories and other minor thingies. And the challenging thing: moving the repositories from my home desktop computer to this server. My setup was this: I have my home desktop computer that runs Windows XP, and the repositories were stored and managed...

Listing files in a directory with PHP

Listing the files in a directory in PHP is as simple as 1 line: $aList = scandir( '/tmp' ); print_r( $aList ); This will retrieve all the files in the specified directory (including “.” and “..”): Array ( [0] => . [1] => .. ...

Why should we use PHP constants inside classes

Why should we use PHP constants inside classes
constant A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script (except for magic constants, which aren’t actually constants). A constant is case-sensitive by default. By convention, constant identifiers are always...

CodeIgniter 1.6 + Rapyd library download

CodeIgniter 1.6 + Rapyd library download
When I need to develop a fast-growing, flexible and complex management application that needs to be done in a very short time, I use a CodeIgniter - Rapyd “bundle” that I’ve built to work, which can be turned into a really complex application. Actually, I’ve built a complex management...

CSS Menu Generator

CSS Menu Generator
cssmenumaker.com has quite a few ready-made CSS menus that just need to be copy-pasted in your site. You can choose from drop-down menu, horizontal or vertical menu style and after that, you just copy-paste the code, or you can customize your menu. Menus are usually compatible with Firefox, Internet...

APC - Alternative PHP Cache

APC - Alternative PHP Cache
APC is a simple and yet powerful PHP extension that does just that: caching. What for? Suppose you would have some piece of code that fetches some data from a table, and since you don’t use JOIN because you loose scalability, you’ll have to do some more SELECTs, and then format each row to...

Virtual Private Server alternative

Virtual Private Server alternative
Recently I’ve been looking for some way to get rid of the insane limitations, restrictions and all that stuff that you find on your everyday shared-hosting provider. Here’s what I’ve found… https://accounting.highspeedweb.net/whmcs/cart.php?a=add&pid=56 Good offer: NetRockVPS...

How to setup Eclipse + XAMPP + Zend Optimizer + Debugging

How to setup Eclipse + XAMPP + Zend Optimizer + Debugging
[ This is currently a draft. will format and finish later ] Eclipse all-in-one here: Zend debugger here: http://downloads.zend.com/pdt/server-debugger/ How to allow Zend Debugger and Zend Optimizer to co-exist: http://blog.tigeryao.com/2008/how-to-allow-zend-optimizer-and-zend-debugger-coexist.html XAMPP...

XML2Array

XML2Array
I’ve seen here the shortest xml2array implementation: function xml2array($xml) { $xmlary = array(); $reels = '/<(\w+)\s*([^\/>]*)\s*(?:\/>|>(.*)<\/\s*\\1\s*>)/s’; $reattrs = ‘/(\w+)=(?:”|\’)([^"\']*)(:?”|\’)/’; preg_match_all($reels, $xml,...

« Previous Entries