If you want to install special PHP-scripts that need a PHP-library like GD, comment out this line in your php.ini:
extension_dir = ./
Take care that it is the right php.ini for the domain. Restart your Apache after the change and it should work.