A+ | A - | RESET
Fixed | Wide | Full | Reset

Capture360.Net

Cover Every Angle

  Advanced search
Welcome, Guest. Please login or register.
Did you miss your activation email?
10:00 GMT - Thu 25 Apr 24

Login with username, password and session length
Pages: 1 2 [All]
Author Topic: error when trying to configure gallery2 module  (Read 15688 times)
0 Members and Guests are viewing this topic.
stevenyuko
Conscript
*******
Posts: 8


« at: 14:10 GMT - Tue 06 Nov 12 »

Hello, I have uploaded all files to both the drupal and the gallery 2 module and root folders.   I'm getting the following error when I actually try to configure the gallery2 portion.

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, cgiadmin@yourhostingaccount. com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Gallery 2 allowed to install the module but won't let me configure it.  is there a way to by pass the configure button and just enter the required information directly into the code? or do you have a possible fix as to why I'm getting the above error when trying to config.   

Using Drupal 7. 15 and Galary 2. 3. 1
Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #1 at: 07:57 GMT - Wed 07 Nov 12 »

Can you try again and post the output from your server log?
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #2 at: 12:22 GMT - Sat 17 Nov 12 »

Tried Again and still can't configure the gallery plugin portion.    Not sure which server logs you want?  access logs maybe?  I checked my cgi server logs and there are no errors.  it was empty.   I did notice that even though I downloaded 0. 9. 2 once I install the module this is what shows in gallery (notice the 0. 9. 1?):  I have Gallary 2. 3. 1 install with a drupal 7. 15 installed.

"G2Drupal

0. 9. 1

0. 9. 1

G2<->Drupal Bridge

configure | uninstall | delete "

Gallery URL = hxxp: www.  scabattlerock.  com/gallery2/main.  php
Gallery version = 2.  3.  1 core 1.  3.  0.  1
API = Core 7.  54, Module 3.  9, Theme 2.  6, Embed 1.  5
PHP version = 5.  2.  17 cgi
Webserver = Apache/2
Database = mysqli 5.  0.  91-log, lock.  system=flock
Toolkits =
Acceleration = none, none
Operating system = Linux cgi0103.  int.  bizland.  net 3.  0.  9-bl3-grsec #9 SMP Thu Feb 2 08:22:02 EST 2012 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.  0 (compatible; MSIE 9.  0; Windows NT 6.  1; WOW64; Trident/5.  0)
Rows in GalleryAccessMap table = 6
Rows in GalleryAccessSubscriberMap table = 1
Rows in GalleryUser table = 2
Rows in GalleryItem table = 1
Rows in GalleryAlbumItem table = 1
Rows in GalleryCacheMap table = 0
« Last Edit: 13:06 GMT - Sat 17 Nov 12 by stevenyuko » Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #3 at: 12:52 GMT - Sat 17 Nov 12 »

Subscribe to the announcement thread to be informed when a new version that resolves this issue is posted.

Alternatively, you can refer to this post for a fix: http://capture360.net/g2drupal/drupal-menu/msg804/
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #4 at: 13:54 GMT - Sat 17 Nov 12 »

tried to do a global replace like he had mentioned but didn't change anything.  got the same debug error before and after.

debugging did give the same error.  .  .  .  .   I think. 

"Fatal error: Call to undefined method G2DrupalUtils::Is_Empty() in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/AdminG2Drupal.  inc on line 461"
« Last Edit: 14:16 GMT - Sat 17 Nov 12 by stevenyuko » Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #5 at: 21:35 GMT - Sat 17 Nov 12 »

To fix:

1. Open the AdminG2Drupal.inc file in gallery2/modules/g2drupal using notepad or similar.
2. Find and replace every instance of "Is_Empty" with "isEmpty"
 
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #6 at: 00:29 GMT - Sun 18 Nov 12 »

Ok.  finally was able to get it to go active. .  the problem I'm having now is that gallary doesn't show up in my drupal.  it just opens up a new gallary page.   Its not integrating into drupal.
« Last Edit: 00:47 GMT - Sun 18 Nov 12 by stevenyuko » Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #7 at: 10:19 GMT - Sun 18 Nov 12 »

Refer again to the other post previously linked to.

If it is not integrating, you have not set it up properly (I.E., missed out a step in the process).
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #8 at: 13:48 GMT - Sun 18 Nov 12 »

Here you go.  .   tell me what I'm missing because I've gone through the steps.  .  .   gone through them again.   and gone through them a 3rd time just to make sure.    Everything is in order and still getting errors. 


drupal install:
Document Root: /home/users/web/b2277/scabattlerock

Gallery2 install:
Document Root: /home/users/web/b2277/scabattlerock/gallery2/

adjusted menu links to hxxp: www.  scabattlerock.  com/gallery2/index.  php

Drupal g2drupal Module install:
/home/users/web/b2277/scabattlerock/sites/all/modules/g2drupal

