Some PHP + MySQL configuration [转]

xiaoxiao2021-03-06  21

[Repost]

I have written in the tutorial, and most of them come from other people's tutorials. However, here is introduced to the experience in integrating my summary. --introduction

The execution rate of PHP is obightly, this is also one of the reasons I like it, and it is called a wonderful partner, and Apache wants to integrate, and it is not marvelous. PHP updates are also very fast, here is the current latest version php4.3.2rc4 (almost no bug, estimated that this short-term post-official version is out), and the latest version of MySQL4.0.13 installation process.

PHP installation file can be downloaded directly to http://www.php.net/ download, get the for Win32.zip package (5.8M) mysql installation file can be directly to http://www.mysql.com/ download, get For Win32 .zip package, if you want to experience Apache and PHP's cooperation effect, please give up IIS, please go to http://www.apache.org/ to download the latest for Win31's.msi installation package, the latest version is 2.0 .45. In addition, you can download Zend Optimizer to accelerate PHP. Specific can be accessed http://www.zend.com/

<1> Installation Configure PHP 1. Unzip the PHP compression package to C: / PHP (this path can be casual, but you should use this path, please modify it). 2. Copy all files under the PHP4TS.DLL and C: / PHP directory in the C: / PHP / DLLS directory, in the Windows system folder, the file clips are different from the Windows version, if it is Windows 9X / ME, C: / Windows / System If the Windows NT / 2000 is C: / Winnt / System32 If Windows XP / Server 2003 is C: / Windows / System32 where C: / For your current operating system, If your current operating system is not installed under C: / Windows, please make a modification. Copy php.ini-dist to C: / Windows / (XP / 2003 / 9X / ME) or C: / WinNT / (2000 / NT) and rename it to php.ini. Use Notepad to open, modify the information: Search for extension_dir = ./ this line, point your path to the extensions directory under your PHP directory, such as: extension_dir = c: / php / extensions If you want to support more modules, please Next, if you don't want it, you can save the php.ini file directly. There are many support modules that PHP, but some DLLs are not free, so they do not release with the PHP's compression package, but there are many in the DLLS folder. Just now we have copied them to the System32 folder, now we test how many modules it supports.

The following is the result I test, for reference only, if the installation is completed, the XXX.dll module is not supported, the front semicolon plus it directly, search:; windows extensions; Note That mysql and odbc support is now BUILT IN, SO NO DLL IS NEEDED for IT .; Below the next announcing the supported extension module, if you want PHP to support a module, please remove the front ";", you are me after the test results, the following is generally no problem as to remove the rear Note: extension = php_bz2.dllextension = php_cpdf.dllextension = php_crack.dllextension = php_curl.dllextension = php_db.dllextension = php_dba.dllextension = php_dbase.dllextension = php_dbx.dllextension = php_domxml.dllextension = php_exif.dllextension = php_fdf.dllextension = php_filepro.dllextension = php_gd2.dllextension = php_gettext.dllextension = php_hyperwave.dllextension = php_iconv.dll; extension = php_ifx.dll; extension = php_iisfunc.dllextension = php_imap.dllextension = php_interbase. dllextension = php_java.dllextension = php_ldap.dllextension = php_mbstring.dll; extension = php_mcrypt.dllextension = php_mhash.dllextension = php_mime_magic.dllextension = php_ming.dllextension = php_mssql.dllextension = php_msql.dll; extension = php_oci8.dllextension = php_openssl.dll; EXTENSION = php_oracle.dllextension = php_pdf.dll extension = php_pgsql.dll; extension = php_printer.dllextension = php_shmop.dllextension = php_snmp.dllextension = php_sockets.dll; extension = php_sybase_ct.dllextension = php_w32api.dllextension = php_xmlrpc.dllextension = php_xslt.dllextension = php_yaz.dllextension = php_zip.dll Review After completing, save php.ini to complete the installation and configuration of PHP.

<2> Mysql installation MySQL is relatively independent, this database is small, can not be operated directly, unlike Access or SQL2000, but there are already many software can do it well, such as PHPMYADMIN, mysqlcc. These software can be downloaded from http://www.mysql.com/, which is not described in detail here. After downloading the mysql for Win32 installation package, use Winzip to run setup.exe, you need to note that you choose a installation path, of course, the installation path can be arbitrary, but I suggest that it is installed with PHP, select C: / Mysql directory. The mysql is completed after the installation is complete. As for setting up users and passwords, you can manage it using the two software mentioned above. This is not described here. The default username is root, the password is empty. Generally, after mysql, it will start the service. If you don't start, please run the C: /Mysql/bin/mysqld-nt.exe to see what you choose as your web server, I suggest it use Apache, if you feel conflict with your IIS, please use IIS directly.

