Categories
Technology

Fixing Gallery2 Login Error / Pics from Chandernagore

boat

A few days back I needed to upload a lot of photos to my Gallery2 photo gallery. No, not for the photos from Surajkund Handicrafts Fair, I’m talking of a time before that. I’m talking of my trip to Kolkata. I wanted to upload photos from Chandernagore in an album. (You can see these now, BTW.)

I had recently upgraded my Gallery2 installation directly using the auto-upgrade facility provided by my host. Post that event, this was the first time I needed to upload something. The first thing to do, of course, is to login. This is where I encountered the first signs of trouble.

You are not authorized to view this resource. You need to login.

Annoying, because the username / password were most definitely correct. (Stored in my password manager.) It was most definitely my Gallery2 install which had short circuited somewhere. I thought of re-installing, but before I did that I thought I should run a manual upgrade once to see if it solved the problem. (Maybe the auto-upgrade wasn’t ‘clean’?) I backed up my database and the ‘g2data’ folder (just copy it to another folder on your server).

First, I tried to run the upgrade process manually (without overwriting files with a fresh copy). To do this you need to go to http://www.yourgalleryinstall.com/upgrade to initialize the web-based upgrader. The upgrader will guide you through all the steps.

Fortunately, this solved my problem. It turns out that a few of the themes which I was using hadn’t been upgraded. Once that was done (automatically by the upgrader), logins worked again. This, however, broke the permalinks module on my Gallery install.

After you’re able to successfully login, post-upgrade, upgrade any other plugins from the plugin administration page (remember to update plugin repositories first). Then, re-enable the plugins URL Rewrite and Permalinks. You will need to re-edit and upload the example .htaccess files to the folders as specified by Gallery2 (modules/rewrite/data/mod_rewrite and …/mod_rewrite_no_options), but after that it should work.

Unrelated to the above, but this might be helpful for some. For those who’ve got Gallery2 installed on their server root, you need to enter the path to the example .htaccess file folder. That bit is made clear by the placeholder file itself. But for ones who’re running Gallery2 in a subdomain using a virtual DocumentRoot you need to remember that the path you enter in the .htaccess file for URL Rewrite needs to be relative to the virtual DocumentRoot.

To give you an example, on a ‘normal’ server where Gallery2 is hosted you’ll enter something like

RewriteBase /html/username/gallery2/modules/rewrite/data/mod_rewrite/gallery2/

…while if you’re using a virtual DocumentRoot, then you’ll enter the line to be edited as

RewriteBase /gallery2/modules/rewrite/data/mod_rewrite/gallery2/

Do remember to uncomment the line because in the placeholder file it it commented out.

Hope that solves some of your Gallery problems! Enjoy the photo albums on Chandernagore and Surajkund now.

Categories
Technology

SEO EXPERT? O REALLY? YA REALLY!

o-really-ya-really

A few days I posted about MozillaCamp Delhi, which (hopefully) will be taking place on 10th February 2009. I went to their page today to see if the venue has been finalised. (It hasn’t.) I came across a new entry in the list of attendees. One where the person had manually given 3 spaces, written the number, and then added his name (instead of just hitting return and adding a new entry in the list). Our user is a SEO EXPERT / WEB DEVELOPER – MOZILA FIREFOX USER.

preetam-singh-patel
No shittin'! This is taken straight from his site.

In case you haven’t already hotfooted to his webpage, do so. He is “I M OWN PERSON-THERE’S NO ONE ELSE IN THE WORLD OUT THERE LIKE ME” and owns a “black-brown jarman shepherd”. I could probably quote some other biographical details but it’s best that you read it yourself. No, I mean, really. Please do. Why give out spoilers here?

As a Mozilla Firefox user since the days when it was a fledgling little baby, I think I feel happy about this. After all, Mozilla Firefox finally seems to be trickling down to the users of…er…that level. Which is a good thing. With a greater number of users on our side we can no longer have statements in web development tutorials / books such as “Since IE occupies the majority of market share, code for it instead of bothering to make it compatible with others” (paraphrased statement from an actual book by Wiley Publications).

Preetam Singh Patel – and Obsessed Firefox Users like him – are accidental heroes in the long road towards eventual domination that Mozilla Firefox is on the path to.

Typical users of web browsers IE Firefox Safari Opera
Click on the image to enlarge

PS – Don’t I just love the mockery done for Safari users? Hell yeah!

PPS – A few hours after posting this, the venue for MozillaCamp Delhi was finalized. It is going to be held at Indian Social Institute, Lodi Road. You can get a map / directions to the venue here (http://tr.im/mozcampdel, in case you want to share with others)