Home > Backend Development > PHP Tutorial > Simple installation and configuration of PHP running environment under Win2003_PHP tutorial

Simple installation and configuration of PHP running environment under Win2003_PHP tutorial

WBOY
Release: 2016-07-13 17:30:48
Original
941 people have browsed it


  先从各官方网站下了apache(Unix平台最流行的WEB服务器平台)2.050、php(做为现在的主流开发语言)5、MySQL(和PHP搭配之最佳组合)4.0.20、php(做为现在的主流开发语言)MYADMIN2.57
  
  apache(Unix平台最流行的WEB服务器平台)_2.0.50-win32-x86-no_ssl.msi
  php(做为现在的主流开发语言)-5.0.0-Win32.zip
  MySQL(和PHP搭配之最佳组合)-4.0.20d-win.zip
  php(做为现在的主流开发语言)MyAdmin-2.5.7.zip
  
  操作系统 win2003 系统盘为: D盘
  
  第一步: 安装apache(Unix平台最流行的WEB服务器平台) 并配置支持php(做为现在的主流开发语言)
  点击安装文件apache(Unix平台最流行的WEB服务器平台)_2.0.50-win32-x86-no_ssl.msi
  将apache(Unix平台最流行的WEB服务器平台)安装在 D:apache(Unix平台最流行的WEB服务器平台)2 目录(随自己喜好)下
  将php(做为现在的主流开发语言)-5.0.0-Win32.zip 里内容解压到 D:php(做为现在的主流开发语言)
  找到 php(做为现在的主流开发语言)目录里的 php(做为现在的主流开发语言).ini-dist 重命名为 php(做为现在的主流开发语言).ini 并拷到 windows目录里(win2k 里为winnt)
  如我的php(做为现在的主流开发语言).ini是拷到 D:windows目录
  再将php(做为现在的主流开发语言)目录里的 php(做为现在的主流开发语言)5ts.dll,libMySQL(和PHP搭配之最佳组合).dll 拷到 系统目录(system/system32) 如我的是D:windowssystem里
  
  配置apache(Unix平台最流行的WEB服务器平台)里的httpd.conf
  打开 D:apache(Unix平台最流行的WEB服务器平台)2confhttpd.conf 这个文件
  找到 AddDefaultCharset ISO-8859-1 将其改为 AddDefaultCharset GB2312 (让默认语言编码为简体中文)
  找到 DocumentRoot "D:/apache(Unix平台最流行的WEB服务器平台)2/htdocs" 将其改为你的WEB目录(可不改)如我的为 DocumentRoot "D:/website"
  找到 DirectoryIndex index.html index.html.var 在后面加入 index.htm index.php(做为现在的主流开发语言)
  
  选择安装模式: 模块化模式安装 或 cgi(现在已经不多人在用了)模式安装 (选一样即可)
  
  --------------模块化安装配置------------------------------------
  找到 #LoadModule ssl_module modules/mod_ssl.so 这行,在此行后加入一行
  LoadModule php(做为现在的主流开发语言)5_module d:/php(做为现在的主流开发语言)/php(做为现在的主流开发语言)5apache(Unix平台最流行的WEB服务器平台)2.dll
  其中d:/php(做为现在的主流开发语言)/php(做为现在的主流开发语言)5apache(Unix平台最流行的WEB服务器平台)2.dll 为你php(做为现在的主流开发语言)目录中php(做为现在的主流开发语言)5apache(Unix平台最流行的WEB服务器平台)2.dll所在的位置
  找到 AddType application/x-gzip .gz .tgz 这行,在此行后加入一行
  AddType application/x-httpd-php(做为现在的主流开发语言) .php(做为现在的主流开发语言)
  ---------------------------------------------------------------
  
  --------------cgi(现在已经不多人在用了)安装配置--------------------------------------
  找到 AddType application/x-gzip .gz .tgz 这行,加入如下即可
  ScriptAlias /php(做为现在的主流开发语言)/ "d:/php(做为现在的主流开发语言)/"
  AddType application/x-httpd-php(做为现在的主流开发语言) .php(做为现在的主流开发语言)
Action application/x-httpd-php(as the current mainstream development language) "/php(as the current mainstream development language)/php(as the current Mainstream development language)-cgi(not many people are using it now).exe"
 ------------------ ------------------------------------------
 
At this time, php(as the current mainstream development language)environment has basically been configured successfully
Create a file named test.php in the WEB root directory (such as my D:website) (As the current mainstream development language) The file content is as follows
  echo php echo php(As the current mainstream development language)info(); ?>
Restart apache (The most popular WEB server platform on Unix platform)Service
Use a browser to open http://localhost/test.php(as the current mainstream development language)
If you can see php (as the current mainstream development language) the configuration output information is OK

The second step is to install MySQL (best paired with PHP The best combination)
Install MySQL(the best combination with PHP) to the specified directory, for example, mine is d:/MySQL(the best combination with PHP) Best combination) If you downloaded the non-installed MySQL (the best combination with PHP) compressed package, just unzip it directly to the specified directory
Then click D:MySQL (The best combination with PHP) inwinMySQL(The best combination with PHP)admin.exe file in which D:MySQL(The best combination with PHP ) is your MySQL(The best combination with PHP)Installation directory
Enter winMySQL(The best combination with PHP)admin’s initial user, Password (Note: This is not the user and password in MySQL (the best combination with PHP) ). Fill it in casually, don’t worry
. After confirmation, a traffic light will appear in the launch bar of your task in the lower right corner. icon, the red light means the service is stopped, the green light means the service is normal, left-click the icon->winnt->install the service Install the service
And then left-click the icon->winnt->start the service Start MySQL(The best combination with PHP)Service
 
Modify MySQL(The best combination with PHP)The root password of the database
Use cmd Enter the command line mode and enter the following command: (Note: d:MySQL(The best combination with PHP) is the MySQL(The best combination with PHP) installation directory)
 cd d:MySQL(The best combination with PHP) in
 MySQL(The best combination with PHP)admin -u root -p password 123456
 Press Enter to appear
Enter password: (Note: This is asking you to enter the original password. The password was blank when it was first installed, so just press Enter)
At this time MySQL(and PHP The best combination) The password of the account root is changed to 123456. The installation is completed
 
 3. Configure php (as the current mainstream development language) .ini And test MySQL(the best combination with PHP)(php(as the current mainstream development language).ini is d:php under windows(as The current mainstream development language).ini)
Find extension_dir = "./" and change it to extension_dir = "d:/php(as the current mainstream development language)/ ext"
Find
;extension=php(as the current mainstream development language)_MySQL(the best combination with PHP).dll

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509144.htmlTechArticleFirst download apache (the most popular WEB server platform on Unix platform) 2.050, php (as Current mainstream development languages) 5. MySQL (the best combination with PHP) 4.0.20, php (do...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template