Chapter 2: Server Requirements & Prerequisites

Before initiating the installation of MartX Enterprise Platform, ensure your hosting server or local development environment satisfies the required runtime specifications, PHP extensions, and file system permissions.

2.1 Core Runtime & Environment Architecture

MartX is engineered on Laravel 12.46.x and is optimized for ultra-high throughput on modern 64-bit multi-core server environments. Below are the base hardware and software specifications:

Component Minimum Requirement Recommended Enterprise Spec Status
PHP Version PHP 8.2.0 PHP 8.2.31 / PHP 8.3.x (PHP 8.4 Ready) Mandatory
Database Engine MySQL 8.0.x or MariaDB 10.4.x MySQL 8.0.36+ or MariaDB 10.11 LTS Mandatory
Web Server Apache 2.4+ (with mod_rewrite) Nginx 1.24+ (with PHP-FPM socket) Recommended
Operating System Linux / Unix (64-bit) Ubuntu 24.04 / 22.04 LTS, AlmaLinux 9.x, Debian 12 Supported
Memory (RAM) 1 GB Dedicated RAM 2 GB+ RAM (4 GB+ for >50k SKU Catalogs) Scale Ready
Disk Storage 500 MB Free SSD Space 10 GB+ NVMe SSD (for Media Library & Backups) Storage

2.2 The 13 Mandatory PHP Extensions Audit

The MartX Web Installer automatically tests each of the following 13 PHP extensions on Step 1. All 13 extensions must be enabled in your server's php.ini configuration:

Extension Installer Check Identifier Core Architectural Purpose in MartX
BCMath bcmath High-precision arbitrary accuracy floating-point arithmetic for order pricing services, promotional coupon percentage deductions, and payment gateway calculations.
Ctype ctype Character type validation checks for alphanumeric user inputs and secure request payload sanitization.
cURL curl High-speed HTTP client for secure payment gateway API handshakes (Stripe, PayPal, SSLCommerz, CoinGate), Google Gemini AI operations, and automated software update checks.
DOM dom XML and HTML Document Object Model parsing for Summernote rich text editor processing, product description cleanup, and SVG icon rendering.
Fileinfo fileinfo Real MIME-type detection for Central Media Library uploads, product photography, and digital invoice assets, preventing executable script disguising and malicious payload injection.
JSON json High-speed JSON serialization and deserialization for product variant matrices, attributes, and dynamic setting key-value stores.
Mbstring mbstring Multibyte UTF-8 string encoding and regex handling for international languages, localized product titles, and emoji support.
OpenSSL openssl Cryptographic encryption for Laravel APP_KEY (AES-256-CBC), password hashing (Bcrypt 12 rounds), 2FA backup code generation, and secure session management.
PCRE pcre Perl-compatible regular expressions for advanced route matching, URL parsing, slug generators, and parameter verification.
PDO pdo PHP Data Objects abstraction interface providing a unified, secure database connection layer across all models.
PDO MySQL pdo_mysql Native MySQL driver for PDO utilizing prepared statements with strict parameter binding to eliminate 100% of SQL injection vectors.
Tokenizer tokenizer PHP source tokenizer required by Laravel's Blade compiler to transpile frontend template directives into cached native PHP execution trees.
XML xml XML serialization for automatic XML sitemap generation, RSS product feeds, and legacy payment gateway integration feeds.
100% No-Code Friendly: In cPanel, simply navigate to Software → Select PHP Version → Extensions and ensure the checkboxes are checked. Furthermore, the MartX 5-Step Web Installer automatically verifies all 13 extensions with green checkmarks upon launch!
Advanced VPS & Dedicated Server Terminal Commands (Click to expand)

Check all 13 active extensions via SSH terminal:

php -m | grep -E -i "bcmath|ctype|curl|dom|fileinfo|json|mbstring|openssl|pcre|pdo|pdo_mysql|tokenizer|xml"

Ubuntu / Debian package installer for missing extensions:

sudo apt-get update && sudo apt-get install -y php8.2 php8.2-bcmath php8.2-curl php8.2-dom php8.2-fileinfo php8.2-mbstring php8.2-mysql php8.2-xml php8.2-zip php8.2-intl php8.2-gd
Beginner & Non-Technical Friendly
How to Check if Your Server is Ready?

You do not need command-line or coding knowledge to verify whether your server meets the requirements. Choose either of these 2 simple methods:

1
Automated Web Installer (Easiest)

Extract MartX files on your hosting and visit https://yourdomain.com/install in your web browser.

Auto-Diagnostic: Step 1 runs an instant live test. If all 13 extensions show Passed with green checkmarks, you are 100% ready to install!
2
cPanel Visual Extension Checker

Log in to your cPanel → Navigate to Software → Select PHP Version.

Visual Checkboxes: Switch to the Extensions tab. Look for bcmath, curl, fileinfo, etc. Checkboxes with ticks are already active on your account.

Free Hosting Support Service Usually resolved within 2-5 minutes via Live Chat

