PHP Configuration - Locating and Editing php.ini (Apache, Nginx, PHP FPM)

Поделиться
HTML-код
  • Опубликовано: 1 июл 2024
  • PHP’s initialization file (php.ini) is responsible for configuring PHP. In this video we'll learn how to identify which php.ini file your system is using so you can make setting changes. This is done via the phpinfo function.Then, we’ll learn how to get your system to recognize any changes to your php.ini file by either restarting your server or reloading your PHP Handler.
    Server types covered:
    + A local server running Apache via XAMPP
    + A live server running Apache
    + A live server running Nginx with the FPM / FastCGI PHP handler
    The specific settings we’ll update in the php.ini file include upload_max_filesize and post_max_size. Both of these settings are often updated when you build a site that allows file uploads.
    === NOTES ===
    codewithsusan.com/notes/php-c...
    === CHAPTERS ===
    00:00 Introduction
    00:15 Locate php.ini file with phpinfo()
    01:45 Opening php.ini and working within it
    03:00 Examples: upload_max_filesize and post_max_size
    04:00 Making changes take effect on Apache server
    05:05 Example with Nginx server with PHP FPM FastCGI handler
    09:00 Recap
    === PRODUCTS I USE ===
    Microphone: amzn.to/3ZRPdvb
    Microphone windscreen: amzn.to/3ZRPdvb
    (I may receive a small commission from sales associated with the above links. Any income from these sales goes directly to supporting new videos for this channel)

Комментарии • 14

  • @Vaish1304
    @Vaish1304 Год назад

    Thanks

  • @user-ut7hb7vk8z
    @user-ut7hb7vk8z Год назад

    Thanks for this video

  • @henrikchristensen65688
    @henrikchristensen65688 Год назад

    Great video!
    Another way of getting the loaded .ini file: php -I | grep "Loaded Configuration File" :)

    • @codewithsusan
      @codewithsusan  Год назад

      Good tip! Just note that shows you the config file used by PHP running in command line which may be different than the PHP running on your web server.

  • @HuuTinLam-ue1pl
    @HuuTinLam-ue1pl 8 месяцев назад

    thanks you very very much

  • @designpowerhouse65
    @designpowerhouse65 Год назад

    thank you

  • @FiveStarWin
    @FiveStarWin Год назад +1

    you are amazig

  • @user-ni9qc2rh4w
    @user-ni9qc2rh4w 11 месяцев назад

    nice video

  • @johnyflodder2963
    @johnyflodder2963 Год назад

    Thanks for the video. It's quite useful. I have tried to do the same with the upload_tmp_dir by specifying /tmp as value in the php.ini (Apache, Nginx, PHP FPM), however phpinfo() keeps returning no value. Any hint on how to proceed?

    • @codewithsusan
      @codewithsusan  Год назад +1

      Hi Johny - Which server type are you running? If you try changing another setting - for example the upload_max_filesize like I did in the video - are you seeing changes to that setting reflected in the phpinfo output after restarting?

    • @johnyflodder2963
      @johnyflodder2963 Год назад

      @@codewithsusan Linux FPM/FastCGI. I could specify the upload_max_filesize and other non SYSTEM INI parameters without problem. Only upload_tmp_dir did not work as expected. I specified as /tmp as value for upload_max_filesize in the php.ini, however phpinfo kept returning null as value. It gave me quite a headache and I gave up and decided to use the system temporary dir, which is /tmp, in my php scripts. Thanks for the reply.

  • @dopamine_Seeker
    @dopamine_Seeker Год назад

    you just save my ass thank u very much

  • @oscsrhernandez8743
    @oscsrhernandez8743 Год назад

    Thanks