Welcome to Geeklog, Anonymous Wednesday, June 19 2024 @ 09:15 am EDT

Geeklog Forums

Media Gallery and Apache Authentication


Hi, I just installed Media Gallery and am really liking it so far. I just wanted to let users and the Media Gallery author know that there are potentially some issues with Apache Authentication. I doubt most people run the kind of setup I have, but I thought I'd mention it since I believe somewhere in the code there are directions to paths being made which are not part of the Geeklog/Media Gallery installation path.

I run a closed server, mostly for family and friends, and require people to login to my site. I have Geeklog installed in a path other than the standard /var/www/html and the directory requires authentication and that the user be a member of a Geeklog-specific group which is allowed access to that directory. I use MySQL for authentication but I don't think that has any effect on this issue.

Immediately after I installed Media Gallery, well more precisely immediately after I added a Member Album or perhaps after I made that album a feature album, I started getting strange behaviour. When I returned to the Homepage or when I logged out, I was prompted again by the Apache Authentication mechanism to login. I re-entered the Geeklog-specific username/password again (knowing this likely wouldn't work) and was continually prompted to login. After entering my superuser password everything was fine.

I checked the Apache ssl_error_log and noticed the following entries:

[Thu Nov 30 19:14:27 2006] [error] [client] File does not exist: /var/www/html/images, referer: https://mysite/pathtogeeklog/

[Thu Nov 30 19:16:29 2006] [error] [client] mysql user geekuser not in right group: /images/speck.gif, referer: https://mysite/pathtogeeklog/

[Thu Nov 30 19:24:25 2006] [error] [client] mysql user geekuser not in right group: /images/speck.gif, referer: https://mysite/pathtogeeklog/index.php

It looks as if the server document root is being referred to and since my user didn't have access to that directory, I was being prompted to provide additional credentials.

Other than that no issues so far, but if I run into anymore I'll try and post them.



Status: offline


Forum User
Full Member
Registered: 02/08/04
Posts: 393

Very detailed post and great debugging, you made it very easy for me to find the problem...

Here is what is happening. When you made the album a 'Featured Album', Geeklog displays it on the home page. The template Media Gallery uses to display the featured album is cb_featured_album.thtml. The very last line of that template is:
Text Formatted Code

<table cellspacing="0" cellpadding="0" align="center" width="100%" class="block-divider"><tr><td><img src="{site_url}/images/speck.gif" width="1" height="2" alt=""></td></tr></table>      

If you'll notice, the reference to speck.gif, it is preceeded by {site_url} which is a template variable that should be substituted with the URL of your site. The problem is, I do not define {site_url} in the code, so it is always referencing /images/speck.gif.

The fix is very simple, either remove that line which would remove the divider line between the featured album and your stories, or edit functions.inc in the plugins/mediagallery/ directory and make the following change:

One line 1898 you should see:
Text Formatted Code

                    'album_id'          => $album_id,

Make that look like this:
Text Formatted Code

                    'site_url'          => $_CONF['site_url'],
                    'album_id'          => $album_id,

Save the file and you should be good to go.

Again, thanks for the detailed report, made my job much easier.

Let me know if this solve the issue.


Status: offline


Forum User
Registered: 12/01/06
Posts: 1
Location:Calgary, AB, Canada
Hi Mark,

Wow, that was a fast response. I'm glad my debugging was able to help. I made the changes you mentioned to the functions.inc file and that definitely fixed the problem. Thanks for looking into this so quickly!



All times are EDT. The time is now 09:15 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content