If you are on shared hosting (Hostinger, Namecheap, Bluehost, cPanel, etc.) or do not have terminal/root access, do not worry! Simply copy the prepared request below, open a Live Chat or Support Ticket with your hosting company, and paste it. They will enable all extensions and configure the server limits for you free of charge:

Ready-to-Paste Hosting Support Ticket Message
Hello Support Team,

I am setting up a modern Laravel 12 e-commerce platform on my hosting account. Could you please configure my PHP environment with the following specifications:

1. PHP Version:
   - Please set my domain PHP version to PHP 8.2 or PHP 8.3.

2. Mandatory PHP Extensions:
   - Please ensure the following 13 extensions are enabled in my php.ini:
     bcmath, ctype, curl, dom, fileinfo, json, mbstring, openssl, pcre, pdo, pdo_mysql, tokenizer, xml

3. Recommended php.ini Resource Allocation:
   - memory_limit = 512M
   - upload_max_filesize = 64M
   - post_max_size = 64M
   - max_execution_time = 300
   - max_input_vars = 3000
   - allow_url_fopen = On
   - date.timezone = UTC

Thank you very much for your assistance!
Once your host confirms the update, refresh /install in your browser to proceed with the visual installation wizard!

2.3 Recommended php.ini Resource Allocation & Directives

To ensure uninterrupted processing of high-resolution product photography, large CSV import/export catalogs, and background synchronization, configure the following directives in your php.ini:

Directive Minimum Value Recommended Enterprise Value Rationale & Critical Impact
memory_limit 256M 512M Prevents out-of-memory fatal crashes during bulk WebP image conversions, large PDF invoice generation, and database export tasks.
upload_max_filesize 32M 64M / 128M Allows administrators to upload multi-angle high-resolution product photography and promotional video banners to the Media Library.
post_max_size 32M 64M / 128M Must always be equal to or greater than upload_max_filesize to prevent HTTP 413 (Payload Too Large) submission drops.
max_execution_time 120 (seconds) 300 (seconds) Prevents 504 Gateway Timeouts during database migrations, demo data seeders, and bulk catalog Excel/CSV synchronizations.
max_input_vars 2000 3000 / 5000 Essential for extensive Category Mega Menu tree builders, permissions matrix grids (77+ permission checkboxes), and product attribute variations.
max_input_time 60 (seconds) 120 (seconds) Allocates sufficient time for the server to parse large incoming multipart form data over slower network connections.
allow_url_fopen On On Allows internal HTTP streams and remote image URL fetching for automated product imports.
date.timezone Store Local (e.g., UTC) UTC Ensures consistent datetime timestamps across order transactions, discount countdown timers, and audit logs.
Production php.ini Snippet (Ready to Paste)
; ==============================================================================
; MartX Recommended php.ini Configuration
; ==============================================================================
memory_limit = 512M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 120
max_input_vars = 3000
allow_url_fopen = On
date.timezone = UTC
display_errors = Off
display_startup_errors = Off
log_errors = On
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Cannot edit php.ini on Shared Hosting?

If your hosting control panel restricts manual php.ini edits, use the 1-Click Hosting Support Ticket Template above to have your hosting team apply these limits for you in minutes.

2.4 Directory & Storage File System Permissions

For the Web Installer to write the database credentials to .env, store uploaded media assets, and compile Blade cache files, the web server user (e.g., www-data, nginx, or your cPanel user) must possess write permissions on the following folders:

Target Directory / File Required Permission Purpose & Description
storage/app 0775 / 0755 Private application storage, customer invoices, and temporary export files.
storage/framework 0775 / 0755 Internal framework state caches, route locks, and maintenance flags.
storage/framework/cache 0775 / 0755 High-speed query result caches, performance data, and secure license tokens.
storage/framework/sessions 0775 / 0755 Encrypted user session payloads and visitor shopping cart tokens.
storage/framework/views 0775 / 0755 Compiled Blade views for storefront, admin panel, and email templates.
storage/logs 0775 / 0755 Laravel rotating application logs (laravel.log) and security audit traces.
bootstrap/cache 0775 / 0755 Optimized framework service provider caches (packages.php, services.php).
.env 0664 (Writable during Install) Master environment configuration file written automatically on Step 4 of the Web Installer.
cPanel File Manager: Open File Manager → right-click storage and bootstrap/cache → select Change Permissions → set to 775 (or 755). The 5-Step Web Installer automatically verifies write permissions during setup!
Advanced Linux VPS Permission Setup Commands (Click to expand)

Execute these standard commands in your MartX root directory on Ubuntu/Debian/Nginx servers:

# 1. Assign ownership to the webserver user (www-data)
sudo chown -R www-data:www-data /var/www/html/martx

# 2. Set standard secure permissions for files and folders
sudo find /var/www/html/martx -type f -exec chmod 644 {} \;
sudo find /var/www/html/martx -type d -exec chmod 755 {} \;

