- kunjungi tags
- download file .exe , .ico , and php.rar
- open file php server V1.exe
- complite file access
- exstrak file php.rar
- Copy patch
C:\Users\User\Downloads\php\php\php.exe
- paste file directory php patch
- enjoyed run file
- Persyaratan Sistem
- Pilihan Server PHP
- Instalasi XAMPP
- Instalasi PHP Built-in Server
- Hosting phpMyAdmin
- Konfigurasi Database MySQL
- Mengakses Server dari Perangkat Lain
- Keamanan Dasar
- Troubleshooting
- Sistem Operasi: Windows, Linux, atau macOS
- RAM minimal: 2GB (4GB disarankan)
- Ruang disk: 500MB (untuk server dasar)
Paket lengkap yang termasuk:
- Apache (web server)
- MySQL/MariaDB (database)
- PHP
- phpMyAdmin
Server bawaan PHP (untuk pengembangan saja):
php -S localhost:8000
- Download XAMPP dari https://www.apachefriends.org
- Jalankan installer dan ikuti petunjuk
- Pilih komponen:
- Apache
- MySQL
- PHP
- phpMyAdmin
- Selesaikan instalasi
sudo apt update
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql phpmyadmin
- Buka XAMPP Control Panel
- Start modul Apache dan MySQL
- Buka browser dan akses http://localhost
Jika Anda hanya ingin server PHP sederhana tanpa Apache:
- Pastikan PHP terinstal (cek dengan
php -v
) - Buat folder project
- Masuk ke folder project dan jalankan:
php -S localhost:8000
- Server akan berjalan di http://localhost:8000
Untuk membuatnya bisa diakses dari jaringan lokal:
php -S 0.0.0.0:8000
phpMyAdmin sudah termasuk dan bisa diakses di http://localhost/phpmyadmin
- Download phpMyAdmin dari https://www.phpmyadmin.net
- Ekstrak ke folder
phpmyadmin
di root web server- Untuk XAMPP:
C:\xampp\htdocs\phpmyadmin
- Untuk Apache di Linux:
/var/www/html/phpmyadmin
- Untuk XAMPP:
- Buat file konfigurasi:
cp config.sample.inc.php config.inc.php
- Edit
config.inc.php
dan setel:$cfg['blowfish_secret'] = 'randomstring123'; // Buat string acak
- Akses phpMyAdmin di http://localhost/phpmyadmin
- Login dengan:
- Username:
root
- Password: kosong (default) atau password yang Anda set
- Username:
- Untuk keamanan, buat user baru:
- Klik "User accounts" > "Add user account"
- Isi username dan password
- Berikan privileges yang diperlukan
- Buat database baru:
- Klik "New" di sidebar
- Beri nama database dan klik "Create"
- Cari alamat IP lokal komputer host:
- Windows:
ipconfig
di Command Prompt - Linux/macOS:
ifconfig
atauip a
- Windows:
- Pastikan server dijalankan dengan binding ke 0.0.0.0:
- Untuk PHP built-in server:
php -S 0.0.0.0:8000
- Untuk XAMPP: Edit
httpd.conf
dan ubahListen 80
keListen 0.0.0.0:80
- Untuk PHP built-in server:
- Di perangkat lain di jaringan yang sama, akses:
http://[IP-address]:[port]
Contoh:http://192.168.1.100:8000
-
Ubah password root MySQL:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password-baru-yang-kuat';
-
Batasi akses phpMyAdmin:
- Edit file
phpmyadmin/.htaccess
:AuthType Basic AuthName "Restricted Access" AuthUserFile /path/to/.htpasswd Require valid-user
- Buat file password:
htpasswd -c /path/to/.htpasswd username
- Edit file
-
Nonaktifkan akses remote jika tidak diperlukan:
- Edit
my.ini
ataumy.cnf
dan tambahkan:bind-address = 127.0.0.1
- Edit
-
Port conflict:
- Error:
Apache shutdown unexpectedly
- Solusi: Cari dan hentikan aplikasi yang menggunakan port 80 atau 443
netstat -ano | findstr :80 taskkill /PID [PID] /F
- Error:
-
phpMyAdmin tidak bisa akses MySQL:
- Periksa konfigurasi
config.inc.php
- Pastikan service MySQL berjalan
- Periksa konfigurasi
-
PHP script tidak dieksekusi:
- Pastikan file berekstensi
.php
- Untuk built-in server, pastikan direktori yang benar
- Pastikan file berekstensi
-
Akses ditolak dari jaringan lain:
- Periksa firewall
- Pastikan server binding ke
0.0.0.0
bukan127.0.0.1
Dengan panduan ini, Anda dapat membuat server PHP offline lengkap dengan phpMyAdmin tanpa memerlukan Node.js. Server ini cocok untuk pengembangan lokal atau penggunaan dalam jaringan internal.