Securely Storing PHP Configuration Settings

Dave Hollingworth July 1, 2023
Video Thumbnail
Dave Hollingworth Logo

Dave Hollingworth

View Channel

About

Backend web development topics explained clearly and simply. Any ideas for new videos are most appreciated! If you like my content, please like my videos and consider subscribing to my channel. If you *really* like my content, please consider supporting me here: https://ko-fi.com/davehollingworth Thank you for being here!

Video Description

Learn how to securely store configuration settings in a PHP application, using best practices. Please consider supporting my channel: ☕ https://ko-fi.com/davehollingworth Code shown in the video: ‣ https://gist.github.com/daveh/9e2f2a8a9e82b370388d718d927923de Links shown in the video: ‣ https://www.12factor.net/config ‣ https://github.com/vlucas/phpdotenv Gear icons created by Freepik - Flaticon ‣ https://www.flaticon.com/free-icons/gear 00:00 Introduction 00:18 Hardcoded credentials 01:06 PHP constants 02:02 PHP array 03:00 INI file 03:50 JSON and YAML 04:10 Environment variables 05:02 .env file 05:20 phpdotenv 06:14 Ignoring .env 06:55 Summary #PHP #security #configuracion

You May Also Like

PC Gaming Essentials

AI-recommended products based on this video

Loading...
Beelink EQR5 Mini PC, AMD Ryzen 5 5650U(7nm, 6C/12T) up to 4.2GHz, Mini Computer 32GB DDR4 RAM 1TB PCIe3.0x4 SSD, Micro PC 4K@60Hz Dual HDMI Display/WiFi6/BT5.2/Office/Home/HTPC/W-11 Pro

Beelink EQR5 Mini PC, AMD Ryzen 5 5650U(7nm, 6C/12T) up to 4.2GHz, Mini Computer 32GB DDR4 RAM 1TB PCIe3.0x4 SSD, Micro PC 4K@60Hz Dual HDMI Display/WiFi6/BT5.2/Office/Home/HTPC/W-11 Pro

(425)
$419.00
FREE delivery Sun, Aug 10
Loading...
BOSGAME E2 Mini PC AMD Ryzen 5 3550H, 16GB DDR4 RAM 512GB SSD, Mini Desktop Computer Support 4K Dual HDMI Display/WiFi5/BT5/Gigabit Ethernet for Home/Office

BOSGAME E2 Mini PC AMD Ryzen 5 3550H, 16GB DDR4 RAM 512GB SSD, Mini Desktop Computer Support 4K Dual HDMI Display/WiFi5/BT5/Gigabit Ethernet for Home/Office

(79)
$236.00
FREE delivery Sun, Aug 10
Loading...
Beelink SER5 Mini PC, AMD Ryzen 5 5500U(up to 4.0GHz) 6C/12T, Mini Computer 16GB DDR4 RAM 500GB NVMe SSD, Mini Desktop Computer 4K@60Hz Dual Display HDMI&DP WiFi6/BT5.2/WOL/HTPC/W-11 Pro

Beelink SER5 Mini PC, AMD Ryzen 5 5500U(up to 4.0GHz) 6C/12T, Mini Computer 16GB DDR4 RAM 500GB NVMe SSD, Mini Desktop Computer 4K@60Hz Dual Display HDMI&DP WiFi6/BT5.2/WOL/HTPC/W-11 Pro

(346)
$359.00
Prime
Loading...
TRIGKEY S5 Mini PC, AMD Ryzen 5 Mini Computer 5500U (6C/12T, Up to 4.0 GHz) 16GB DDR4 3200MHz + 500GB PCIE3.0 NVME SSD, Small PC 4K Triple Displays, WiFi 6+BT5.2, DP, HDMI, USB3.2

TRIGKEY S5 Mini PC, AMD Ryzen 5 Mini Computer 5500U (6C/12T, Up to 4.0 GHz) 16GB DDR4 3200MHz + 500GB PCIE3.0 NVME SSD, Small PC 4K Triple Displays, WiFi 6+BT5.2, DP, HDMI, USB3.2

(285)
$369.00
FREE delivery Sun, Aug 10
Loading...
Beelink Mini PC, Intel 12th Gen Alder Lake- N100(up to 3.4GHz), 16GB DDR4 RAM 500GB M.2 SSD, Mini S12 Desktop Computers, USB3.2/WiFi 5/BT4.2 for Home/Office

Beelink Mini PC, Intel 12th Gen Alder Lake- N100(up to 3.4GHz), 16GB DDR4 RAM 500GB M.2 SSD, Mini S12 Desktop Computers, USB3.2/WiFi 5/BT4.2 for Home/Office

(204)
$219.00
PrimeFREE delivery Sat, Jun 14
Loading...
Beelink Mini S13 Mini PC,Intel 13th Twin Lake N150(Upgraded N100, 4C/4T),Mini Computer 16GB RAM 500GB M.2 SSD, W-11 Pro Gigabit Ethernet, 4K UHD, WiFi6, BT5.2 Home/Business Mini Desktop Computer

