Apache PHP MySQL

xiaoxiao2021-03-06  38

http://blog.9cbs.net/arcow/archive/2004/09/29/121117.aspx

http://www.phpv.net/Article.php/320

-------------------------------------------------- -------------------------------------------------- ------- First from all official websites apache2.0.51, php5.01, mysql4.0.20, phpMyadmin2.57

Apache_2.0.51-win32-x86-no_ssl.msi ------ http://www.apache.orgphp-5.0.1-win32.zip --------- http://www.php .NETMYSQL-4.0.20D-win.zip --------- http://www.mysql.orgphpmyadmin-2.5.7.zip --------- this to the sky download station go to Faster

Due to timeliness, you may have a higher version when you watch the stickers, but if there is no special instructions, the installation method is the same.

-------------------------------------------------- -------------------------------------------------- ---------

Suppose: The system disk is c: / assumption: put all things in the PHP directory under the D disk, assuming: After installation, the directory status will be like this: Apache ---------------- -----------> D: / PHP / Apachemysql ---------------------------> D: / PHP / mysqlphp -----------------------------> D: / PHP / PHP web file ---------- --------------> D: / PHP / WWW, these are my preferences, you can change your favorite

The first step is installed mysql4.0.20d (first name, the configuration of this article does not apply to MySQL4.1 and MySQL5.0)

If you download the non-installed MySQL compression package, you can download it directly to the specified directory (D: / PHP / MySQL), then double-click D: /PHP/Mysql/bin/winmysqladmin.exe, please enter the initial user of Winmysqladmin , Password (Note: This is not the user, password in MySQL, the password) will not be careless. Determine your lower right corner task The startup bar will appear an icon of the traffic light, the red light is on behalf of the service stop, the green light is normal, left Create this icon -> winnt-> install the service Install this service and click this icon -> Winnt-> Start The Service launches MySQL service

Modify the root password of the mysql database with cmd to enter the life. This line mode input is as follows: (Note: D: / php / mysql is mysql installation directory) CD D: / php / mysql / binmysqladmin -u root -p password 123456 Enter there ENTER Password: (Note: This is called you to enter the original password. The password is empty when you just install it, so you will be transferred directly.) At this time, the password of the account root in mysql is changed to 123456 installation.

If you download the credit package, double-click the setup.exe file directly after you decompressed, follow the habit of installing the software, please write D: / PHP / MySQL installed when you choose the path. After opening the D: / PHP / MySQL / BIN / folder, double-click the winmysqladmin.exe file, will pop up a window, ask your Mysql service administrator username password.

There are two ways to see it. Tip: MySQL current state, the red light is on behalf of the mysql service stop, the green light is normal.

Step 2: Install Apache and configure support PHP

Click the installation file Apache_2.0.51-win32-x86-no_ssl.msi to install Apache in the D: / PHP / Apache directory will also have input boxes, prompt to enter domain name management mailbox, just fill it. ---- ------------------------------------------------- | Note: Apache service is automatically installed and started after installation, as you have problems here: | "(OS 10048) Usually per socket address (protocol / network address / port) is only allowed once: | make_sock: Could Not Bind To Address 0.0.0.0:80 ... "General IIS occupies 80 ports | Solution: Open Control Panel -> Services find IIS Admin Service Close and Disable | and use CMD to enter the command line mode to enter You install Apache's directory / Apache2 / bin | Enter | Apache -k install | Apache -k start | If successful, then do the following! ----------------- ------------------------------------------- PHP-5.0. 1-WIN32.ZIP is extracted to D: / PHP / PHP

