[EdLUG] Help ?

Dick Middleton dick at fouter.net
Mon Apr 27 13:09:59 UTC 2020


On 2020-04-27 10:08, Andrew Robinson wrote:
> It's quite an open question as you're using PHP. So basic questions would be, do you have PHP on the server? I see you have a php.ini file in your directory. 

It looks like 123-reg is the hosting service.  Their offering is a pretty traditional PHP
(or perl, ruby etc) server side.

As always it depends what you are trying to do.  If it's just learning I suggest you go
modern and use a single page client side static website using javascript.

There are many static site builders for javascript.

A simple one is Wintersmith.  You build it using nodejs on your workstation and upload the
files (js, css etc) to the host.

Here's a demo I built a while ago using Wintersmith:
https://sunsetdemo.netlify.app/

The source is here:
git at github.com:nottledim/sunset-demo-site.git

If you want something more sophisticated there's React-Static for example.  It's excellent
for dynamic updating of websites.  I think it was Facebook invented it for their needs.

The real difficulty comes when you want to do Upload.  That's because there has to be
something on the hosting site to manage and receive the uploaded data. With a client side
website everything is in the browser and that doesn't have the ability to change anything
on the host.

Uploading comes with big security issues (as you would discover if you installed something
like Wordpress (PHP)).  The bad boys are on it within minutes!  So you you need logins,
sessions, captcha and all sorts.

Here's a way to do uploading using client side and Google's cloud service. I've no idea if
123-reg do a similar service.

https://medium.com/@mheavers/setting-up-a-basic-file-upload-feature-for-your-static-website-with-just-javascript-using-firebase-32464580d8bb

It's a big learning curve.  Take your time.

Have fun

Dick



More information about the EdLUG mailing list