vps eke php ini podi udawwak denwada

lkkolla

Well-known member
  • Sep 28, 2023
    1,163
    1,658
    113
    control panel nethi vps eke php Execution time - input vars - php.ini update karath hari giye ne ne machnla

    44.PNG

    666.PNG


    ggg.PNG





    dc.PNG
     

    Honey Bunch

    Well-known member
  • Nov 24, 2018
    17,018
    26,453
    113
    Kandy
    If you are using Nginx with PHP-FPM, you should follow these steps to ensure your changes to max_input_vars are applied correctly:

    1. Locate the php.ini File: Ensure you are editing the correct php.ini file. To find the location of the active php.ini file, you can create a PHP file with the following content and access it through your web server:
      php
      Copy code
      <?php phpinfo(); ?>
      Look for the Loaded Configuration File entry to find the path to the php.ini file.
    2. Edit the php.ini File: Open the php.ini file with a text editor and set the max_input_vars directive:
      ini
      Copy code
      max_input_vars = 3000
    3. Check PHP-FPM Pool Configuration: PHP-FPM can have its own configuration that overrides settings in php.ini. Check the pool configuration files typically found in /etc/php/7.x/fpm/pool.d/. Open the pool configuration file (e.g., www.conf) and ensure there are no conflicting php_value or php_admin_value directives.
    4. Restart PHP-FPM and Nginx: After editing the php.ini file, you need to restart both PHP-FPM and Nginx to apply the changes:
      bash
      Copy code
      sudo systemctl restart php7.x-fpm
      sudo systemctl restart nginx
      Replace php7.x-fpm with the appropriate version number of PHP-FPM you are using.
    5. Verify the Changes: Create a PHP file with the following content and access it through your web server to confirm the new max_input_vars value:
      php
      Copy code
      <?php phpinfo(); ?>
      Look for the max_input_vars directive in the output to ensure it reflects the new value (3000 in this case).
    By following these steps, you should be able to ensure that the max_input_vars setting is correctly applied in your Nginx and PHP-FPM setup.
     
    • Love
    Reactions: lkkolla

    Dr.Sheldon_Suprakata

    Well-known member
  • Feb 7, 2018
    5,663
    1
    14,218
    113
    හපෝ. nginx නම් මල වදයක්. අම්බානට ලෝඩ් එක යනවා. apache හොදයි.
    PHP location එක හරි ද බලන්න .
    එහෙම නම්, update කරාට පස්සේ php-fpm & nginx restart කරන්න.

    sudo /etc/init.d/nginx restart
    sudo /etc/init.d/php-fpm restart
     
    • Love
    Reactions: lkkolla

    lkkolla

    Well-known member
  • Sep 28, 2023
    1,163
    1,658
    113
    If you are using Nginx with PHP-FPM, you should follow these steps to ensure your changes to max_input_vars are applied correctly:

    1. Locate the php.ini File: Ensure you are editing the correct php.ini file. To find the location of the active php.ini file, you can create a PHP file with the following content and access it through your web server:
      php
      Copy code
      <?php phpinfo(); ?>
      Look for the Loaded Configuration File entry to find the path to the php.ini file.
    2. Edit the php.ini File: Open the php.ini file with a text editor and set the max_input_vars directive:
      ini
      Copy code
      max_input_vars = 3000
    3. Check PHP-FPM Pool Configuration: PHP-FPM can have its own configuration that overrides settings in php.ini. Check the pool configuration files typically found in /etc/php/7.x/fpm/pool.d/. Open the pool configuration file (e.g., www.conf) and ensure there are no conflicting php_value or php_admin_value directives.
    4. Restart PHP-FPM and Nginx: After editing the php.ini file, you need to restart both PHP-FPM and Nginx to apply the changes:
      bash
      Copy code
      sudo systemctl restart php7.x-fpm
      sudo systemctl restart nginx
      Replace php7.x-fpm with the appropriate version number of PHP-FPM you are using.
    5. Verify the Changes: Create a PHP file with the following content and access it through your web server to confirm the new max_input_vars value:
      php
      Copy code
      <?php phpinfo(); ?>
      Look for the max_input_vars directive in the output to ensure it reflects the new value (3000 in this case).
    By following these steps, you should be able to ensure that the max_input_vars setting is correctly applied in your Nginx and PHP-FPM setup.
    oya tikath kara hari giye ne bro

    හපෝ. nginx නම් මල වදයක්. අම්බානට ලෝඩ් එක යනවා. apache හොදයි.
    PHP location එක හරි ද බලන්න .
    එහෙම නම්, update කරාට පස්සේ php-fpm & nginx restart කරන්න.

    sudo /etc/init.d/nginx restart
    sudo /etc/init.d/php-fpm restart
    apache speed hodaida bro security ehma
    ------ Post added on Aug 4, 2024 at 8:23 PM
     

    Dr.Sheldon_Suprakata

    Well-known member
  • Feb 7, 2018
    5,663
    1
    14,218
    113
    apache speed hodaida bro security ehma
    ------ Post added on Aug 4, 2024 at 8:23 PM

    ඔය දෙකම හොදයි බන් security එහෙම අවුලක් නෑ . පත DDoS එකක් වගේ අවොත් තමයි හුටා වෙන්නේ.
    මම එක පාරක් ඔය දෙකම එකම එකට දාල බැලුවා nginx එක reverse proxy විදිහට තියාගෙන. හරියට config කරේ නැත්නම් පිස්සු කෙලිනවා server එක.
     
    • Love
    Reactions: lkkolla

    dilshanniranga

    Well-known member
  • Jan 3, 2024
    1,695
    2,614
    113
    ඔය දෙකම හොදයි බන් security එහෙම අවුලක් නෑ . පත DDoS එකක් වගේ අවොත් තමයි හුටා වෙන්නේ.
    මම එක පාරක් ඔය දෙකම එකම එකට දාල බැලුවා nginx එක reverse proxy විදිහට තියාගෙන. හරියට config කරේ නැත්නම් පිස්සු කෙලිනවා server එක.
    Apache slow බං.
     
    • Love
    Reactions: lkkolla

    dilshanniranga

    Well-known member
  • Jan 3, 2024
    1,695
    2,614
    113
    hmm, nginx performnce නම් හොදයි compared to apache, bt මට ඕක එපා උනේ එක පාරටම high cpu usgae issue එකක් ආවා.

    වැඩේ මොකද උනේ?
    මං හිතන්නේ එක්කෝ bot attack එකක් නැත්තම් memory leak එකක්...