Securely Storing PHP Configuration Settings

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ค. 2024
  • Learn how to securely store configuration settings in a PHP application, using best practices.
    Please consider supporting my channel:
    ☕ ko-fi.com/davehollingworth
    Code shown in the video:
    ‣ gist.github.com/daveh/9e2f2a8...
    Links shown in the video:
    ‣ www.12factor.net/config
    ‣ github.com/vlucas/phpdotenv
    Gear icons created by Freepik - Flaticon
    ‣ 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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 44

  • @dave-hollingworth
    @dave-hollingworth  ปีที่แล้ว +5

    If there's another topic you'd like to see me cover, please let me know!

    • @ademineshat
      @ademineshat ปีที่แล้ว +3

      I think you're going in the right direction with these tutorials. These topic's are most wanted, other TH-cam tutorials teaching just Basics which are good but not enough. Thank you

    • @efbYouTube
      @efbYouTube ปีที่แล้ว +2

      is the laravel framework something u use (& recommend)? i saw it placed quite high on the stackoverflow survey this year & last. txs again (& again & again 😊) for these great vids!

    • @ademineshat
      @ademineshat ปีที่แล้ว +2

      @@efbTH-cam Laravel is Great but for larger projects maybe. I always like to create something my own and enjoy it ☺️

    • @dave-hollingworth
      @dave-hollingworth  ปีที่แล้ว +1

      @@ademineshat Agreed - @efbolton3429 I will be doing some Laravel videos at some point, yes!

    • @NedumEze
      @NedumEze ปีที่แล้ว +1

      Yeah!
      Again, please, could you try to deal with web apps' and sites' scalability? Things for or against scalability, and the hows. Please.

  • @vijaykoogu3822
    @vijaykoogu3822 ปีที่แล้ว +3

    Hi @dave-hollingworth please dont stop uploading new videos. Thanks alot.

  • @viralstation
    @viralstation ปีที่แล้ว +5

    Welcome back sir! Love your content as always. Can you please make a whole project and go with each step explaining from DB design to front & backend and finally publishing? Thanks

  • @tempMahad
    @tempMahad 8 หลายเดือนก่อน +1

    Can you imagine that this is the exact video i wanted!
    You are just adding more value to me.

  • @batchrocketproject4720
    @batchrocketproject4720 ปีที่แล้ว

    Really useful, clear, and to the point. Thanks. 💯

  • @sakmaestro3852
    @sakmaestro3852 10 หลายเดือนก่อน

    You really explained well...

  • @abdelhamidnehlil7277
    @abdelhamidnehlil7277 ปีที่แล้ว +1

    très intéressant, merci!

  • @someutubchannel69
    @someutubchannel69 ปีที่แล้ว +2

    As always a wonderful video.
    I have 2 of your Udemy courses...
    They are the best I have experienced from Udemy
    I highly recommend your courses

  • @cursosdecodeigniter2857
    @cursosdecodeigniter2857 ปีที่แล้ว +1

    Very good!

  • @ArifBasri
    @ArifBasri ปีที่แล้ว +1

    thank you!

  • @eliasagustin2
    @eliasagustin2 7 หลายเดือนก่อน +1

    Thanks!

  • @MuhamadSurchy
    @MuhamadSurchy 10 หลายเดือนก่อน

    Thanks for sharing all those very useful information , but sir can you create a video on php source code Encrypting please

  • @mnamihas
    @mnamihas ปีที่แล้ว +1

  • @PGTuber
    @PGTuber 9 หลายเดือนก่อน

    ❤❤❤

  • @sakmaestro3852
    @sakmaestro3852 10 หลายเดือนก่อน

    Do u have a symfony tutorial or course?

  • @UIRETU
    @UIRETU 9 หลายเดือนก่อน

    Hello dear author plz show hot to create ajax product filter with url in route for sending product to smb thx

  • @Big_Dot_Inc
    @Big_Dot_Inc ปีที่แล้ว

    Hi. I am struggling to understand how search box autocomplete works on an website .Do i have to create a huge library with words in a folder somwehere in php ?

    • @dave-hollingworth
      @dave-hollingworth  ปีที่แล้ว +1

      It's typically a database search as opposed to a folder with files in it - the browser sends a request to the web server and this matches the search term to values in a database column and returns a response

    • @Big_Dot_Inc
      @Big_Dot_Inc ปีที่แล้ว +1

      @@dave-hollingworth Talking about a topic ,how about if you can do a topic we descuse earlier?

  • @NedumEze
    @NedumEze ปีที่แล้ว

    But, Dave, you also know that the PHP.env cannot be used in Production, or can it? If so, how please?

    • @dave-hollingworth
      @dave-hollingworth  ปีที่แล้ว

      Yes it can - if you have a "traditional" host, then you just make a .env file on your production server, with the production values. If you're using something like Heroku, then you can define environment variables in the admin panel.

    • @kelechichiemeka6292
      @kelechichiemeka6292 หลายเดือนก่อน

      Wont it be accessible via the url?

    • @NedumEze
      @NedumEze หลายเดือนก่อน

      @@kelechichiemeka6292
      Not securely.

    • @dave-hollingworth
      @dave-hollingworth  หลายเดือนก่อน

      The .env file is typically placed outside of the web root, do it shouldn't be accessible in a browser

    • @NedumEze
      @NedumEze หลายเดือนก่อน

      @@dave-hollingworth
      Thanks Dave. You've been such great help and friend for a long time.
      Because I couldn't figure out how to securely and robustly use the .env approach, I resorted to using includes from outside the root. There, it's not easy to access.
      But, some day, I am hoping that you will redo the .env approach with Production environment in focus. The previous video was in the Development environment.
      Looking forward, Dave.