Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 12.24 minutes in February 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

Set custom php.ini in FastCGI – How to perform it easily

by | Mar 28, 2021

Wondering how to set custom php.ini in FastCGI? We can help you.

Most of the domains move to PHP nowadays. In a shared server, all of us want to set the PHP parameter according to the feasibility of domains.

In such a case, custom PHP plays an important role.

As part of our Server Management Services, we assist our customers with several FastCGI queries.

Today, let us discuss how to set custom php.ini in FastCGI.

 

Custom php.ini

With custom PHP, according to our requirements, we can set features like ‘maximum upload file size, maximum execution time’ etc.

Among the PHP handlers, in a shared server, due to a lack of resources, FastCGI is the best to manage resources for a high traffic site.

Moving ahead, our Support Techs show how to set custom PHP in ‘FastCGI’ as a PHP handler.

 

Set custom php.ini in FastCGI

To set a custom “php.ini” for the “FastCGI” PHP handler a few settings are to be done in the server.

Initially, we check the current PHP handler for the server:

# /usr/local/cpanel/bin/rebuild_phpconf –current Available handlers

If it is “FastCGI”, we proceed with the below-given steps to enable custom “php.ini”:

  1. Open the “.htaccess” file for the domain and add the below codes:
    AddHandler php5-fastcgi .php
    Action php5-fastcgi /cgi-bin/php5.fcgi
  2. Then, move the php.ini file to the cgi-bin folder of the account and also change the permission of the file to “755”.
  3. Add the below-given code to the “cgi-bin” directory which is present inside the “public_html” file of the domain.
    #!/bin/sh
    export PHP_FCGI_CHILDREN=1
    export PHP_FCGI_MAX_REQUESTS=10
    exec /usr/local/cpan el/cgi-sys/php5
  4. Eventually, save and quit the file.
  5. Then change the permission of the file “/home/user/public_html/cgi-bin/php5.fcgi” to 755.

Now, we have a custom PHP for our domain. Once this is done, we can set different PHP parameters.

For example, if want to install Drupal, we need to set the PHP parameter “Memory Limit” as 64MB which helps seamless installation of Drupal in our domain.

Though there is a never-ending stream of things to do, if we take care of the steps above, we can perform the task easily.

[Need help with the setting? We’d be happy to assist you]

 

Conclusion

In short, FastCGI is the best to manage resources for a high traffic site in shared servers. Here’s how our Support Techs set custom php.ini in FastCGI.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *