Config PHP and MySQL on Windows XP platform
2008-02-22 18:47
555 查看
1. Instal MySQL database system.
2. Download PHP RAR file package(Note, no install version, :-) ), then decompressing files. Rename php.ini.recommended(or php.ini-dist) to php.ini, copy this file to Windows
directory. Copy php5ts.dll,libmysql.dll to c:/windows/system32. Copy php_gd2.dll,php_mysql.dll,php_mbstring.dll(etc., this files on php5/ext directory) to c:/windows/system32.
3. Config PHP in MySQL.
Edit c:/windows/php.ini, change some lines code:
extension_dir = "C:/php5/ext" // example path
;extension=php_mbstring.dll // delete character ;
;extension=php_gd2.dll // delete character ;
;extension=php_mysql.dl // delete character ;
session.save_path = "N;/path" // add this line in tail : session.save_path = "C:/WINDOWS/Temp"
short_open_tag = On // value set on
display_errors = On // value set on
register_globals=Off // value set on
date.timezone = PRC // People's Republic of China, time zone.
4. Config PHP on IIS or Apache.
5 Test PHP and MySQL
Create two files like the following code.
<?php
// Test PHP
phpinfo();
?>
<?php
// Test access MySQL Database
$host = "localhost";
$user = "root";
$password = "12345";// NOte, You may be change the password !
$link=mysql_connect($host,$user,$password);
if(!$link) echo "<h1>Error!</h1>";
else echo "<h1>OK!</h1>";
mysql_close();
?>
2. Download PHP RAR file package(Note, no install version, :-) ), then decompressing files. Rename php.ini.recommended(or php.ini-dist) to php.ini, copy this file to Windows
directory. Copy php5ts.dll,libmysql.dll to c:/windows/system32. Copy php_gd2.dll,php_mysql.dll,php_mbstring.dll(etc., this files on php5/ext directory) to c:/windows/system32.
3. Config PHP in MySQL.
Edit c:/windows/php.ini, change some lines code:
extension_dir = "C:/php5/ext" // example path
;extension=php_mbstring.dll // delete character ;
;extension=php_gd2.dll // delete character ;
;extension=php_mysql.dl // delete character ;
session.save_path = "N;/path" // add this line in tail : session.save_path = "C:/WINDOWS/Temp"
short_open_tag = On // value set on
display_errors = On // value set on
register_globals=Off // value set on
date.timezone = PRC // People's Republic of China, time zone.
4. Config PHP on IIS or Apache.
5 Test PHP and MySQL
Create two files like the following code.
<?php
// Test PHP
phpinfo();
?>
<?php
// Test access MySQL Database
$host = "localhost";
$user = "root";
$password = "12345";// NOte, You may be change the password !
$link=mysql_connect($host,$user,$password);
if(!$link) echo "<h1>Error!</h1>";
else echo "<h1>OK!</h1>";
mysql_close();
?>
相关文章推荐
- Install and config Apache, PHP, MySql on windows XP
- Install 64bit versions of Apache, PHP and MySQL on Windows 64bit
- How to Install PHP 5 for Iis 6 on Windows Xp and 2003 - wikiHow
- WampServer, the web development platform on Windows - Apache, MySQL, PHP
- Establish a web server [php-mysql-apache] on Windows XP
- Qt 4.5 and MySQL-plugin with Mingw on Windows XP
- How to install and configure Apache, PHP, MySql and phpMyadmin on ubuntu
- Windows XP+Apache 2.2.4+PHP 5.2.0+MySQL 5.0.27+Zend Optimizer 3.2.0环境配置方法(依此参考文献成功安装Apache,Php,mysql)
- How to install Apache, PHP 7.1 and MySQL on CentOS 7.3 (LAMP)
- windows 2000/xp/2003下安裝apache2.2.3 mysql 5.0.22 php 5.2.0
- Microsoft will end OEM and shrink-wrapped sales of Windows XP on June 30, 2008
- Windows XP + Apache 2.2.4 + PHP 5.2 + MySQL 5.0.18 +eclipse3.2+wampp-2.2.zip+HardCore环境配置说明
- Windows 2000/XP/2003下安装配置IIS+PHP+MySQL+Zend Optimizer+GD库+phpMyAdmin
- Windows XP+Apache 2.2.4+PHP 5.3.8+MySQL 5.5.17环境配置方法
- INSTALL NGINX, PHP AND MYSQL ON OS X
- Build boost 1.45 with VC++ 2008 on Windows XP and gcc on Ubuntu
- Setup Apache, PHP, MySQL and WordPress on Mac OS X 10.8.3
- Install Apache, PHP And MySQL On CentOS 7 (LAMP)
- Windows XP + Apache 2.2.4 + PHP 5.2 + MySQL 5.0.18 +eclipse3.2+wampp-2.2.zip+HardCore环境配置说明
- Firefox and Chrome’s WebGL validation on windows XP