This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here

Skip to main content

Just Host Web Hosting Help

FastCGI for PHP

This article has been deprecated.
As part of our ongoing effort to provide the most secure and up to date experience on our hosting platforms, older versions of PHP are no longer supported. This includes the FastCGI option, which will no longer be available through our servers.

FastCGI for PHP makes all your PHP applications persistent. There is no per-request startup and initialization overhead. This makes possible the development of applications that would otherwise be impractical within the CGI paradigm (e.g. a huge PHP script or an application that requires a connection to one or more databases).



Benefits:

  • PHP scripts will run faster. The PHP interpreter is loaded into memory rather than calling from storage for every hit, having the ability to improve performance of your scripted site.
  • The load on the Server Resources can be lessened with the use of FastCGI. Since the server does not have to load the PHP interpreter for each hit, you will be able to accommodate a higher traffic site without exceeding your CPU quota. We recommend testing your site with and without FastCGI
  • No modifications to your existing code are required for most sites, however, some sites will need code modifications.

Potential Problems:

  • You will only have one php.ini file available for all subdirectories (/home/USERNAME/public_html/php.ini). This is necessary to help optimize the website code as much as possible. If you need multiple php.ini files to accommodate different scripting needs, you can disable FastCGI for PHP on any of your subdirectories while leaving the rest of the account enabled for performance.
  • There can be a few minutes delay in any updates you make to your PHP environment (ie, php.ini changes). Since your php.ini is loaded into memory for greater speed, every hit does not re-read it from storage.

How to Enable PHP FastCGI

  1. Log in to your Just Host cPanel account.
  2. Under Programming click PHP Config.
  3. Select PHP5.4 (FastCGI)
  4. Click Save Changes.

Alternately, if you prefer to manually edit your .htaccess file:

To enable FastCGI on your account, simply add "AddHandler fcgid-script" and the extension you want into your .htaccess file.

AddHandler fcgid54-script .php

PHP is already configured to work right away.

For other programming languages, you are required to use a dispatch file. (A dispatch file is a file which loads an application into memory. This is included as part of your application. There may be several dispatch files depending on what you want, such as fast-cgi.)

Note: Once you enable fastcgi, your site will only use Just Host's php.ini settings. If you have a custom php.ini file, it will not be used.

Knowledgebase Article 365,537 views bookmark tags: acceleration fastcgi php scripting


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article explains how to enable FastCGI for PHP applications.
Knowledgebase Article 164,651 views tags: fastcgi php

Policy Regarding: Scripting, Coding, & Third Party Product Issues (PHP/Perl/RoR/etc.)
Knowledgebase Article 263,245 views tags: code coding script scripting

This article will explain how to add a PHP handler to your .htaccess files. This is useful if you want to customize the version of PHP that runs your PHP files.
Knowledgebase Article 404,775 views tags: htaccess php

Related Help Content

How do I change the PHP environment for my site with php.ini?
Knowledgebase Article 807,774 views tags: configuration ini php server

How do I turn the display_errors flag on for php?
Knowledgebase Article 229,759 views tags: display errors php

How do I redirect users to another page using PHP?
Knowledgebase Article 933,268 views tags: header location php redirect redirects

In the newer versions of PHP, they have included a new directive to control and handle remote includes. We disable this option, by default, which may affect some of your PHP scripts.
Knowledgebase Article 180,329 views tags: include php remote url

Many popular website platforms use PHP for rendering their content. It’s common for these sites to have automatic update tools to ensure that they work with the latest version of PHP, however sometimes a theme or plugin for these services may prevent them from updating or may not work with a newer
Knowledgebase Article 157,508 views tags: deprecation discontinue end php upgrade

Changing PHP versions, load custom Apache mods, and other Apache/PHP customizations
Knowledgebase Article 152,671 views tags: easyapache php vps whm

This article will outline which PHP PEAR Packages are installed and how you can install additional PHP PEAR Packages.
Knowledgebase Article 190,321 views tags: package pear php

How can I adjust the php settings specifically for an Addon Domain?
Knowledgebase Article 330,841 views tags: domain php

** Google ad credits are only available to customers in the United States, Canada, and the United Kingdom at this time.

¹ VAT (Value Added Tax) is not included in our advertised price and will be charged separately and itemized on invoices and billing information. Standard VAT rates based on EU Member State regulations may apply. Learn more.