When learning PHP, you may encounter PHP configuration problems. Here we will introduce the solutions to PHP configuration problems and share them with you here.
1. Customize all the files in the decompressed php-4.3.6-installer to the C:php folder
2. PHPConfiguration
(1). There is a main PHP configuration file PHP.INI-dist in the file package distributed with PHP. Copy it to your Windows system directory (Windows 9x Windows or Windows NT WinNT directory) and renamed PHP.INI. This file needs to be modified appropriately. The most important thing is to add some modules that may be used, such as adding MySQL support.
(2), modify;extension=php_msql.dll and remove the ";" number in front to make it valid
(3), modify extension_dir = ./ to your PHP3 installation directory , for example: extension_dir = c:php
(4). Remove the comment character of the line;upload_tmp_dir, that is, the semicolon ";" in front of it, so that this line will work in the php.ini document.
(5). What database support do you need? Find here:
<ol class="dp-xml"> <li class="alt"><span><span>;Windows Extensions </span></span></li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_mysql</font></span><span>.dll </span> </li> <li class="alt"> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_calendar</font></span><span>.dll </span> </li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_dbase</font></span><span>.dll </span> </li> <li class="alt"> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_gd</font></span><span>.dll </span> </li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_dbm</font></span><span>.dll </span> </li> <li class="alt"> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_mssql</font></span><span>.dll </span> </li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_zlib</font></span><span>.dll </span> </li> <li class="alt"> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_filepro</font></span><span>.dll </span> </li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_imap4r1</font></span><span>.dll </span> </li> <li class="alt"> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_ldap</font></span><span>.dll </span> </li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_crypt</font></span><span>.dll </span> </li> <li class="alt"> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_msql2</font></span><span>.dll </span> </li> <li class=""> <span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_odbc</font></span><span>.dll </span> </li> </ol>
Then, according to your own needs, remove the comment character in front of the line of the DLL file of the database you want to use, that is, the semicolon ";" in front of it. For example: If I need MySQL support, I just need to remove the semicolon in front of ;extension=php_msql.dll. If the DLL file of the database you use is not listed here, it doesn't matter, you can add it yourself.
(6) If you want to use PHP to send emails, please find here:
<ol class="dp-xml"> <li class="alt"><span><span class="attribute"><font color="#ff0000">SMTP</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">localhost</font></span><span> </span></span></li> <li class=""> <span></span><span class="attribute"><font color="#ff0000">sendmail_from</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">me</font></span><span>@localhost.com </span> </li> </ol>
(9). A less important setting: If you are using PWS as your Web Server, you can also set browscap.ini and modify it;
3. Questions about the dynamic link library
The configuration of the environment and the operation of the program require the use of the dynamic link library, and it is very important