Beelink Mini S13 Mini PC,Intel 13th Twin Lake N150(Upgraded N100, 4C/4T),Mini Computer 16GB RAM 500GB M.2 SSD, W-11 Pro Gigabit Ethernet, 4K UHD, WiFi6, BT5.2 Home/Business Mini Desktop Computer

(82)
$308.00
FREE delivery Sun, Aug 10
Loading...
OUMAX N150 Dual LAN Mini PC, Intel 13th Gen Twin Lake N150 (Up to 3.6GHz), 16GB DDR4 500GB M.2 SSD, Mini Computer Support 4K Dual HDMI, WiFi5/BT5.0/USB3.2, Built-in 45W Power Supply Office Desktop PC

OUMAX N150 Dual LAN Mini PC, Intel 13th Gen Twin Lake N150 (Up to 3.6GHz), 16GB DDR4 500GB M.2 SSD, Mini Computer Support 4K Dual HDMI, WiFi5/BT5.0/USB3.2, Built-in 45W Power Supply Office Desktop PC

(0)
$299.00
PrimeFREE delivery Sat, Jun 14
Loading...
Corsair SF1000 (2024) Fully Modular Low Noise 80 Plus Platinum ATX Power Supply – ATX 3.1 Compliant – PCIe 5.1 Ready – SFX-to-ATX Bracket Included – Black

Corsair SF1000 (2024) Fully Modular Low Noise 80 Plus Platinum ATX Power Supply – ATX 3.1 Compliant – PCIe 5.1 Ready – SFX-to-ATX Bracket Included – Black

(23)
$284.99
FREE delivery Wed, Oct 8
Loading...
Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

(41)
$219.19$204.66
FREE delivery Oct 15 - 22
Loading...
Corsair RM1200x Shift Fully Modular ATX Power Supply - Modular Side Interface - ATX 3.1 & PCIe 5.1 Compliant - Zero RPM Fan Mode - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Black, 1200W

Corsair RM1200x Shift Fully Modular ATX Power Supply - Modular Side Interface - ATX 3.1 & PCIe 5.1 Compliant - Zero RPM Fan Mode - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Black, 1200W

(25)
$254.98$203.98
FREE delivery Wed, Oct 8
50+ bought in past month
Loading...
CORSAIR Hydro X Series iCUE Link XH405i Custom Cooling Kit – Hardline Water Cooling Loop – XC7 Elite CPU Water Block – XD5 Elite D5 Pump Res – XR5 360mm Radiator – 3X QX120 RGB Fans

CORSAIR Hydro X Series iCUE Link XH405i Custom Cooling Kit – Hardline Water Cooling Loop – XC7 Elite CPU Water Block – XD5 Elite D5 Pump Res – XR5 360mm Radiator – 3X QX120 RGB Fans

(235)
$879.99
FREE delivery Sun, Aug 24
Loading...
CORSAIR Hydro X Series iCUE Link XH405i Custom Cooling Kit – Hardline Water Cooling Loop – XC7 Elite CPU Water Block – XD5 Elite D5 Pump Res – XR5 360mm Radiator – 3X QX120 RGB Fans

CORSAIR Hydro X Series iCUE Link XH405i Custom Cooling Kit – Hardline Water Cooling Loop – XC7 Elite CPU Water Block – XD5 Elite D5 Pump Res – XR5 360mm Radiator – 3X QX120 RGB Fans

(235)
$879.99
FREE delivery Sun, Aug 24
Loading...
Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

(41)
$219.19$204.66
FREE delivery Oct 15 - 22
Loading...
Corsair RM1200x Shift Fully Modular ATX Power Supply - Modular Side Interface - ATX 3.1 & PCIe 5.1 Compliant - Zero RPM Fan Mode - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Black, 1200W

Corsair RM1200x Shift Fully Modular ATX Power Supply - Modular Side Interface - ATX 3.1 & PCIe 5.1 Compliant - Zero RPM Fan Mode - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Black, 1200W

(25)
$254.98$203.98
FREE delivery Wed, Oct 8
50+ bought in past month
Loading...
Corsair RM1200e (2023) Fully Modular Low-Noise ATX Power Supply with 12V-2x6 Cable – ATX 3.1 & PCIe 5.1 Compliant, Cybenetics Platinum Efficiency, 105°C-Rated Capacitors, Modern Standby Mode – Black

Corsair RM1200e (2023) Fully Modular Low-Noise ATX Power Supply with 12V-2x6 Cable – ATX 3.1 & PCIe 5.1 Compliant, Cybenetics Platinum Efficiency, 105°C-Rated Capacitors, Modern Standby Mode – Black

(49)
$249.99
FREE delivery Wed, Oct 8