Technical FAQs
System Requirements
Q: What are the detailed system requirements?
A: Minimum requirements:
PHP Requirements:
- PHP 8.3 or higher
- Memory limit: 256MB minimum
- Max execution time: 300 seconds
Required PHP Extensions:
- curl
- json
- mysqli
- pdo
- zip
- gd
- mbstring
Database:
- MySQL 5.7+ or MariaDB 10.2+
- InnoDB storage engine
- UTF8mb4 character set
Web Server:
- Apache with mod_rewrite
- Nginx (with proper configuration)
File Permissions:
- 755 for directories
- 644 for files
Q: How do I check if my server meets the requirements?
A: Create a PHP file with this content:
<?php
// check_requirements.php
$requirements = [
'PHP Version' => ['required' => '8.2.0', 'current' => PHP_VERSION],
'Extensions' => [
'curl', 'json', 'mysqli', 'pdo', 'zip', 'gd', 'mbstring'
],
'PHP Settings' => [
'memory_limit' => '256M',
'max_execution_time' => '300'
]
];
foreach ($requirements['Extensions'] as $ext) {
echo "$ext: " . (extension_loaded($ext) ? "Installed" : "Missing") . "\n";
}
Installation & Configuration
Q: How do I enable URL rewriting?
A: For Apache:
# .htaccess file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?ng=$1 [L,QSA]
For Nginx:
location / {
try_files $uri $uri/ /index.php?ng=$uri&$args;
}
Q: How do I configure email settings?
A: Common configurations:
SMTP:
// Email settings in admin panel
SMTP Host: smtp.gmail.com
SMTP Port: 587
SMTP Security: TLS
SMTP Username: your-email@gmail.com
SMTP Password: your-password
Gmail Specific:
- Enable "Less secure app access" or
- Use App Passwords with 2FA
Q: How do I optimize database performance?
A: Key optimizations:
-- Check table status
SHOW TABLE STATUS;
-- Optimize tables
OPTIMIZE TABLE sys_invoices, sys_transactions, sys_users;
-- Add indexes for frequently searched columns
ALTER TABLE sys_transactions ADD INDEX idx_date (date);
-- MySQL configuration in my.cnf
innodb_buffer_pool_size = 1G
query_cache_size = 64M
Troubleshooting
Q: How do I enable debug mode?
A: Modify system/config.php:
// Enable developer mode
define('APP_STAGE', 'Dev');
// Additional debugging
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Q: How do I fix "White Screen of Death"?
A: Follow these steps:
- Enable error reporting:
// Add to index.php
ini_set('display_errors', 1);
error_reporting(E_ALL);
- Check PHP error logs:
tail -f /var/log/php_errors.log
- Verify PHP memory limit:
memory_limit = 256M
max_execution_time = 300
Q: How do I resolve database connection issues?
A: Troubleshooting steps:
// Test database connection
try {
$pdo = new PDO(
"mysql:host=localhost;dbname=your_database",
"username",
"password"
);
echo "Connected successfully";
} catch(PDOException $e) {
echo "Connection failed: " . $e->getMessage();
}
Customization
Q: How do I create a custom plugin?
A: Basic plugin structure:
apps/
└── your_plugin/
├── manifest.php
├── boot.php
├── install.php
├── uninstall.php
└── app.php
Example manifest.php:
<?php
$plugin = [
'name' => 'Your Plugin',
'version' => '1.0.0',
'author' => 'Your Name',
'description' => 'Plugin description'
];
Q: How do I customize invoice templates?
A: Create custom override:
// system/overrides/invoice_pdf.php
function invoice_pdf($invoice) {
// Custom PDF generation code
$pdf = new Mpdf();
$html = '<h1>Invoice #' . $invoice->id . '</h1>';
$pdf->WriteHTML($html);
return $pdf;
}
Q: How do I add custom fields?
A: Database modification:
-- Add custom field to customers
ALTER TABLE sys_customers
ADD COLUMN custom_field VARCHAR(255);
-- Create custom field definition
INSERT INTO sys_customfields
(module, fieldname, fieldtype)
VALUES ('customers', 'custom_field', 'text');
Integration
Q: How do I integrate with payment gateways?
A: Example integration:
// Payment gateway class
class CustomGateway extends PaymentGateway {
public function processPayment($amount, $currency) {
// Gateway API implementation
$response = $this->api->charge([
'amount' => $amount,
'currency' => $currency
]);
return $response;
}
}
Q: How do I use the API?
A: API usage example:
// API request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'your-domain/api/v2/customers');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
Q: How do I implement webhooks?
A: Webhook implementation:
// Webhook handler
function handleWebhook() {
$payload = file_get_contents('php://input');
$data = json_decode($payload);
switch($data->event) {
case 'invoice.paid':
// Handle paid invoice
break;
}
}
Need more technical help? Check our developer documentation or contact support through your client portal.