Gallery2 G2drupal module install:
/home/users/web/b2277/scabattlerock/gallery2/modules/g2drupal

G2drupal module lib files install:
/gallery2/lib/events
/gallery2/lib/G2RefineHTML
/gallery2/lib/G2SimpleHTMLDom

I then Opened the AdminG2Drupal.  inc file in gallery2/modules/g2drupal
replaced all Is_Empty with isEmpty

opened /gallery2/main.  php and here is a screen copy of the code after it was updated with required line
***********************************************************************************
/*
       * Session: Find out whether we need to send a cookie & need a new session (only if
       * we don't have one yet)
       */
      $session =& $gallery->getSession();
      $ret = $session->start();
      if ($ret) {
          return array($ret, null);
      }

      list ($ret, $shouldCache) = GalleryDataCache::shouldCache('write', 'full');
      if ($ret) {
          return array($ret, null);
      }
      /* Added Event: BeforeOutput */
       include(dirname(__FILE__) .   '/lib/events/Gallery_BeforeOutput.  event');
      if ($embedded) {
          $html = $theme->splitHtml($html, $results);
      }

      if ($shouldCache && $results['cacheable']) {
          $htmlForCache = $html;
          if ($embedded) {
         $themeDataForCache = $template->getVariable('theme');
          }
      }
************************************************************************************

Logged in www.  scabattlerock.  com with admin password
went to .  >modules>g2drupal>configure
*configured :/home/users/web/b2277/scabattlerock/gallery2/  as gallery server path (sucessful)
*entered Gallery2 as breadcrumb

logged in gallery2 with admin password

went to .  >admin>plugin>g2drupal
*installed
*configured using :/home/users/web/b2277/scabattlerock   as drupal server path
*activated

went back to www.  scabattlerock.  com and clicked on gallery link This is where I get the same error I was getting before:
***********************************************
Page taken to:
hxxp: www.  scabattlerock.  com/gallery2/main.  php
error:
0
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. 

Please contact the server administrator, cgiadmin@yourhostingaccount.  com and inform them of the time the error occurred, and anything you might have done that may have caused the error. 

More information about this error may be available in the server error log. 
****************************************************************

If I remove the following line from the main.  php file then I'm able to open my gallery page but if I add it back I get the above error:
/* Added Event: BeforeOutput */
 include(dirname(__FILE__) .   '/lib/events/Gallery_BeforeOutput.  event');


have I missed any steps???   I would be more then happy to let you remote in on teamviewer and show you everything I see and locations of everything on my server if you so wish.


I turned on debug and attempted to open link from within drupal and this is the errors I get when config. php debug buffered is turned on:
****************************************************************
Notice: Undefined index: g2drupal_email in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 109

Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class:109) in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 110

Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class:109) in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 111

Notice: Undefined index: g2drupal_bounce in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 113

Warning: require_once(//includes/bootstrap. inc) [function. require-once]: failed to open stream: No such file or directory in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 1190

Fatal error: require_once() [function. require]: Failed opening required '//includes/bootstrap. inc' (include_path='. :/usr/local/lib/php-5. 2. 17/lib/php') in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 1190
***********************************************************************
Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #9 at: 17:46 GMT - Sun 18 Nov 12 »

Thanks for the detailed feedback.

Unfortunately I only have phone access to the web for the next few days and can only look into this in the detail needed when I get to my dev machine back at home.

I think I know what is up with your setup and should be able to accomodate this.

Thanks again.
Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #10 at: 20:28 GMT - Sun 18 Nov 12 »

Hi,

Try changing

 
Code:
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'


to

 
Code:
require_once DRUPAL_ROOT . 'includes/bootstrap.inc'


In the GalleryG2Drupal.class file
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #11 at: 09:38 GMT - Mon 19 Nov 12 »

GalleryG2Drupal. class is all ready compiled so there is no way for me to change anything within it without decompiling the file which then screws the code all up.   I think you'll have to do it on your end.
Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #12 at: 10:38 GMT - Mon 19 Nov 12 »

You have lost me completely ... PHP is an interpreted language as in, you don't compile it.

What exactly are you doing there?

It may be why this line which works elsewhere is not working on your setup.

Alternatively, it may be that your system is thrown by the *.class extension. If so, just ignore and use notepad etc to open the file and edit as you wish.
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #13 at: 11:53 GMT - Mon 19 Nov 12 »

I didn't make any changes to it.   I just assumed since its a .  class which is usually used with compiled javascript that I couldn't change it.    do you still want me to try and change the line you stated.    up to this point I haven't changed anything except what I mentioned in the long post full of all the information. 

"just made the changes to test using notebook to open"
getting same errors:
Notice: Undefined index: g2drupal_email in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 109

Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class:109) in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 110

Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class:109) in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 111

Notice: Undefined index: g2drupal_bounce in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 113

