When learning PHP, you may encounter PHP configuration problems. Here we will introduce the solutions to the PHP configuration problems, and share them with you here.
1. All files in the unzipped php-4.3.6-installer are made to the C: php folder.
2,PHPConfiguration
(1) There is a main PHP configuration file in the file package distributed with PHP. INI-dist copy it to your Windows System directory (Windows 9x Windows or Windows NT WinNT directory) and change it to PHP. INI. You need to make proper modifications to this file. The most important thing is to add modules that may be used, such as adding MySQL support.
(2) modify; extension = php_msql.dll remove the ";" sign from the front to make it valid
(3) Modify extension_dir =./to your PHP3 installation directory, for example, extension_dir = c: php
(4) Remove the annotator of upload_tmp_dir, that is, the semicolon ";", to make the line play a role in the php. ini document.
(5) What database support do you need? Find here:
- ;Windows Extensions
- ;extension=php3_mysql.dll
- ;extension=php3_calendar.dll
- ;extension=php3_dbase.dll
- ;extension=php3_gd.dll
- ;extension=php3_dbm.dll
- ;extension=php3_mssql.dll
- ;extension=php3_zlib.dll
- ;extension=php3_filepro.dll
- ;extension=php3_imap4r1.dll
- ;extension=php3_ldap.dll
- ;extension=php3_crypt.dll
- ;extension=php3_msql2.dll
- ;extension=php3_odbc.dll
Then, based on your own needs, remove the comments in front of the DLL file of the database you want to use, that is, the semicolon ";" in front. For example, if you need MySQL support, you only need to remove the semicolon before extension = php_msql.dll. If the DLL file of the database you are using is not listed here, it doesn't matter. You can add it yourself.
(6) If you want to use PHP to send an email, please find it here:
- SMTP = localhost
- sendmail_from = me@localhost.com
(8) skip this step if your Web server is Omni Httpd. If you use Apache as your Web server, you can set doc_root as the root directory of the Apache server, for example, "c: apache2htdocs" in this example (the installation and configuration of Apache are described in detail in the next section ); if you use PWS as your Web server, you can set the doc_root directory as the default root directory pointing to the PWS server, for example, "c: inetpubwwwroot "(the installation and settings of PWS are described in detail in the next section ). Of course, you can leave it empty without having to do anything.
(9) An insignificant setting: If you use PWS for your Web Server, you can also set browscap. ini and modify it;
3. Questions about Dynamic Link Library
Environment configuration and program running require a dynamic link library, which is crucial