Fix: Change 'amount' to 'price' to match database schema - Database uses 'price' column, not 'amount' - Update all queries in DailySummaryService, HourlySummaryService - Update RetribusiWriteService (SELECT, INSERT, UPDATE) - Update Validator to use 'price' field - Update check_database.php and TROUBLESHOOTING.md

This commit is contained in:
mwpn
2025-12-17 13:36:29 +07:00
parent 56403469ef
commit ca3b1bd0d7
8 changed files with 61 additions and 52 deletions

View File

@@ -77,36 +77,37 @@ composer dump-autoload --optimize
- Memory limit: 256M (minimum)
3. **Nginx Configuration** (PENTING untuk fix 404):
Masuk ke: **Website -> api.btekno.cloud -> Settings -> Configuration**
Ganti isi configuration dengan:
```nginx
server {
listen 80;
listen 443 ssl http2;
server_name api.btekno.cloud;
# Document Root - HARUS ke folder public/
root /www/wwwroot/api.btekno.cloud/api/public;
index index.php index.html;
# Logs
access_log /www/wwwlogs/api.btekno.cloud.log;
error_log /www/wwwlogs/api.btekno.cloud.error.log;
# Disable access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Main location block - routing untuk Slim Framework
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP-FPM configuration
location ~ \.php$ {
try_files $uri =404;
@@ -115,29 +116,30 @@ composer dump-autoload --optimize
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# Disable buffering for SSE
fastcgi_buffering off;
}
# Disable PHP execution in uploads
location ~* /uploads/.*\.php$ {
deny all;
}
}
```
**Cek PHP socket path:**
```bash
# Cek PHP version yang digunakan
php -v
# Cek socket path (biasanya di /tmp/php-cgi-XX.sock)
ls -la /tmp/php-cgi-*.sock
```
Setelah edit, klik **Save** dan **Reload** nginx.
**Atau copy file `nginx.conf.example` dan sesuaikan path PHP socket.**
## 🔧 Environment Configuration