Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

Full Install Web Server on Windows Server 2008 R2 with PHP, MySQL, PHPMyAdmin

thanhdc

Super Moderator
Joined
Aug 10, 2014
Messages
124
Reaction score
3
Points
18
Tổng quan:

[TABLE="class: grid, width: 800"]
[TR]
[TD]IIS 7.5 + CGI (Windows Server 2008 R2)
PHP 5.5.17-nts-Win32-VC11-x64 (enable extension: gd2, mbstring, mysql, mysqli, ldap)
MySQL 5.5.28 Win64x
phpMyAdmin-4.2.9-english

[/TD]
[/TR]
[/TABLE]


I. Install IIS 7.5











II. Configuring PHP


Nên sử dụng bản PHP non thread safe
Để chạy được PHP cần cài Visual C++ Redistributable for Visual Studio 2012 x86 or x64






copy php.ini-production → php.ini


[TABLE="class: grid, width: 800"]
[TR]
[TD];fastcgi.impersonate = 1 ==> fastcgi.impersonate = 1
;cgi.force_redirect = 1 ==> cgi.force_redirect = 0
;extension_dir = "ext" ==> extension_dir = "C:\PHP\ext"
;date.timezone = ==> date.timezone = "Asia/Ho_Chi_Minh"
http://www.date-default-timezone-set.com/

[/TD]
[/TR]
[/TABLE]


Config Environment Variables











[TABLE="class: grid, width: 800"]
[TR]
[TD]PHPMyAdmin cần enable những mod sau:
MySQL | extension=php_mysql
extension=php_mysqli

GD | extension=php_gd2.dll
MBSTRING | extension=php_mbstring.dll[/TD]
[/TR]
[/TABLE]




Config Default Document
Add: index.php

 
Last edited:
III. Install MySQL


















































Config Tự động khởi động lại service MySQL khi bị lỗi…

Run Services.msc MySQL




 
Last edited:
IV. Install PhpMyAdmin
















;session.save_path = "N;/path" ==> session.save_path = "C:\temp\phpsessions"







Config tới đây là có thể sử dụng PHPMyAdmin,
để OK hơn thì config thêm 1 chút nữa...




[TABLE="class: grid, width: 800"]
[TR]
[TD]
C:\SVUIT> mysql -u root –p
Enter password: ******

[/TD]
[/TR]
[TR]
[TD]
mysql> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass';

[/TD]
[/TR]
[TR]
[TD]
mysql> GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';

[/TD]
[/TR]
[TR]
[TD]
mysql> GRANT SELECT ON mysql.db TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.host TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.tables_priv TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.user TO 'pma'@'localhost';

[/TD]
[/TR]
[TR]
[TD]
mysql> source C:\inetpub\wwwroot\phpMyAdmin\examples\create_tables.sql
(hoặc mysql> \. C:\inetpub\wwwroot\phpMyAdmin\examples\create_tables.sql
hoặc C:\SVUIT>mysql -u root -p < C:\inetpub\wwwroot\phpMyAdmin\examples\create_tables.sql
Enter password: ****** ko xuất info, dùng khi import file dữ liệu lớn)
mysql> GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@'localhost';

[/TD]
[/TR]
[/TABLE]



 
Last edited:
Top