Find If PHP Extension is Loaded

Use extension_loaded() to test whether a given extension is already available or not. This works on both built-in extensions and dynamically loaded ones.
http://php.net/manual/en/function.extension-loaded.php

List of Loaded Extensions

print_r(get_loaded_extensions());

Function to Check if an extension id loaded

function is_loaded ($php_extension) {
	if (!extension_loaded($php_extension)) {
		echo $php_extension. ' is NOT loaded';
	}
	else {
		echo $php_extension. ' is loaded';
	}
}
is_loaded ('gd');

ldap_connect() is confusing

So why is this code returning “Success” no matter what?

// LDAP variables
$ldaphost = "sdfsdfs"; 
$ldapport = '389';                
// Connecting to LDAP
if (ldap_connect($ldaphost, $ldapport)){
echo 'Success';
}
else {
echo 'Failure';
}

From the PHP’s website:

Returns a positive LDAP link identifier on success, or FALSE on error. When OpenLDAP 2.x.x is used, ldap_connect() will always return a resource as it does not actually connect but just initializes the connecting parameters. The actual connect happens with the next calls to ldap_* funcs, usually with ldap_bind().
If no arguments are specified then the link identifier of the already opened link will be returned. 

This sentence above should be rewritten completely.

Reset git bare repo

After playing around with GIT, it is time to get serious. My intent is to revert my bare repo to the state its was before i started playing around with it. I kinda like git, but this thing has a million (actually a few dozens) set of commands some of them make sense others not really.
http://schacon.github.com/git/git.html

How do i reset my bare repo to its original state?

First check the log so you can grab the SHA1 of the original commit

git log

Note that you cannot do a “git reset sde4545e4” on a bare repo you will like get this error:
“fatal: mixed reset is not allowed in a bare repository”.

Second run the following command

git update-ref HEAD sde4545e4

Now there are still left over objects on the system. If you check the ./git/objects folder, you will see a whole bunch of directories there. You will need to get rid of them.

Third get rid of unwanted objects

git gc
git prune

Fatal error: Call to a member function execute() on a non-object in

“Fatal error: Call to a member function execute() on a non-object in”

I am not going to delve too much in trying to fix this since the solution was pretty straightforward in my case.

"MYSQL tables and Aliases are case sensitive in Most Linux Platforms"

http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

So if you develop in Microsoft Windows and Upload to a linux server, you will most likely run into this issue if you do not pay attention to case sensitivity.

This case sensitivity issues with mysql on a linux/unix platform can be turned on and off in my.ini.

lower_case_table_names=1 or lower_case_table_names=0