Internet Windows Android

Installing and configuring PHP. Install Apache, PHP, MySQL php settings file

5.2K

The php.ini configuration file is the main tool for configuring the PHP core. It is counted every time PHP is initialized. If the change is not visible, remember to stop and restart httpd. If the changes you made are still valid, use the phpinfo () function to check if the php ini is where.

The config file is well commented and detailed. Parameters are case sensitive, values keywords- No; spaces and lines starting with a semicolon are ignored. Boolean values ​​can be represented as 1/0, Yes / No, On / Off, or True / False. The defaults in php.ini will affect the PHP installation, which can be customized later.

In this article, we will look at important settings in the php.ini file, which may be required by the PHP parser.

short_open_tag = Off

Short open tags look like this:... This parameter must be set to Off if you want to use the XML processing functions.

safe_mode = Off

If this parameter is ON, you probably compiled PHP with the enable-safe-mode flag. Safe mode is most important for using CGI.

safe_mode_exec_dir =

This option is only meaningful if enabled safe mode... It can also be installed with the --with-exec-dir flag during the Unix build process. PHP in safe mode only runs external binaries from this directory. The default directory is / usr / local / bin. This has nothing to do with serving a regular PHP / HTML web page.

safe_mode_allowed_env_vars =

This php ini option controls which environment variables users can change in safe mode. By default, only those variables to which "PHP_" is appended. If this directive is empty, then most of the variables can be changed.

safe_mode_protected_env_vars =

The parameter sets which environment variables users cannot change in safe mode, even if the safe_mode_allowed_env_vars option is enabled.

disable_functions =

A rather useful addition to the PHP4 configuration, which has been preserved in PHP5, is the ability to disable selected functions for security reasons. Previously, this required manual editing of the C code in which the PHP interpreter was written. Functions file system, operating system and networks should be first on this list because being able to write files and modify the system over HTTP is not secure.

max_execution_time = 30

At php setting ini, you need to be aware that the set_time_limit () function will not work in safe mode. Therefore, this is the main way to implement delayed script execution in safe mode. On Windows, you should force shutdown based on maximum memory consumption, not time. You can also use the Apache timeout setting to implement latency. But it will also apply to non-PHP site files.

error_reporting = E_ALL & ~ E_NOTICE

The default is E_ALL & ~ E_NOTICE, all errors except notifications. Servers should be set to at least the default. And only on the main servers can a lower value be used.

error_prepend_string = [""]

Together with "is used with strings, as when generating the value of a form field.

variables_order = EGPCS

Replaces gpc_order. Both versions have been deprecated along with register_globals. It sets the order of various variables: Environment, GET, POST, COOKIE, and SERVER (or Built-in). You can change this order. The variables will be sequentially overwritten from left to right, with the rightmost one always "winning." This means that if you leave the default and use the same name for the environment variable, variable POST and the variable COOKIE, then in the end the name will belong to the variable COOKIE.

register_globals = Off

This php ini set parameter allows you to determine whether EGPCS variables should be registered as global. This method is currently deprecated and since PHP 4.2 this flag is set to Off by default. Use superglobal arrays instead.

gpc_order = GPC

This parameter is deprecated.

magic_quotes_gpc = On

Escapes quotes in incoming GET / POST / COOKIE data. If you use many forms that submit data to themselves or other forms and display the values ​​of the forms, you need to activate this directive or use the addslashes () functions for the data of the string type.

magic_quotes_runtime = Off

This parameter escapes quotes in incoming database strings and text strings. Remember SQL adds a slash to single quotes and apostrophes when storing strings and does not strip them when returning strings. If this option is disabled, you must use the stripslashes () function when displaying any type of string data from a SQL database. If magic_quotes_sybase is set to On, then this parameter must be Off.

magic_quotes_sybase = Off

Escapes single quotes in incoming database strings and text strings with Sybase-style single quotes rather than backslashes. If the magic_quotes_runtime parameter is set to On, this parameter should be disabled.

auto-prepend-file =

If a path is specified in this php ini parameter, PHP should automatically add an include () clause to the beginning of each PHP file. Be aware of the path restrictions for include files.

auto-append-file =

If a path is specified in this parameter, PHP should automatically include an include () clause at the end of each PHP file, except when exiting with the exit () function. Be aware of the path restrictions for include files.

include_path =

