One shop, built securely, part by part
Set up the practice web shop
One shop, built securely, part by part
Before you read the lesson
A first draft that works
Naledi Mahlangu is relaunching Table Bay Online's web shop on a new server. Palesa, a freelance developer, has written a first draft, and every page loads. Soon customers will trust it with their names, addresses and orders.
What would you want to know before it goes live?
Not just that the pages load, but that every control really works. In this course you build a practice copy of the shop yourself and prove each control with a check.
You will be able to
- Install PHP and run its built-in server
- Build the skeleton and create its database
- Watch requests and cookies in the developer tools
- Run the first checks and explain them
Three steps, in this order
- Build the next part securely, by hand
- Check that each control works, with a positive check
- Review fragments of a first draft and fix them
Test only your own practice shop, or systems you own or have the owner's written permission to test. Nothing else.
Unlawful access is an offence under section 2 of the Cybercrimes Act 19 of 2020
Why does the shop keep its database file outside the public folder?
- So SQLite reads it faster
- So no browser can ever download it
- So PHP can create it unasked
Show the answer
Only the public folder is served. A file outside it cannot be downloaded by guessing its address, even if something else in the shop goes wrong.
Now watch the video
Watch how the Network panel lists each request with its status and type, and shows its headers. You will use it to record your shop's baseline.
Watch the video