Warning: require_once(/includes/bootstrap. inc) [function. require-once]: failed to open stream: No such file or directory in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 1190

Fatal error: require_once() [function. require]: Failed opening required '/includes/bootstrap. inc' (include_path='. :/usr/local/lib/php-5. 2. 17/lib/php') in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 1190
« Last Edit: 12:06 GMT - Mon 19 Nov 12 by stevenyuko » Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #14 at: 12:13 GMT - Mon 19 Nov 12 »

Try

Code:
require_once '.' . DRUPAL_ROOT . 'includes/bootstrap.inc'

Although it seems there is something a bit unusual about your system. Have you used one of those one click install options webhosts offer to install Drupal by any chance?

The getcwd function should return a full server path but in your case it isn't for some reason.
Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #15 at: 12:57 GMT - Mon 19 Nov 12 »

If that fails, try

Code:
define ('DRUPAL_ROOT', '/hermes/waloraweb055/b2277/scabattlerock');
require_once DRUPAL_ROOT . 'includes/bootstrap.inc';

In the same file
Logged
stevenyuko
Conscript
*******
Posts: 8


« Reply #16 at: 13:44 GMT - Mon 19 Nov 12 »

Yes.    Drupal and gallery both are installed as part of simple scripts one click install.    I even went and checked to make sure permissions were correct on the "include" folder which is currently 755 and bootstrap.   ince is 644.   
ok.     .       did two things.     
one:
added to main.     php at beginning and end of page as suggestion on web which cleared half of the errors:
Code:
<? ob_start(); ?>
<? ob_flush(); ?>

These are the errors that cleared because of the above code
Code:
Notice: Undefined index: g2drupal_email in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 109

Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class:109) in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 110

Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class:109) in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 111

Notice: Undefined index: g2drupal_bounce in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal. class on line 113


Made change :   
Code:
require_once '.' . DRUPAL_ROOT . 'includes/bootstrap.inc'
error output now:
Code:
Parse error: syntax error, unexpected T_STRING in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 1191


Tried your second suggestion.     
Code:
define ('DRUPAL_ROOT', '/hermes/waloraweb055/b2277/scabattlerock');
require_once DRUPAL_ROOT . 'includes/bootstrap.inc';
error output now:
Code:
Notice: Undefined index: g2drupal_email in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 109

Notice: Undefined index: g2drupal_bounce in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 113

Warning: require_once(/hermes/waloraweb055/b2277/scabattlerockincludes/bootstrap.inc) [function.require-once]: failed to open stream: No such file or directory in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 1190

Fatal error: require_once() [function.require]: Failed opening required '/hermes/waloraweb055/b2277/scabattlerockincludes/bootstrap.inc' (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 1190

after looking at the error's I realized that the it was skipping a "/" between scabattlerock and includes so I went and changed the second part of the code to add the / before includes.    thought I might have hit bingo.  .  .  .   now a whole new set of errors:

Code:
Notice: Undefined index: g2drupal_email in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 109

Notice: Undefined index: g2drupal_bounce in /hermes/waloraweb055/b2277/scabattlerock/gallery2/modules/g2drupal/classes/GalleryG2Drupal.class on line 113

Fatal error: Class 'Theme_Content_Parser' not found in /hermes/waloraweb055/b2277/scabattlerock/sites/all/modules/art_content/art_content.module on line 9
[/]
I'm using a artisteer created theme for my drupal page.   the art_content. module is a module used to import content from the theme into the drupal installation.   I wondering if as a test, I should switch over the the default theme to see if this magically fixes the problem.

by the way.   .   .    I do appreciate your time and patience as we work through this and thank you for your assistance.   
« Last Edit: 14:07 GMT - Mon 19 Nov 12 by stevenyuko » Logged
Dayo
Sheriff
*
Posts: 447


WWW
« Reply #17 at: 15:52 GMT - Mon 19 Nov 12 »

One click installs are usually bad news and probably lie behind a lot of the issues here.

In any case, you left the semi colon out of
Code:
require_once '.' . DRUPAL_ROOT . 'includes/bootstrap.inc';

PHP statements have to always end with semicolons, ";", or else you get an error.

Secondly, ignore the notices and warnings and remove the ob_start, ob flush stuff from the code. The only things that matter are errors.

Finally, I believe the issue is down to the one click install script and at this point, have to say I'll be updating the documentation to state that sites with Drupal and/or Gallery 2 installed using these or package managers are not supported.
Logged
Pages: 1 2 [All]
Jump to:  

Latest Posts
by Dayo
[21:04 GMT - Tue 19 Aug 14]

[22:20 GMT - Sat 16 Aug 14]

[21:15 GMT - Wed 09 Apr 14]

by Dayo
[17:18 GMT - Tue 21 Jan 14]

[15:55 GMT - Sun 15 Sep 13]
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Corto design TinyPortal v0.9.8 © Bloc
Configured by Dayo Akanji
Contact