If you set this value, you will only be allowed to include or request files from the specified directories. The include directory is usually located under the root document. This is necessary if you are working in Safe Mode. Set the parameter to .in to include files from the directory where your script is located. Multiple directories are separated by colons: .: / usr / local / apache / htdocs: / usr / local / lib.

doc_root =

When configuring php ini, if you are using Apache, then the document root for this server or virtual host is already set in the httpd.conf file. Set this value here if you are using safe mode or want to enable PHP for only part of your site ( for example only in one subdirectory).

file_uploads =

Activate this flag if uploading files using a PHP script.

upload_tmp_dir =

Do not remove comments from this line if you do not understand what it is!

session.save-handler = files

Except in rare cases, you do not need to change this parameter.

ignore_user_abort =

Determines what happens if a site visitor clicks the "Stop" button in their browser. The default is On, which means the script will continue to run until completion or timeout. If you change the value of this parameter to

PHP is one of the most popular programming languages ​​used for building websites.

Download the distribution kit from the official PHP site http://www.php.net ( I have - php 5.1.6 ). Unpack the archive to the C: \ Program Files \ php directory. Find the config file php.ini containing the PHP interpreter settings and make the following changes to it:

    Register_globals directive in php 5.1.6 enabled by default ( recommended):

    register_globals = on

    Set the maximum amount of data sent by POST method equal to 16M:

    post_max_size = 16M

    Find the line:

    ; include_path = ".; c: \ php \ includes"

    uncomment it ( for which remove the semicolon character; at the beginning of the line) and fix it to:

    include_path = ".; C: \ Program Files \ PHP \ PEAR"

    It is necessary to set the extension_dir parameter equal to the directory where the PHP distribution is located:

    Extension_dir = "C: / Program Files / php / ext"

    Install maximum size uploaded files equal to 16M:

    upload_max_filesize = 16M

    The doc_root parameter must be passed the value of the DocumentRoot directive of the Web server:

    doc_root = "d: / main / html"

    If you need to use PHP extensions, remove the comment ( semicolon character ; ) at the lines:

    ; extension = php * .dll
    .
    .
    .
    ; extension = php * .dll

    The following extensions are sufficient for PHP to work properly:

    Php_mbstring.dll - the library is designed to work with multi-byte encodings, which include the encodings of eastern languages ​​( Japanese, Chinese, Korean), Unicode ( UTF-8) and etc.

    php_bz2.dll - the extension is used to create and unpack archives in bzip2 format.

    Php_curl.dll - allows you to connect and work with servers using various internet protocols.

    Php_gd2.dll - the extension allows you to work with graphics.

    Php_mysql.dll - the library is required to work with MySQL server.

    Php_mysqli.dll - the library is an extension of php_mysql.dll. It contains additional PHP functions to work with MySQL server version 4.1.3 and higher.

    Parameter

    error_reporting = E_ALL & ~ E_NOTICE

    allows you to display all errors, except for comments. This value is set by default, and we leave it.

    But PHP 5 ( Unlike previous versions ) does not output a number of errors to the browser window ( due to safety requirements).

    You can view all information about errors in the log files. To place it in them, the log_errors parameter must be set to On:

    log_errors = On

    To debug Web applications with error messages output to the browser window, set the display_errors parameter:

    display_errors = On

    Setting the display_errors and log_errors parameters to off disables the output of error messages to the browser window and log file, respectively.

    Directive

    e r r o r _l o g = syslog

    allows you to log errors in the Windows system log.


    Find the line:

    session.save_path = "F: / main / tmp"

    and specify the path to the folder for storing temporary files. I have this Temp folder on drive C:

    session.save_path = "C: / Temp"

    To store temporary session files, you can create a separate Temp folder in the php directory. Then:

    session.save_path = "C: / Program Files / php / Temp"

    V config file Apache Web Server httpd.conf before the description block virtual hosts you need to add the following lines:

    AddType application / x-httpd-php phtml php

    Options ExecCGI

    Action application / x-httpd-php "/php_dir/php-cgi.exe"

Now you need to restart Apache server and check if PHP works.

To do this, create a test.php file in the d: / main / html directory. To create a PHP file, you can use text editor Notebook, in which you should write any small script, for example:

e c h o ("H e l l o, PHP!");
?>

If, when typing the request http: //localhost/test.php in the address bar of the browser, the line

Hello, PHP!

