Vikram's Web Archive


Since interestingness isn't a search option…

Fixed: “The URI you submitted has disallowed characters.” error CodeIgniter | DavidMichaelThompson

I started up a development project today after upgrading to snow leopard, and none of the codeigniter links worked. they all said “The URI you submitted has disallowed characters.” Why? This hadnt happened before, same project what changed?

Snow leopard upgraded my php dev environment to 5.3 from 5.2.6 And a few things have changed since then. Namely php bug #47229 “preg_quote should escape “-” (minus) as well” was fixed. (technically in 5.2.8) CodeIgniter checks uri for allowed characters to prevent some bad things. But the use preg_quote to convert the allowed list of character to something usable in a regular expression. Now the minus “-”, or I’d call it a dash (but I know there is a longer character for that) gets escaped in preg_quote with a backslash “\”. That cause the expression “a-z 0-9? to be converted to “a\-z 0\-9? which will not work in a regex.

Note we removed the preg_quote().  Now in your system/application/config/config.php file  look for line 126 (unless you’ve added a lot to you config will be around there somewhere)

Change the line

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';


$config['permitted_uri_chars'] = 'a-z 0-9~%\.\:_\-';

we’re now preparing our allowed character string in the config file and skipping preg_quote.  And that’s it.  Now your uri should work

via Fixed: “The URI you submitted has disallowed characters.” error CodeIgniter | DavidMichaelThompson.

No hibernation on Windows 7 when booting from VHD

Native VHD boot in this release does not support BitLocker, or hibernation which includes resuming from hibernate.

via No hibernation on Windows 7 when booting from VHD.

Windows File Junctions, Symbolic Links and Hard Links

Well a short cut is basically a file that points to another file. It is an antiquated, pointing system from the Windows 95 days. Shortcuts not only use up space on your hard drive, they also linger around after the item they are pointing to has been deleted and break if the item is renamed.

A symbolic link is like a short cut, but instead of being saved as a file, they are registered to the file system. This means they do not use hard disk space; all programs recognise and can read where the link is pointing to. A symbolic link can point to any file, folder either locally on the computer or over a network using a SMB path.

A file hard link and the directory junction are a little different. It not only points to the item but duplicates it, but does so without taking up the extra hard disk space required by a copied file. Also if you have a hard link pointing to a file then delete that original file, the hard link will still retain a copy. A limitation of the file hard link though is that the link can only be made on the same file partition as the file.

Finally a junction is a hard link for directories. To me they are the most useful and unlike file hard links, you can create junctions on different partitions to where the original folder is located. Again a junction is stored on the file system, does not take up space and is treated by the operating system and programs as a local folder.

Windows Vista/7 uses the command line program called mklink to create these symbolic links. It has 3 arguments and then requires both a link name and target.

How to have a blazing fast jailbroken phone

How to have a blazing fast jailbroken phone

[From: How to have a blazing fast jailbroken phone]

Keith Combs’ Blahg : Dual Boot from VHD Using Windows 7 and Windows Server 2008 R2

Boot from VHD is a new technique for installing and maintaining operating system environments. Unlike virtual machines, the operating system that is running from a “boot from VHD” environment is using the actual hardware instead of emulated hardware. This means a developer could easily use WPF and the full GPU processing power of a high end graphics card. In another scenario, this technology makes it easy to setup and run Windows Server 2008 R2 with the Hyper-V role, thus supporting 64 bit virtualization workloads.

The Virtual Hard Disk (VHD) is the container for the installed operating system. Because everything is inside a single file, there are a number of benefits that can be realized for data center server environments, as well as managed desktop environments. The following article dives into the technical details of implementing two operating systems. Both are installed in a VHD file and can easily be booted by selecting the preferred environment at power on. This could easily be scripted and automated.

Boot your machine with a blank hard drive using the Windows 7 DVD.
Click next on the language screen if English is appropriate.
SHIFT+F10 to launch a WinPE command console. Although the commands below are in upper case, the commands are not case sensitive. I am only using upper case for readability here.
Enter DISKPART to run the utility.
LIST DISK to see the available disks in your system. I am assuming a single raw disk.
SELECT VDISK FILE=c:\windows7rc.vhd
exit WinPE command console
Install to the newly created 200GB (fuzzy math) virtual hard disk which looks just like a partition to Windows Setup
Repeat steps 11-18 for the Windows Server 2008 R2 VHD but with the obvious changes for the vdisk filename, size, etc.

[From: Keith Combs’ Blahg : Dual Boot from VHD Using Windows 7 and Windows Server 2008 R2]

Change 7 or Vista’s ‘System’ partition / move BCD boot manager? – The NeoSmart Forums

bcdedit /store S:\Boot\BCD /set {9dea862c-5cdd-4e70-acc1-f32b344d4795} device partition=S:
bcdedit /store S:\Boot\BCD /set {b2721d73-1db4-4c62-bf78-c548a880142d} device partition=S:
bcdedit /store S:\Boot\BCD /set {466f5a88-0af2-4f76-9038-095b170dc21c} device partition=S:
bcdedit /store S:\Boot\BCD /enum all /v


select disk 0
select partition 4

First the system store is exported to S:,
then the references in that store file to partition D: are replaced by references to S:,
then the contents are printed out just for verification, just in case
then the boot sector was copied from DVD to S:
and finally DISKPART is used to mark the S: as active.

[From: Change Vista’s ‘System’ partition / move BCD boot manager? – The NeoSmart Forums]


Most Commented

< ?php get_mostcommented(); ?>

Photo Stream





Speaker for the Dead
To Kill a Mockingbird
Leviathan Wakes
Caliban's War
Revelation Space
Ender's Game
On Basilisk Station
Old Man's War
Shards of Honour
The Warrior's Apprentice
The Fall of Hyperion
The Rise of Endymion


Now Reading

Planned books:

Current books:

  • The Wisdom of Crowds

    The Wisdom of Crowds by James Surowiecki

Recent books:


View full Library