Colorbox is a jquery plugin. It can be found at http://colorpowered.com/colorbox/.
For a gallery, if the images are transfered through PHP, the path of the image would be like image.php?id=5
If the colorbox is loaded using a easy way like
$(document).ready(function(){
    $("a[rel='group1']").colorbox({transition:'fade', speed:500});
});
It will not work because the extension of image (.php) is not like a image extension.

When php-transfer-image and colorbox is used together, we should let the colorbox not check the filename.
Using it like this:
$(document).ready(function(){
    $("a[rel='group1']").colorbox({transition:'fade', speed:500, photo:true});
});
Tested and worked.