Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PHP
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span id=PHPFPM>Installation and configuration</span> == [[File:PHP 7.1 - Example phpinfo() Screen.png|thumb|Example output of the phpinfo() function in PHP 7.1]] There are two primary ways for adding support for PHP to a web server β as a native web server module, or as a CGI executable. PHP has a direct module interface called [[server application programming interface]] (SAPI), which is supported by many web servers including [[Apache HTTP Server]], [[Internet Information Services|Microsoft IIS]] and [[Oracle iPlanet Web Server|iPlanet Web Server]]. Some other web servers, such as OmniHTTPd, support the [[Internet Server Application Programming Interface]] (ISAPI), which is [[Microsoft]]'s web server module interface. If PHP has no module support for a web server, it can always be used as a [[Common Gateway Interface]] (CGI) or [[FastCGI]] processor; in that case, the web server is configured to use PHP's CGI executable to process all requests to PHP files.<ref name="php.net-4">{{cite web | url = http://www.php.net/manual/en/install.general.php | title = General Installation Considerations | access-date = 2013-09-22 | website = php.net }}</ref> PHP-FPM (FastCGI Process Manager) is an alternative FastCGI implementation for PHP, bundled with the official PHP distribution since version 5.3.3.<ref>{{cite web | url = http://www.php.net/archive/2010.php#id2010-07-22-2 | title = News Archive: PHP 5.3.3 Released! | date = 2010-07-22 | website = php.net}}</ref> When compared to the older FastCGI implementation, it contains some additional features, mostly useful for heavily loaded web servers.<ref>{{cite web | url = http://www.php.net/manual/en/install.fpm.php | title = FastCGI Process Manager (FPM) | access-date = 2013-09-22 | website = php.net }}</ref> When using PHP for command-line scripting, a PHP [[command-line interface]] (CLI) executable is needed. PHP supports a CLI [[server application programming interface]] (SAPI) since PHP 4.3.0.<ref>{{cite web | url = http://www.php.net/manual/en/features.commandline.introduction.php | title = Command line usage: Introduction | access-date = 2013-09-22 | website = php.net }}</ref> The main focus of this SAPI is developing [[command line interface|shell]] applications using PHP. There are quite a few differences between the CLI SAPI and other SAPIs, although they do share many of the same behaviours.<ref>{{cite web | url = http://www.php.net/manual/en/features.commandline.differences.php | title = Command line usage: Differences to other SAPIs | access-date = 2013-09-22 | website = php.net }}</ref> PHP has a direct module interface called SAPI for different web servers;<ref name="php.net-6">{{cite web |url = https://php.net/manual/en/install.general.php|title = General Installation Considerations|access-date = 2013-09-22|website = php.net}}</ref> in case of PHP 5 and Apache 2.0 on Windows, it is provided in form of a [[Dynamic-link library|DLL]] file called {{Mono|php5apache2.dll}},<ref>{{cite web|url = https://php.net/manual/en/install.windows.apache2.php|title = PHP: Apache 2.x on Microsoft Windows|access-date = 2013-09-22|website = php.net|url-status = dead|archive-url = https://web.archive.org/web/20130926122011/http://php.net/manual/en/install.windows.apache2.php|archive-date = 2013-09-26}}</ref> which is a module that, among other functions, provides an interface between PHP and the web server, implemented in a form that the server understands. This form is what is known as a SAPI.{{Citation needed|date=November 2023}} There are different kinds of SAPIs for various web server extensions. For example, in addition to those listed above, other SAPIs for the PHP language include the Common Gateway Interface and command-line interface.<ref name="php.net-6" /><ref>{{cite web |url = http://www.php.net/manual/en/features.commandline.introduction.php|title = Command line usage: Introduction|access-date = 2013-09-22|website = php.net}}</ref> PHP can also be used for writing desktop [[graphical user interface]] (GUI) applications, by using the {{cite web | url = https://github.com/cztomczak/phpdesktop | title = PHP Desktop | website = [[GitHub]] }} or discontinued [[PHP-GTK]] extension. PHP-GTK is not included in the official PHP distribution,<ref name="php.net-4" /> and as an extension, it can be used only with PHP versions 5.1.0 and newer. The most common way of installing PHP-GTK is by compiling it from the source code.<ref>{{cite web | url = http://gtk.php.net/manual/en/tutorials.installation.php | title = Installing PHP-GTK 2 | access-date = 2013-09-22 | website = php.net | archive-date = 2013-12-12 | archive-url = https://web.archive.org/web/20131212093441/http://gtk.php.net/manual/en/tutorials.installation.php | url-status = dead }}</ref> When PHP is installed and used in [[Cloud computing|cloud]] environments, [[software development kit]]s (SDKs) are provided for using cloud-specific features.{{Citation needed|date=November 2023}} For example: * [[Amazon Web Services]] provides the AWS SDK for PHP<ref>{{cite web|url=http://aws.amazon.com/sdkforphp/ |title=AWS SDK for PHP |website=aws.amazon.com |access-date=2014-03-06}}</ref> * [[Microsoft Azure]] can be used with the Windows Azure SDK for PHP.<ref>{{cite web |url=http://www.interoperabilitybridges.com/projects/php-sdk-for-windows-azure.aspx |title=Windows Azure SDK for PHP β Interoperability Bridges and Labs Center |website=interoperabilitybridges.com |access-date=2014-03-06 |url-status=usurped |archive-url=https://web.archive.org/web/20140320152702/http://www.interoperabilitybridges.com/projects/php-sdk-for-windows-azure.aspx |archive-date=2014-03-20 }}</ref> Numerous configuration options are supported, affecting both core PHP features and extensions.<ref>{{cite web | url = http://www.php.net/manual/en/configuration.php | title = Runtime configuration: Table of contents | access-date = 2013-09-22 | website = php.net }}</ref><ref>{{cite web | url = http://www.php.net/manual/en/ini.list.php | title = php.ini directives: List of php.ini directives | access-date = 2013-09-22 | website = php.net }}</ref> Configuration file <code>php.ini</code> is searched for in different locations, depending on the way PHP is used.<ref>{{cite web | url = http://www.php.net/manual/en/configuration.file.php | title = Runtime configuration: The configuration file | access-date = 2013-09-22 | publisher = PHP.net }}</ref> The configuration file is split into various sections,<ref>{{cite web | url = http://www.php.net/manual/en/ini.sections.php | title = php.ini directives: List of php.ini sections | access-date = 2013-09-22 | publisher = PHP.net }}</ref> while some of the configuration options can be also set within the web server configuration.<ref>{{cite web | url = http://www.php.net/manual/en/configuration.changes.modes.php | title = Runtime configuration: Where a configuration setting may be set | access-date = 2013-09-22 | publisher = PHP.net }}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PHP
(section)
Add topic