The installation was successful!

The location of the php.ini file depends on the operating system on which the hosting provider's server is running. To find out where it is, follow 4 simple steps:

  1. Create a php file (the name can be any, but we take myphpinfo.php as an example), and add the following lines to it:
  2. Upload this file to the server where your site is located (in the root folder).
  3. Launch through the browser (enter the URL https://yoursitename.com/myphpinfo.php).
  4. In the window that appears, look for the path to php.ini (first, look at the "Loaded Configuration File", if it says "None", then look at the "Configuration File (php.ini) Path").

How do I set up php.ini?

The php.ini file has the following "directive = value" syntax rules. If you want to add comments (for example, in which you indicate what affects this setting), then do after a semicolon (everything after this sign is not counted as a command). Here's an example:

max_execution_time = 40; Maximum number of seconds of script execution

General settings

PHPengine = On; PHP scripts are enabled.

Short_open_tag = On; Allows simple tagging of PHP code

Asp_tags = On; Includes the ability to highlight PHP code, as is done in ASP -<% %>

Precision = 12; Indicates how many digits will be after the decimal point for floating point numbers.

Output_buffering = 4096; Output buffering will be automatically enabled, with the buffer size specified after "equals".

Safe_mode = On; Safe mode.

Safe_mode_allowed_env_vars = PHP_; Allows the user to work only with environment variables that start with PHP_. If this directive is empty (will have no value), then users will be able to change any environment variables. This can be very detrimental to the protection of scripts.

Safe_mode_protected_env_vars = LD_LIBRARY_PATH; Prevents changing variables that are listed separated by commas.

Disable_functions =; After the "equal" sign, you need to write the functions that you want to disable, separated by commas (this is usually done for security)

Disable_classes =; After the "equal" sign, you need to write the classes, the call of which you want to prohibit, separated by commas (this is usually done for safety)

Resource limitation

max_execution_time = 40; Maximum time for script execution (in seconds)

Max_input_time = 40; The maximum time in seconds that the script can give to process the data that is loaded.

Memory_limit = 16M; The maximum memory that is allocated for the operation of one script

Error handling and logs

error_reporting = E_ALL | E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE; Specifies a list of errors that can be output.

Display_errors = On; Allows you to output errors directly to the browser (often used for ease of debugging).

Display_startup_errors = On; Errors appearing during PHP start are allowed to be shown.

Log_errors = On; Errors are allowed to be written to the log file.

Log_errors_max_len = 1024; The maximum number of characters that the log length can make.

Track_errors = On; The last error message will be saved to the $ php_errormsg variable

Html_errors = On; Allowed output of error messages in HTML.

Error_log = filename; Specifies the name of the error log.

Data processing

variables_order = "EGPCS"; Sets the order in which PHP will register variables (E - built-in variables, G - GET variables, P - POST variables, C - Cookies, S - sessions). If you remove any of the letters, then the work of the corresponding variables will be blocked.

Register_globals = On; Enables the ability to refer to variables that are received via GET / POST / Cookie / session as regular variables (for example "$ variablename").

Register_argc_argv = On; It is allowed to create $ argv and $ argc variables based on information from the GET method.

Post_max_size = 8M; Sets the maximum amount of data that can be received.

Magic_quotes_gpc = On; Enables automatic handling of quotes that come through POST / GET / Cookie.

Auto_prepend_file =; The contents of the files specified in these directives must be processed by PHP accordingly BEFORE the script is executed.
auto_append_file =; The contents of the files specified in these directives must be processed by PHP accordingly AFTER the script is executed.

Default_mimetype = "text / html"; Specifies the encoding for the Content-type. By default, text / html will be used without specifying the encoding

Doc_root =; Sets the root folder for PHP scripts.

Extension_dir = "./"; Sets the folder where dynamically loaded extensions will be stored.

Uploading files

file_uploads = On; Uploading files to the server is allowed.

Upload_tmp_dir =; Temporary directory for files to be loaded.

Upload_max_filesize = 2M; Sets the maximum file size that can be uploaded.

Working with sockets

user_agent = "PHP"; The USER_AGENT variable is set when a socket connection is made.

Default_socket_timeout = 30; The maximum time to listen on a socket (seconds).

Sessions

session.save_handler = files; It says that session information needs to be stored in files

session.save_path = / tmp; After the "equal" sign, you need to specify the path to the folder in which the information about sessions will be stored (it is important that the folder already exists)

session.use_cookies = 1; Allows the use of cookies in sessions

session.name = PHPSESSID; Indicates to use as the session name and session cookie - session ID

session.cookie_lifetime = 0; Session lifetime ("0" means that the session lives until the browser window is closed)

session.use_trans_sid = 1; If the user has disabled the cookie, then the session ID will be added to all links

Dynamic extensions

extension = modulename.extension; Can be used to load external modules. For Windows systems, they usually write - extension = msql.dll, and for
UNIX - extension = msql.so

Working with MySQL modules

mysql.allow_persistent = On; Allows persistent MySQL connections.

Mysql.max_persistent = -1; Sets the maximum number of persistent MySQL connections. If you specify -1, it means that there are no restrictions.

Mysql.max_links = -1; Specifies the maximum number of persistent MySQL connections and unstable ODBC connections. If you specify -1, it means that there are no restrictions.

Mysql.default_port =; Port for mysql_connect function.

Mysql.default_socket =; The socket name for local MySQL connections.

Mysql.default_host =; The hostname for the mysql_connect function.

Mysql.default_user =; Username.

Mysql.default_password =; Password.

If you created your own php.ini file and placed it in the site folder

In this case, for security reasons, you need to block access to it for everyone except you. To do this, you need to write the following code in the .htaccess file:


order allow, deny
deny from all

But be careful, as with these settings, all directives (php_value, php_flag, etc.) concerning php settings via the .htaccess file will stop working (a 500 Internal Server Error will be generated).

Important! If you create your own php.ini file, then it will only affect the directory in which it is located.

At htmlAcademy and I work as a mentor on it. Within the framework of the intensive, students will have to raise the working environment and this note is aimed at simplifying this difficult task for a beginner. There are different ways to bring up a full-fledged LAMP stack, but we will go the classic way. Let's configure all the components separately (without using ready-made combines) and start with PHP (there will definitely be a note considering ready-made LAMP assemblies). Since I plan to work as mentors on PHP intensives and beyond, I am going to write similar instructions for review in other OS (Linux, macOS). As they say, it's better to sweat once, but then it will become easier for everyone. So let's get started.

Download PHP for Windows

Go to the official website and download the current PHP version. At the time of this writing, this is - 7.1.4 ... There are several distributions available on the page. I have Windows 7 x64, so I choose a zip archive with VC14 x64 Thread Safe.

Please note that there are two distribution options available for download: Thread-Safe (TS) and Non-Thread-Safe (NTS)... The choice depends on how you plan to use the interpreter. TS is recommended for a single web service process (for example, configuring via mod_php for Apache). NTS is recommended for use by IIS (Internet Information Service) and alternative to FastCGI web server (for example, Apache with FastCGI module) and command line.

Install PHP 7.1

Let's start preparing PHP for comfortable work from the command line. In the previous step, you downloaded the PHP distribution archive. Unlike most programs, PHP comes in a simple archive, not an installation package. Therefore, you will have to extract the files yourself to any directory convenient for you. I prefer to store this sort of thing at the root of the system drive. Create a directory in the root of the "C:" drive (or any other location) Php and extract the contents of the downloaded archive into it.

A lot of files will appear in the directory, but we are most interested in:

  • go-pear.bat- script for installing PEAR. You can read more about PEAR in the official documentation.
  • php.exe- allows you to execute PHP scripts from the console;
  • php-win.exe- allows you to execute PHP scripts without using the console;
  • php-cgi.exe- required to execute PHP code in FastCGI mode;
  • php7apache2_4.dll- module for integration with the Apache 2.4.X web server;
  • phpdbg.exe- debugger;
  • php.ini-development- an example of a PHP configuration file for the development environment
  • php.ini-production- an example of a PHP configuration file for a production environment

We connect the configuration file

We have the unpacked distribution kit, we will include the configuration file for it. We are going to do experiments, so we will take as a sample php.ini-development... Make a copy of this file to your php directory ( C: \ php) With name php.ini. IMPORTANT! Make exactly a copy, not a simple rename. During development, you may need to change the configuration file and there is every chance of making a mistake that will be difficult to detect.

In such cases, there is nothing better than returning to the reference setting. In our case, it will be enough to repeat copying the file php.ini-development v php.ini... So, at the end of the gestures, the php.ini file should appear in the php directory. In further notes, we will definitely talk about its contents in more detail.

Testing PHP from the command line

At this step, the so-called "installation" is completed. Open your console ( cmd.exe, the shortcut is available in the "Standard" menu) and enter the command:

C: \ php \ php.exe --version

The result will be something like this:

PHP 7.1.4 (cli) (built: Apr 11 2017 19:54:37) (ZTS MSVC14 (Visual C ++ 2015) x64) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998 -2017 Zend Technologies

The result confirms that PHP is working. For example, try to create a new script file (I created a file “test.php” right in the root of the “C:” drive) and put the text in it:

Now try executing this file and see the result:

C: \ php \ php.exe –f test.php

Function phpinfo () displays PHP configuration information in a convenient way. We'll talk about this function later.

Making php.exe easier to access

PHP is ready to work, but you must admit that it is rather inconvenient to drive the path to the php interpreter into the console every time. To make our life easier, let's make some small changes to the environment variables. Run the applet in the control panel "System"(or just press the hotkey Windows + Pause Break... Then click on the button "Change parameters"... In the window that appears "System properties", go to the bookmark "Additionally"... Find and click on it button "Environment Variables".

Find a variable in the list "PATH" and press the button "Change", a window for editing a variable will appear. In the "Variable value" field, we need to add the path to the directory with PHP. Go to the very end of the line and specify the path to the directory with PHP separated by semicolons: C: \ php;

Everyone, click "Ok". Now reboot the system (alas, you have to). After restarting Windows, you can access PHP simply: php. For example, to display the version name, just write:

Php –version

And to interpret the file test.php located at the root of the "C:" drive:

Php –f C: \ test.php

Or even launch the built-in web server:

Php -t C: \ -S 127.0.0.1:8888 Listening on http://127.0.0.1:8888 Document root is C: \ Press Ctrl-C to quit.

For testing, open a web browser and try to visit http://127.0.0.1:8888/test.php. Note that after the parameter –T we specify the path to the directory that will become the root directory of the web server. All scripts located in this folder will be available for request from the client. I have one file on the "C:" drive 1.php and that's what I'm asking for.

Assoc .php = phpfile ftype phpfile = "C: \ php \ php.ee" -f "% 1" -% ~ 2

A little more about environment variables

Now let's talk about how PHP will look for the configuration settings file (remember about php.ini). The documentation provides a complete search chain. To avoid unnecessary complications, I recommend immediately adding a new one to the environment variables - PHPRC and specify the path to the directory with the configuration file as the value. My config is located in the same directory as the main php files, therefore I specify as the value of the variable -

"C: \ php". After making the change, a reboot is required.

That's all for me. The first part of the beginner's manual is ready.

And today we will talk about PHP installation... As with Apache, there is nothing difficult here. If you are the first time to have installing and configuring PHP on your local machine, you will find it helpful to read this manual with pictures. If you are already a seasoned bison in these matters, then you can safely skip this post.

So, if you are reading this post, then either you are installing PHP for the first time, or you have questions / problems while installing or configuring PHP. I will try to describe this process in as much detail as possible.

First, we need a distribution with the most recent PHP version. It can be downloaded from the official site - www.php.net (9.5 Mb).

Download the distribution kit to your computer, choosing the mirror that is geographically closest to you

We extract the contents of the archive into a folder C: / php5... Again, if you are installing the Apache -PHP-MySQL bundle for the first time, I recommend installing it using the paths I indicated.

So in C: / php5 you should have the following:

PHP installation is complete, now we will configure it.

Rename the file php.ini-recommended v php.ini:

  • select the file
  • press F2
  • remove -recommended
  • press Enter.

Now let's open the file in notepad and do PHP setting... The file contains quite a lot of PHP settings, but we don't need them now. We will only do some basic configuration that will allow us to run PHP on our local machine.

A little about the description format in the settings file

The ';' symbol means that the lines are commented out (they will not be counted). For instance:

; ignore_user_abort = On

As you may have noticed, the settings are divided into groups, for the convenience of searching through the file. For example, resource limit control settings:

;;;;;;;;;;;;;;;;;;;;;;
; Resource Limits;
;;;;;;;;;;;;;;;;;;;;;;

max_execution_time = 30; Maximum execution time of each script, in seconds.
max_input_time = 60; Maximum amount of time each script may spend parsing request data
; max_input_nesting_level = 64; Maximum input variable nesting level
memory_limit = 128M; Maximum amount of memory a script may consume (128MB).

Format for describing parameters and their values:

variable_name = its_value

Configuring PHP modules.

Find a section Dynamic Extensions(dynamic extensions). There is a fairly large list of PHP modules:

; extension = php_bz2.dll
; extension = php_curl.dll
; extension = php_dba.dll
; extension = php_dbase.dll
; extension = php_exif.dll
; extension = php_fdf.dll
; extension = php_gd2.dll
; extension = php_gettext.dll
; extension = php_gmp.dll
; extension = php_ifx.dll
; extension = php_imap.dll
; extension = php_interbase.dll
; extension = php_ldap.dll
; extension = php_mbstring.dll
; extension = php_mcrypt.dll
; extension = php_mhash.dll

; extension = php_ming.dll
; extension = php_msql.dll
; extension = php_mssql.dll
; extension = php_mysql.dll
; extension = php_mysqli.dll
; extension = php_oci8.dll
; extension = php_openssl.dll
; extension = php_pdo.dll

; extension = php_pdo_mssql.dll
; extension = php_pdo_mysql.dll
; extension = php_pdo_oci.dll
; extension = php_pdo_oci8.dll
; extension = php_pdo_odbc.dll
; extension = php_pdo_pgsql.dll

; extension = php_pgsql.dll
; extension = php_pspell.dll
; extension = php_shmop.dll
; extension = php_snmp.dll
; extension = php_soap.dll
; extension = php_sockets.dll
; extension = php_sqlite.dll
; extension = php_sybase_ct.dll
; extension = php_tidy.dll
; extension = php_xmlrpc.dll
; extension = php_xsl.dll

When each module is connected, it takes up a certain amount of operating memory. For work, we will connect only those modules that we definitely need, and the rest can be connected as needed.

In order to connect the module, you need to remove the symbol ';' before the line. This will uncomment the line and the module will be used.

Let's connect the PHP extension for working with graphics - php_gd2.dll(we will need it in the future).

In order for PHP to be able to find where the extensions are, we will indicate the path to them. Add the following line before or after connecting extensions. As a result, you should get the following:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension = modulename.extension
;
; For example, on Windows:
;
; extension = msql.dll
;
; ... or under UNIX:
;
; extension = msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.

; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions / (PHP 4) ext / (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

extension_dir = "C: / php5 / ext"

; extension = php_bz2.dll
; extension = php_curl.dll
; extension = php_dba.dll
; extension = php_dbase.dll
; extension = php_exif.dll
; extension = php_fdf.dll
extension = php_gd2.dll
; extension = php_gettext.dll
; extension = php_gmp.dll
; extension = php_ifx.dll
; extension = php_imap.dll
; extension = php_interbase.dll
; extension = php_ldap.dll
; extension = php_mbstring.dll
; extension = php_mcrypt.dll
; extension = php_mhash.dll
; extension = php_mime_magic.dll
; extension = php_ming.dll
; extension = php_msql.dll
; extension = php_mssql.dll
; extension = php_mysql.dll
; extension = php_mysqli.dll
; extension = php_oci8.dll
; extension = php_openssl.dll
; extension = php_pdo.dll
; extension = php_pdo_firebird.dll
; extension = php_pdo_mssql.dll
; extension = php_pdo_mysql.dll
; extension = php_pdo_oci.dll
; extension = php_pdo_oci8.dll
; extension = php_pdo_odbc.dll
; extension = php_pdo_pgsql.dll
; extension = php_pdo_sqlite.dll
; extension = php_pgsql.dll
; extension = php_pspell.dll
; extension = php_shmop.dll
; extension = php_snmp.dll
; extension = php_soap.dll
; extension = php_sockets.dll
; extension = php_sqlite.dll
; extension = php_sybase_ct.dll
; extension = php_tidy.dll
; extension = php_xmlrpc.dll
; extension = php_xsl.dll
; extension = php_zip.dll

We save the changes we made. For the settings we made to apply, you need to restart Apache.

Installing and configuring PHP completed!

As you can see, nothing complicated. If in the process of work you need other extensions, just uncomment the line with the extension you need (similar to php_gd2.dll) and restart Apache.

In the next post, I'll show you how to get PHP and Apache working together.