[checkoutemail] collect customer information using SSL

photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 08:15

Hi everyone,

I was wondering if you could help me please.

I have tried several methods to have the last checkoutemail page to run via SSL and failed.

Tried changing the URI to https in config.php but that just doesn't work cause of a error in GallerySession.class line 780...

It works when logged in as an admin but as a guest it just goes white and times out.

I want to be able to have that last page where people enter their information in run through SSL.. Is this possible?

Thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 09:32

There are issues with switching Gallery to HTTPS in the middle of a session - particularly, you can't switch back as the Gallery session cookie is marked as encrypted and will not thereafter be returned to the server by the browser via an unencrypted http GET or POST.

You can run the entirety of a Gallery session via https if you wish though: research on this forum and in the documentation the use of the $gallery->setonfig('baseUri', '....'); line in the config.php for more information.

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 12:53

Thank you Alec,

When I do edit the baseUri to https pages just don't load and go white (in safari), checked the error log and I get an error on line 780 in GallerySession.class...

Line 780 is:

Quote:
list ($ret, $detectedLanguageCode) = GalleryTranslator::getDefaultLanguageCode();

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 13:00

The error log should also tell you what the error is - what is it?

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:04
Quote:
[19-May-2010 12:58:55] PHP Fatal error: Class 'GalleryTranslator' not found in /home/anthonyk/public_html/g/modules/core/classes/GallerySession.class on line 780

Thats all there is for the error in the log.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 13:07
Quote:
PHP Fatal error: Class 'GalleryTranslator' not found in ...

That's a curious error. I'm not really sure what to say except that I can't see any connection with checkoutemail or https.

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:09

I don't think its really related to the checkoutemail module, because I have enabled https for the whole site, I got a feeling it might be doing something with the session id or something? Or it can't pick up that we're trying to run SSL. I've had a browse on the site, but can't seem to find anything about running the whole site in SSL?

Should I try a clean install of Gallery somewhere else on my server and see if I get the same error?

Thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 13:17

If you set your baseUri to '' then you should be able to run your entire gallery with either http or https transparently, merely by entering a different url to start with. (That goes for the hostname and anything else before the "main.php" part. (There are minor issues with the urlrewrite module if the path AFTER the domain name differs for different domains, but it doesn't for most installs.) If the baseUri is blank then G2 is programmed to produce urls in pages that use the same root as the current page. If there is an entry in the baseUri then that part (protocol, hostname etc) whatever it is is substituted into the current url in order to produce new ones.

I would start by getting https to work with a blank baseUri just by entering it into the browser. Then worry about checkout later.

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:23

Thank you,

I have done what you have suggested:

Quote:
$gallery->setConfig('baseUri', '');

But then when I try to access my site at:

https://www.somewebsite.com/g/main.php

I get the exact same problem..

Though if I login as an admin, everything works perfectly fine

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 13:25

and if I try to access your site without the https, at

http://www.somewebsite.com/g/main.php

then I get a 404 page.

I think you need to go back a few stages and get the site sorted out.

EDIT: oh, am I being dumb? is that not the correct url, silly me. Well, I would post a new thread asking for help with the https. Nobody else is going to read this one with this title.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 13:27

By the way, have you checked the certificate is all correctly installed and that you have access to static pages with https?

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:29

No worries mate.

I will repost with just the https issues.

Thanks for your help.

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:30

And yes I've checked the cert and everything seems to be working perfectly fine.

Thanks for the info!

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2010-05-19 13:32

Your website loads fine for me with both http and https - no errors.

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:41

What about when you try to enter in a password for one of the albums? try navigating to Anthony Khoury Photography > Associations NORTHERN SUBURBS NETBALL ASSOCIATION (NSNA) > MCC

When you enter the wrong password, it loads the wrong password page fine..

But when you enter the right password, it loads nothing..

Try the MCC album with the password I just PM'ed you.

Thanks

 
photosinaflash

Joined: 2008-11-23
Posts: 37
Posted: Wed, 2010-05-19 13:53

I've noticed that I always seem to get a blank page, when a guest, when this is in the header g2_GALLERYSID

I navigated around whilst logged in as an admin, but I couldn't see when it once had the g2_GALLERYSID string in the header...

Seems as though it does appear in the header if your a guest though.

Could this have something to do with it?