Server issue

Post Reply
User avatar
cogier
Site Admin
Posts: 297
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Server issue

Post by cogier » Wednesday 07th August 2019 2:36pm

This is a project I have been working on. It is a GUI for the command line tool 'fgallery' that creates a good looking web gallery of photos, see here. It was all working well until there was a change in browser behaviour which now produces this error: -

Image

The program still creates Java code that works on the web but no longer displays it on the host machine.

There is some advice here regarding running a HTTP Server but I have not had a lot of luck with it.

Any help on how to get it to run on the host machine would be appreciated.
FGalleryGUI.tar.gz
(53.01 KiB) Downloaded 10 times

Amcfarlane
Posts: 1
Joined: Saturday 17th August 2019 1:06pm

Re: Server issue

Post by Amcfarlane » Sunday 18th August 2019 9:23pm

Hi,

The resulting web page loaded and worked correctly for me in FireFox, but gave the error that you got when loaded using Chromium. Could not determine why one browser worked and not the other.

amcfarlane

stevedee
Posts: 120
Joined: Monday 20th March 2017 6:06pm

Re: Server issue

Post by stevedee » Monday 19th August 2019 10:15am

cogier wrote:
Wednesday 07th August 2019 2:36pm
...It was all working well until there was a change in browser behaviour which now produces this error...works on the web but no longer displays it on the host machine...
Hi Charlie, I think the fGallery link you provided gives the answer:-
Usage
Generate all the static files with ./fgallery:
./fgallery photo-dir my-gallery
Upload “my-gallery” somewhere.

To test/preview the gallery locally using Firefox, you can just open the file my-gallery/index.html. On other browsers you need a web server (due to AJAX same-origin restrictions). If you have python installed, a quick way to test the gallery locally is to run:

cd my-gallery
python -m SimpleHTTPServer 8000
...and then navigate to http://localhost:8000.
...except that Firefox now has the same AJAX restrictions as other browsers, so you need to run the generated gallery on a server. This works on my home server and also when I use the simple Python server on my laptop.

To clarify the Python server instructions above:-
1. Ensure you have Python installed.
2. Open a terminal and navigate to your generated gallery folder (I just use the File Manager to reach the Gallery folder and then open the terminal with F4 or menu 'open a terminal in the active folder' or whatever your blend of Linux gives you).
3. Start the Python server by typing in this terminal:-
python -m SimpleHTTPServer 8000
You should see something like this in the terminal:-
steve@steve-entroware:~/Gallery_new/GalleryCogier$ python -m SimpleHTTPServer 8000
Serving HTTP on 0.0.0.0 port 8000 ...
4. Now start your web browser and use the address: http://localhost:8000
Your gallery should appear in browser

If you return to the terminal window, you should now see something like this:-
steve@steve-entroware:~/Gallery_new/GalleryCogier$ python -m SimpleHTTPServer 8000
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET /index.css HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET /mootools-core-1.4.js HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET /mootools-more-1.4.js HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET /mootools-idle.js HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET /mootools-mooswipe.js HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:45] "GET /index.js HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /data.json HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /throbber.gif HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /left.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /right.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /eye.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /download.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /back.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cap-always.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cut-top.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cap-normal.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cap-never.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cut-left.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cut-right.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /cut-mov.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /noise.png HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /blurs/Dawne_0519.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /imgs/Dawne_0519.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /thumbs/Dawne_0519.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /thumbs/GoldfinchHead.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /thumbs/HolkumBeach.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /thumbs/GoldFinch.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /thumbs/LeedsCastle.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /imgs/GoldfinchHead.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:46] "GET /blurs/GoldfinchHead.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:59] "GET /imgs/GoldFinch.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 10:59:59] "GET /blurs/GoldFinch.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 11:00:00] "GET /blurs/HolkumBeach.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 11:00:00] "GET /imgs/HolkumBeach.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 11:00:00] "GET /imgs/LeedsCastle.jpg HTTP/1.1" 200 -
127.0.0.1 - - [19/Aug/2019 11:00:00] "GET /blurs/LeedsCastle.jpg HTTP/1.1" 200 -

I hope this helps.

stevedee
Posts: 120
Joined: Monday 20th March 2017 6:06pm

Re: Server issue

Post by stevedee » Monday 19th August 2019 11:12am

BTW, the simple web browser "Arora" can display these galleries without the need of a server ...just saying.

User avatar
cogier
Site Admin
Posts: 297
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Server issue

Post by cogier » Monday 19th August 2019 5:12pm

Thanks guys,

You made me think 'Do I need an external browser'. The answer appears to be 'No'. All I needed to do was open the created web page in a WebView. Why didn't I think of that before?! :(

If anybody would like to try the updated program here and pass on any comments I would be greatful.
FGalleryGUI.tar.gz
(57.95 KiB) Downloaded 3 times

Post Reply