I have Gallery and Drupal working side by side and I want to combine them or intergrate them together. Its not until I access the modules section to enable mod_rewrite that the whole thing shuts down. I can't access anything. I've checked all over and have no clue as to how to fix this. I emailed help from my provider and he states that mod_rewrite is enabled but that I have to enable it on my side in my htaccess file. I'm clueless anyone have an idea on how to do this? Could this be causeing my problems?
Thanks
Tomas_g
Posts: 32509
what exactly happens? please post a link to your g2.
FAQ: Images don't show up and the album / photo links don't work, what can I do?
Posts: 10
Well I have no problem setting the G2 up. It works seperate to the Drupal site. I want to intergrate it so that it looks like its part of the site. I get to the point where I am installing mod_rewrite. I run the test and it states it's a success. on the Apache server but after some consultation with the help staff they say that it is enabled on the server. I enable the module and then I get this warning. http://www.stiggys.ca/gallery2/. The whole thing just stops. After reading all the help on it I am under the impression that you need mod_rewrite to get the gallery to intergrate with Drupal. I don't have clean urls though and am not sure if this is a problem. I also get this warning on the website. "Unable to initialize embedded Gallery". I followed the directions as best as I could in installing it and only have the problem when I try to install the mod_rewrite module. I did an experiment where I copied the htaccess file into my root directory and I got the same server error. They are asking some of the more experienced guys for advice. Here is info from my htaccess file if it helps.
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
Options +FollowSymlinks On
RewriteEngine On
RewriteBase /gallery2/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . - [L]
RewriteCond %{THE_REQUEST} \ /gallery2/admin/(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . /gallery2/main.php?g2_view=core.SiteAdmin [QSA,L]
RewriteCond %{THE_REQUEST} \ /gallery2/v/(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . /gallery2/main.php?g2_view=core.ShowItem [QSA,L]
RewriteCond %{THE_REQUEST} \ /gallery2/d/([0-9]+)-([0-9]+)/([^\/]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . /gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2 [QSA,L]
RewriteCond %{THE_REQUEST} \ /gallery2/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . /gallery2/main.php?g2_view=core.ShowItem&g2_path=%1 [QSA,L]
</IfModule>
# END Url Rewrite section
Tomas
Posts: 10
I also tried a blank .htaccess file just to see what would happen and my gallery comes up but when I go to access the admin section it says this...
The requested URL /gallery2/admin/ was not found on this server.
I think its the htaccess file that is stopping the site from loading but I can't find any info on what to change to get it going!
Tomas
Posts: 10
I can't logout either.
Not Found
The requested URL /gallery2/v/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at stiggys.ca Port 80
Posts: 10
I chomd the htaccess file to 777 and I also tried to upload a photo and delete it and I get this error! Boy I'm just having one of those days!
Error Detail -
Error (ERROR_PERMISSION_DENIED) : Don't have permission to delete this item
* in modules/core/ItemDelete.inc at line 74 (gallerystatus::error)
* in main.php at line 174 (itemdeletecontroller::handlerequest)
* in main.php at line 87
* in main.php at line 80
System Information
Gallery version 2.0.1
PHP version 4.3.4 cgi
Webserver Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d VDB/1.1.1
Database mysql 4.0.24_Debian-10
Toolkits ImageMagick, Gd
Operating system Linux coconia.net 2.6.8-2-686-smp #1 SMP Thu May 19 17:27:55 JST 2005 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Posts: 32509
- i don't think you need to activate url rewrite to make it work in drupal.
- and if you activate url rewrite, then do it when accessign g2 when it is already embedded. don't access g2 in standalone to activate / configure the rewrite module.
Posts: 32509
and if rewrite doesn't work in standalone, forget the rewrite module and deactivate it (see my faq link).
the error permission denied is also explained in the faq link.
Posts: 10
Thanks that fixed the problem of having to install my whole gallery program again. I still get "Unable to initialize embedded Gallery" though on every Drupal page. Could it be the Drupal module? I followed the directions exactly to try and embed it into Drupal but no luck. Are there modules that might conflict with Gallery like the image.module etc. That might be why it won't embed because something is already there?
Tomas
Posts: 10
I get this in the error log
Unable to initialize embedded Gallery
Error (ERROR_MISSING_OBJECT)
* in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 179 (gallerystatus::error)
* in modules/core/classes/GalleryCoreApi.class at line 506 (galleryuserhelper_medium::fetchuserbyusername)
* in /home/www/stiggys.ca/modules/gallery.module at line 345 (gallerycoreapi::fetchuserbyusername)
* in /home/www/stiggys.ca/modules/gallery.module at line 183
* in ??? at line 0
* in /home/www/stiggys.ca/includes/module.inc at line 182
* in /home/www/stiggys.ca/modules/block.module at line 502
* in ??? at line 0
* in /home/www/stiggys.ca/includes/module.inc at line 182
* in /home/www/stiggys.ca/includes/theme.inc at line 864
* in ??? at line 0
* in /home/www/stiggys.ca/includes/theme.inc at line 194
* in /home/www/stiggys.ca/themes/engines/xtemplate/xtemplate.engine at line 190
* in ??? at line 0
* in /home/www/stiggys.ca/includes/theme.inc at line 190
* in /home/www/stiggys.ca/modules/node.module at line 1727
* in ??? at line 0
* in /home/www/stiggys.ca/includes/menu.inc at line 354
* in /home/www/stiggys.ca/index.php at line 18
Posts: 10
This was in the install file that came with the Drupal module
Note: To get the rewrite module working, you need to first configure and
use it with the standalone Gallery2 install. Once it's working there ***disable
all*** the rules except for the 'Show Item' rule and set its URL pattern to:
gallery/%path%
Then when you browse to http://your.site/gallery you should see short urls
inside drupal.
Troubleshooting
---------------
See http://codex.gallery2.org/index.php/Gallery2:How_to_Embed_Gallery2_in_Drupal
NOTE: this is beta software, so it might not always work. If you have
questions or problems contact:
James Walker <walkah@walkah.net>
Posts: 189
tomas_g - the gallerycoreapi::fetchuserbyusername error that you mention above has a fix here: http://drupal.org/node/35126
Posts: 10
Crap I haven't figured out how to do use patches yet!
Tomas
Posts: 10
Could I just add one that is the same as my Drupal admin and then delete the one I did in Gallery2?
Posts: 189
Yes -- that's probably best anyway. Make sure the user you add in G2 is a Site Admin.
If you look at the patch file you'll see that it is a one line (2 character) change so you can add it manually.