Find the php.ini-distth in the PHP catalog (seemed this is a habit, in fact, I prefer to use php.ini-recommented) to rename PHP.ini and copy it to the Windows system directory (special situation: Win2k system directory is WinNT As my php.ini is copy to the c: / windows directory, copy the php5ts.dll, libmysql.dll in the PHP directory (System / System32), if me is C: / Windows / SYSTEM

Configure httpd.conf in Apache

Open d: /php/apache/conf/httpd.conf this file

Find AddDefaultCharset ISO-8859-1 to change it to

AddDefaultCharset GB2312 (Let the default language to encode Simplified Chinese)

Find DocumentRoot "D: / PHP / Apache2 / HTDOCS" to change it to your web directory, such as my

DocumentRoot "D: / PHP / WWW"

Find DirectoryIndex index.html index.html.var Add index.htm index.php back (default index.php as homepage)

Select Installation Mode: Modular mode installation or CGI mode installation (optionally)

-------------- Modular installation configuration ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- Find #LoadModule SSL_Module Modules / MOD_SSL.SO this line, add a line after this trip

LoadModule PHP5_MODULE D: /PHP/PHP/php5apache2.dll

Where d: / php/php/php5apache2.dll is the location of php5apache2.dll in your php directory

Find this line, add a line after this line is added after this trip.

AddType Application / X-httpd-php .php

(In fact: two lines of red, you can add it directly on the last side of the httpd.conf file) ------------------------- -------------------------------------------

-------------- CGI installation configuration -------------------------------- ------------

Locate AddType Application / X-Gzip .gz .tgz, add Scriptalias / PHP / "D: / PHP / PHP" AddType Application / X-httpd-php .phpaction application / x-httpd-php "/ PHP / php-cgi.exe "

-------------------------------------------------- -----------------

At this point, the PHP environment is basically configured to build a name Test.php in the web root directory (such as my D: / PHP / WWW) (prompt: with a notepad friend, please avoid the file as Test.php.txt) The file content is as follows: Restart Apache service Browser Open http: //localhost/test.php If you can see the PHP configuration output information is OK (if you see Is it a download page or , Please check if you have a wrong leak on it)

Third, configure php.ini and test mysql (php.ini) PHP.INI under C: / Windows)

Found extension_dir = "./" change

Xtension_dir = "d: / php / php / ext"

Find; extension = php_mysql.dll will ';' remove it.

EXTENSION = php_mysql.dll

Find; session.save_path = "/ tmp" will ';' remove. Set the directory of the session, such as

Session.save_path = "c: / windows / temp";

Restart the Apache service In the web root directory (such as D: / PHP / WWW) to establish TESTDB.PHP file content as follows: PHP code: Open http with your browser: //localhost/testdb.php If the output surcesss is OK

Fourth, PHPMYADMIN installation configuration

Different phpMyadmin-2.5.7.zip to the web root directory (D: / PHP / WWW / in), rename folders to phpMyAdmin or other config.inc.php in the phpMyadmin directory (I have " Changed):

$ cfg ['pmaabsoluteuri'] = 'http: // localhost / phpMyadmin';

$ cfg ['Servers'] [$ I] ['User'] = 'root';

$ cfg ['Servers'] [$ I] ['password'] = '123456'; // Fill in your MySQL user and password,

$ cfg ['servers'] [$ I] ['auth_type'] = 'http'; // This can also be changed to cookie

Change the saved, open http: // localhost / phpMyAdmin to enter your username and password in the browser, you can manage mysql.

Almost, if you want your PHP code to execute faster, then install a zend Optimizer. Method is to select the path installation. Ask the PHP.ini path to fill in C: / Windows

Install a restart Apache service. Take later http: //localhost/test.php should see more things with Zend Extension Manager v1.0.3, Copyright (C) 2003-2004, by Zend Technologieswith Zend Optimizer V2.5.3, Copyright (c) 1998-2004, by Zend Technologies

-------------------------------------------------- -------------------------------------------------- It's roughly this. Postscript: There is a friend, install it with CGI, will not load php_mysql.dll, the solution is to modify the found extension_dir = "in php.ini" ./ "change to extension_dir =" D: / PHP / EXT "

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

New Post(0)