After a long struglling of 3 days , i finished gallery 2 integration with drupal.
Here is the details
Software used :
DRUPAL 6.4 ,GALLERY 6.x-1.x-dev(DRUPAL MODULE), GALLERY gallery-2.3-rc-1
STEPS TO FOLLOW :
Create a folder gallery2 inside drupal.
Install your Gallery 2 inside that folder.
Access the gallery using url eg: www.xxx.com/gallery2 and install it make sure you enabled url rewrite plugin.
Copy the galery module of drupal inside sites/all/modules and enable it.
Access the gallery setings inside the drupal navigation menu.
Use the manual configuration and set as follows:
Gallery2 URL or URI: /gallery2/
Gallery2 filesystem path: ./gallery2/
Embed URI: /index.php?q=gallery
Gallery base: gallery
Finish it and access URL Rewrite Administration ,you can access it by clicking on gallery on drupal navigation > site admin > Url rewrite
inside setup you can see Embedded Setup .it will show below the Allow empty referer? . You must access the side admin of gallery from drupal to see the embeded setup.
Absolute path to the folder of your embedded .htaccess: /var/www/drupal
Please enter the Url to your environment. E.g. http://www.mySite.com/myNiceCMS/ : /(a slash usually refer to drupal directory).
Make sure the htaccess file (inside drupal folder have a write permission you can set it to 666 or 777).