<3> IIS configuration: Open IIS, right-click on "Default Web Site" to open the property, do the settings in the following figure in the primary directory, pay attention to the steps:

After completion, IIS PHP MySQL environment is established.

<4> If you don't have IIS, then we installed this compact web server: We downloaded for Win32 is an MSI installation file, directly double-click it, will automatically execute Apache installation, follow the prompt installation, The things you have to write, fill in your preference, there is no impact, of course, the directory I still suggest you and the PHP directory, select the C: / directory, you can see C: / Apache2 after installation. After loading, you will display the Apache icon in the upper right corner system tray. Double-click to open the Apache control panel, you can stop or restart the server. What you have to do this is to modify the file of c: /apache2/conf/httpd.conf, open: Find: #namevirtualhost * Modified to: NameVirtualHost 127.0.0.1 Find: Modify the following lines : ServerAdmin (installed when you just entered administrator mailbox) DocumentRoot c: / Apache2 / htdocsServerName Apache2ErrorLog c: / Apache2 / logs / error_logCustomLog c: / Apache2 / logs / access_log common found: AddType application / x-tar .tgz Add the following two lines below: addtype application / x-httpd-php .phpaddtype image / x-icon .ico Find: #LoadModule SSL_Module Modules / Mod_ssl.so Added a line: loadingModule PHP4_Module C: / PHP / SAPI / PHP4APACHE2.DLL Add Default: Find DirectoryIndex * This line can be modified, add the default file name: DirectoryIndex index.php default.php index.htm index.html default.htm default.html Save File, restart the Apache server. The environment where this PHP has been fully established.

<5> Zend Optimizer installation (can not be installed) After downloading is a .exe's file, you can install it directly, the installation process wants you to choose a PHP version, you must choose accurate, here I choose PHP 4.3.x to complete the installation Previously prompted whether to back up the php.ini, the point was configured to end the installation. Open php.ini, modify a place: Find: [Zend] You can see: Zend_optimizer.optimization_Level = * This line will change = after the value is changed to 1023, that is, change this line to zend_optimizer.optimization_level = 1023 After saving Just OK, restart APACHE / IIS, and the installation is all over. I am also very tired :)

<6> Test: Use Notepad to create a new file, write down the following line, save it to the c: / apache2 / htdocs directory, this directory is your site with the directory, named phpinfo.php. Then enter in the browser Http://localhost/phpinfo.php You can see the information about PHP. Code

PHPINFO ();

?>

You need to note that when you save the file, the file's suffix name should be .php. (Notepad will automatically add a .txt suffix after the file name, unless you take one of the following actions.) When you save the file, the system will make you specify the file name, please The file name plus quotation marks. (For example, "Hello.php".) Or you can also click the "Save Type" drop-down menu in the save dialog and change the settings to all files. This way you don't have to quotes when you enter the file name. The above words are taken from the "PHP Chinese Manual", more detailed installation information, please download this Chinese manual to http://www.php.net/docs.php, there are various systems for different systems, but not very intuitive And some optimizations have not been written :) Let's give a few download addresses for the software you want to use: PHP4.3.1 Stability Version: http://www.blueidea.com/download/forum/php-4.3. 1-WIN32.ZIP

MySQL4.0.13 Stable Version: http://www.blueidea.com/download/forum/mysql-4.0.13-win.zip

Apache2.0.45 Stable Version: http://www.blueidea.com/download/forum/apache_2.0.45-win32- x86-no_ssl.msi

Zend Optimizer: http://www.blueidea.com/download/forum/zendoptimizer-2 [1] .1.0a-windows-i386.exe

In addition, PHP4.3.2RC4 contains PEAR packages, and there is no in php4.3.1. If you have any words you download, you set the include path in php.ini, find the following two lines:; Windows: " / Path1; / path2 "; include_path =".:; windows: "/ path1; / path2" include_path = "c: / php / pear" save, this is the PHP's included file Path, you can set multiple, use ";".

Note: This article is inevitably there is a mistake, and Wan Wang pointed out, and I hope to help my friends who like PHP. Reprint, please contact me: kim@showtop.net

Note: This article is the original article, copyright belongs to the author and exceeding the PHP website, and no commercial reprint is prohibited without this site. Non-earning websites and personal websites reproduced please indicate the source, thank you for your cooperation!

转载请注明原文地址:https://www.9cbs.com/read-40115.html

New Post(0)