Install Apache Dan PHP Pada Windows x64
Install Apache Dan PHP Pada Windows x64
Install Apache Dan PHP Pada Windows x64
Extract ke root folder webserver. Pada kasus ini kita menggunakan lokasi : D:\webserver.
Sekarang terdapat 2 folder yang ada di D:\webserver, yaitu :
- Apache24
- PHP
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
Kemudian Save.
<Directory "d:/webserver/Apache24/htdocs">
Options Indexes FollowSymLinks ExecCGI MultiViews
AllowOverride All
Require all granted
</Directory>
Kemudian Save.
Catatan :
d:/webserver/Apache24/htdocs adalah lokasi penyimpanan halaman website anda nantinya.
Lokasi ini anda bisa ubah sesuai dengan keinginan anda.
Edit file php.ini
Copy file php.ini-production yang ada di folder D:\webserver\PHP dan rename menjadi
php.ini
Edit file php.ini
Mengaktifkan extension :
cari kata dibawah dan hapus symbol ; (titik koma) yang ada didepan kata tersebut.
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_mbstring.dll
;extension=php_exif.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_openssl.dll
;extension=php_pdo_sqlite.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
Kemudian Save.
Catatan :
Pada kasus ini kita menggunakan package Zip Archive bukan Installer MSI.
[client]
port = 3306
socket = "D:/webserver/MySQL/MySQL.sock"
[mysql]
default-character-set=utf8
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port = 3306
socket = "D:/webserver/MySQL/MySQL.sock"
#PID file
pid_file = "MySQL.pid"
# Error Logging.
log-error="mysql_error.log"
#timestamp
explicit_defaults_for_timestamp = TRUE
# The default character set that will be used when a new schema or table is
character-set-server=utf8
<?php
$servername = "localhost"; $username = "root"; $password = "";
// Create connection
$conn = @mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection Failed: " . mysqli_connect_error().'<br/>');
} else {
echo "Connection Succesfull".'<br/>';
}
// Check database
if(!@mysqli_select_db($conn, 'mysql')) {
die('Failed to connect to the Database: ' . mysqli_error($link));
} else {
echo "Database Connected";
}
?>
Edit my.ini, lalu pada bagian tag [mysqld] tambahkan code berikut :
#event scheduler
event-scheduler = On
Catatan :
MySQL 5.6.26 ini mempunya bug innodb.
Adapun bug fixnya silahkan mendownloadnya pada link ini http://bugs.mysql.com/file.php?id=19725
Instalasi phpMyAdmin
Download phpMyadmin :
- phpMyAdmin-4.4.7-all-languages.zip
Edit config.inc.php
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Ubah menjadi $cfg['Servers'][$i]['AllowNoPassword'] = true;
Kemudian Save.
Configurasi Apache
Listen 2082
Kemudian Save.
Edit File httpd-vhosts.conf
<VirtualHost *:2082>
ServerAdmin webmaster@localhost
ServerName localhost:2082
DocumentRoot "d:/webserver/Apache24/htdocs2082"
<Directory />
AllowOverride All
Options None
Require all granted
</Directory>
<Directory "d:/webserver/Apache24/htdocs2082">
Options Indexes FollowSymLinks ExecCGI MultiViews
AllowOverride All
Require all granted
</Directory>
<IfModule php5_module>
AddType application/x-httpd-php .php
Catatan :
2082 bisa anda ubah sesuai dengan keinginan anda.
Install ImageMagick dan Ghostscript
extension=php_imagick.dll
Kemudian Save.