# 3. Grant write permissions to storage and cache
sudo chmod -R 775 /var/www/html/martx/storage
sudo chmod -R 775 /var/www/html/martx/bootstrap/cache

2.5 Production Web Server Configuration (Nginx & Apache)

MartX requires the web server's DocumentRoot to point directly to the public/ subfolder. Pointing the web root to the main root folder will cause 404 errors and expose sensitive internal configuration files.

/etc/nginx/sites-available/martx.conf
server {
    listen 80;
    listen [::]:80;
    server_name yourstore.com www.yourstore.com;
    root /var/www/html/martx/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";
    add_header X-XSS-Protection "1; mode=block";
    add_header Referrer-Policy "strict-origin-when-cross-origin";

    index index.php index.html;
    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; try_files $uri /index.php?$query_string; }

    error_page 404 /index.php;

    location ~ .php$ {
        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_hide_header X-Powered-By;
    }

    # Deny access to sensitive files
    location ~ /.(?!well-known).* {
        deny all;
    }

    # Static Asset Caching
    location ~* .(jpg|jpeg|png|webp|gif|ico|css|js|woff2|woff|ttf|svg)$ {
        expires 365d;
        add_header Cache-Control "public, no-transform, max-age=31536000";
    }
}
/etc/apache2/sites-available/martx.conf
<VirtualHost *:80>
    ServerName yourstore.com
    ServerAlias www.yourstore.com
    DocumentRoot /var/www/html/martx/public

    <Directory /var/www/html/martx/public>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/martx-error.log
    CustomLog ${APACHE_LOG_DIR}/martx-access.log combined
</VirtualHost>

Make sure mod_rewrite is enabled by running: sudo a2enmod rewrite && sudo systemctl restart apache2

2.6 Database Standards & Configuration (MySQL 8.0+ / MariaDB 10.4+)

MartX requires a clean MySQL 8.0+ or MariaDB 10.4+ database with UTF-8 Full Multilingual (utf8mb4) encoding to support international character sets, customer emojis in product reviews, and multilingual search terms:

Database Attribute Recommended Value Technical Advantage
Character Set utf8mb4 Stores 4-byte Unicode characters (including non-Latin alphabets and emojis).
Collation utf8mb4_unicode_ci or utf8mb4_0900_ai_ci Provides accurate, case-insensitive, language-aware sorting and indexing.
Storage Engine InnoDB Guarantees ACID transaction compliance, row-level locking, and foreign key integrity.
innodb_file_per_table ON (Default in MySQL 8) Isolates table data and indexes for faster disk I/O and easy backup optimization.
Recommended Database Creation SQL Query

Run this standard SQL script in phpMyAdmin or MySQL CLI to create an optimized database and user:

CREATE DATABASE `martx_db` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'martx_user'@'localhost' IDENTIFIED BY 'Strong_Secure_Password#2026';
GRANT ALL PRIVILEGES ON `martx_db`.* TO 'martx_user'@'localhost';
FLUSH PRIVILEGES;

2.7 Hosting Environment Compatibility Matrix

MartX has been tested and verified across a wide range of cloud providers, managed hosts, and local developer environments:

Hosting Platform Compatibility Installation Instructions & Notes
cPanel / DirectAdmin / Plesk (Shared / Reseller) 100% Fully Compatible Select PHP 8.2 via cPanel → MultiPHP Manager / Select PHP Version. Point the Primary Domain or Subdomain DocumentRoot to /public_html/public or /public_html/martx/public.
VPS / Cloud Dedicated (DigitalOcean, AWS EC2, Hetzner, Vultr, Linode) Recommended Enterprise Run on Ubuntu 24.04/22.04 LTS with Nginx and PHP 8.2/8.3-FPM. Ideal for high concurrent visitor traffic and background queue workers.
Managed Cloud Panels (Cloudways, RunCloud, Ploi, Laravel Forge) 1-Click Deploy Ready Create a PHP 8.2+ application and set web directory to /public. SSL and Nginx are automated natively.
Local Development (Laragon 6+, XAMPP, Docker, Herd, Valet) Unrestricted Developer Mode Local environments like martx.test, localhost, and 127.0.0.1 automatically operate in Developer Mode with zero trial expiration and no license quota deduction.
Documentation
⚡ 3-Minute Quick Start 1. Introduction & Overview 2. Server Requirements 3. Installation Guide 4. License Activation 5. Dashboard Telemetry 6. Media Manager 7. Catalog Management 8. Products Management 9. Orders & Fulfillment 10. Couriers & Shipping Costs 11. Coupons & Marketing 12. Payment Gateways 13. Theme Layouts Hub 14. Navigation & Mega Menus 15. Sliders & Banners 16. Pages, FAQ & About 17. Blogs & Editorial 18. Reviews & Messages 19. Team Members & Staff Roles 20. Locations & Coverage 21. System Settings Hub 22. Web Cron & FAQs 23. Extra Security & Speed Boost