I installed the 5.x-1.0 release and couldn't get the URL rewrite to work (it worked for some URL's, then it wouldn't and then it would, really strange). So I installed the 5.x-2.x-dev version. When I went to enable the gallery and gallery_menu modules, drupal died with Unexpected '=' when expecting ')' on line 218 of gallery_menu.module. I deleted the gallery_menu folder and everything started working again, but obviously no gallery_menu.

However I'm still having URL rewrite issues and I don't know if it's because of the configuration or not.
This URL works:
   http://www.xxxxx.xx/v/grad07/
However linked from that page, this one does not: (Error 500)
   http://www.xxxxx.xx/v/grad07/img_1037.jpg.html
The embedded gallery is at http://www.xxxxx.xx/gallery/ (So why don't those links have the /gallery/ in them?)
The standalone gallery is at http://www.xxxxx.xx/pictures/

For setup I followed the instructions here.

Comments

sewpafly’s picture

After further study, I'm not sure that it's the URL rewrite mechanism either. After deactivating that plugin in gallery, and testing the same images (since some work and some don't) it appears that even with the full path through drupal (i.e. ?q=gallery&g2_itemId=xxx) that I'm getting the same Error 500.

Any help would be appreciated.

neuron’s picture

I'm getting the same error. I don't know much about what I'm doing though, so I don't know how much help I can be. :P I installed Gallery 2.2 and it runs fine standalone.

As far as users are concerned, there is a single user on my Drupal site and a single user in the Gallery... I set up both with an identical name and password. Would that be problematic?

Let me know if you need additional info to help get it figured out. :)

profix898’s picture

  1. I guess you are using PHP4, right? The problem to gallery_menu.module with PHP4 should be fixed by now. Please update to the latest version.
  2. What webserver are you running on? Apache, IIS?
  3. Did you use the auto-configure option or did you enter the locations/pathes for you embedded gallery manually? What is the 'Embed URI' value set to?
sewpafly’s picture

Gallery appears to work perfectly in standalone mode.
I've disabled cleanURL's and the URLrewrite capability while troubleshooting this.

System Information:
Gallery version = 2.2.1 core 1.2.0.1
PHP version = 4.4.4 cgi
Webserver = Apache/1.3.33 (Unix)
Database = mysqlt 4.0.27-standard-log, lock.system=flock
Drupal = 5.1

Immediately after installing and whenever I try to enable the gallery_menu module drupal dies everywhere with: (For uninstall I completely removed the old gallery directory and extracted the new one to /modules/, is there something else I need to do to upgrade the old version 5.1x version of gallery?)
Parse error: parse error, unexpected '=', expecting ')' in /<path_to_drupal>/modules/gallery/gallery_menu/gallery_menu.module on line 219

After disabling the gallery_menu.module everything plays nice, but many things don't seem to work...

Doesn't work (or don't know if it's working):

  • Filters: ?q=admin/settings/gallery/filter - Page is completely blank
  • Report generator: ?q=admin/settings/gallery/report/download
    Parse error: parse error, unexpected '=', expecting ')' in /<path_to_drupal>/modules/gallery/gallery_report.inc on line 9
  • With this new version I don't see the code to change the auto-configuration and directory options anymore. (it was set to autoconfigure before) and the install tab still says "Auto-cofiguration OK" while the URI there is in a textbox but not editable and is the full http path to the standalone gallery (http://<site>/pictures/)
  • Directories work embedded, but pictures don't, (e.g. http://<site>/index.php?q=gallery&g2_itemId=101)

I would love to help track down these issues, but don't know where to start.

profix898’s picture

The new module has been developed using PHP5. Testing with PHP4 was sporadically only. I will switch my development environment to PHP4 and play with the module to find some version-specific flaws. Stay tuned.

profix898’s picture

Title: Install issues » Install issues with PHP4
neuron’s picture

Schwing!

After you mentioned that this issue might have to do with PHP4, I checked my host (1and1.com) and saw that they use PHP4 by default, but have PHP5 available. Here's what their FAQ said:

By default Apache uses PHP 4 for .php extension. If you don't want to rename all your
scripts to .php5 you can do the following:
Create a .htaccess file and place the following line AddType x-mapp-php5 .php in it.

This will tell Apache to use PHP 5 instead of PHP 4 for the extension .php in the
directory the .htaccess is placed and all sub-directories under it.

I followed those instructions and put the .htaccess file in the module folder, re-installed, and now everything seems to work! It is something of a workaround, but an easy fix. :) Hope it helps!

Regards,
~neuron

sewpafly’s picture

It worked!! Slight change to your directions however, I had to put the php5 directive in the drupal .htaccess file. Simply putting it in the modules directory didn't change anything.

Thanks for the help! Hopefully this won't mess with any other modules.

profix898’s picture

It is something of a workaround, but an easy fix.

I agree completely that forcing PHP5 is not a good solution. But its great to hear you got it working with this workaround. We are working on making the new module version PHP4 compatible, but actually there is some strange behaviour we must understand first to be able to fix it. Thanks for your patience.

profix898’s picture

My coding time is limited atm, but I added some fixes for php4 compatibility to the 5--2 branch. Not sure I got them all ;) If you have some spare time, please get the latest version and comment back with all php4 issues you discover ...
Now as we have all the targeted features implemented in the module, we can focus on stabilizing the branch. Any help would be greatly appreciated.

neuron’s picture

sewpafly, I wasn't clear earlier: I put the .htaccess file in the gallery module folder, not the overall modules folder. Sorry for the confusion! If I understand things correctly, that way only the gallery module should be affected.

profix898, I'll try out the new version tonight and see what happens- thanks for your help!

neuron’s picture

Update: newest version installed without problems for me- no need for the .htaccess PHP5 workaround. :)

sewpafly’s picture

Status: Active » Fixed

I'm still having the php4/5 issues, but it's working great with php5.

Anonymous’s picture

Status: Fixed » Closed (fixed)
Indemnity83’s picture

Just wanted to confirm that changing to php5 on the 5.x-1.0 release fixed the 500 errors for me.