🌍 Available in 11 Languages — Choose yours

HSEBox Server Installation Guide

Version 1.4.0 · April 2026

📋 Before You Begin — Minimum Requirements

Your hosting must meet these requirements:

RequirementMinimumRecommended
Hosting typecPanel shared hosting or Apache servercPanel with SSH access
PHP version8.18.2 or 8.3
PHP extensionspdo_mysql, json, mbstring, mail(usually pre-installed)
DatabaseMySQL 5.7+ or MariaDB 10.3+MySQL 8.0+ or MariaDB 10.4+
Web serverApache 2.4+ with mod_rewrite
SSL/HTTPSRequired
Disk space50 MB (app files)500 MB+ (for uploads)
⚠ Important: HSEBox does not work on Nginx-only servers. Apache with mod_rewrite is required. Most cPanel hosting providers use Apache by default.

1 Create the Database

  1. Log in to your cPanel control panel
  2. Go to MySQL Databases
  3. Create a new database (e.g., youruser_hsebox)
  4. Create a new database user with a strong password (mix of letters, numbers, symbols — at least 16 characters)
  5. Click Add User to Database and grant ALL PRIVILEGES
📝 Take note of these three values — you will need them in Step 4:
• Database name   • Database username   • Database password

2 Upload the Application Files

  1. You will receive a folder called HSEBox Web APP.zip containing all application files
  2. Open cPanel → File Manager (or connect via FTP/SFTP)
  3. Navigate to where you want to install HSEBox:
    • Main domain: go to public_html/
    • Subfolder: go to public_html/your-folder-name/
    • Subdomain: go to the document root for that subdomain
  4. Upload all files and folders from the production folder into your chosen directory

After upload, your server directory should contain:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Set Folder Permissions

The uploads/ folder needs to be writable so users can upload photos and documents.

  1. In cPanel → File Manager, right-click the uploads/ folder
  2. Click Change Permissions
  3. Set to 755 (Owner: Read/Write/Execute, Group: Read/Execute, Public: Read/Execute)
  4. Make sure this applies to all subfolders inside uploads/

Alternatively, via SSH:

chmod -R 755 uploads/

4 Create the Configuration File

  1. In your server directory, find the file called env.example
  2. Copy it and rename the copy to .env (note the dot at the beginning)
  3. Open .env for editing and fill in your values:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 How to generate JWT_SECRET:
Go to any online random string generator, generate a string of at least 64 characters using letters, numbers, and symbols, and paste it as the JWT_SECRET value. This must be unique for each installation.
⚠ Important:
CORS_ORIGIN and APP_URL must be your exact domain including https:// — no trailing slash
• If behind Cloudflare or a reverse proxy, set TRUST_PROXY=1

5 Import the Database

  1. Go to cPanel → phpMyAdmin
  2. Select your database from the left sidebar
  3. Click the Import tab at the top
  4. Import three files in this exact order:

File 1: schema.sql — Creates all database tables

File 2: The seed file for your preferred language:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

File 3: The checklist seed for the same language: seed_checklist_XX.sql

📝 Note: The language you choose here sets the default reference data (risk levels, incident types, etc.) in that language. Users can still switch the interface language at any time — this only affects the pre-loaded dropdown values.

6 Subfolder Configuration (only if applicable)

Skip this step if HSEBox is installed on the root of a domain (e.g., https://hsebox.yourcompany.com).

If you installed it in a subfolder (e.g., https://yourcompany.com/hsebox/):

  1. Open the .htaccess file for editing
  2. Find this line near the top (around line 7):
# RewriteBase /your-subfolder-name/

Remove the # and change it to your folder name:

RewriteBase /hsebox/

Save the file.

7 First Access and Setup

  1. Open your browser and go to your HSEBox URL (e.g., https://yourdomain.com)
  2. The Setup Wizard will appear automatically on first access
  3. Follow the wizard to:
    • Enter your company name and details
    • Upload your company logo (optional)
    • Create the administrator account (email + password)
    • Enter your license activation key
  4. Once complete, you'll be logged in as the administrator
🎉 From here you can:
• Create additional users (Settings → User Management)
• Configure project areas
• Start using the HSE modules

8 Verify Everything Works

After setup, perform these quick checks:

CheckWhat to doExpected result
Health checkVisit /health{ "status": "ok", "db": true, "jwt": true }
Security checkVisit /.env403 Forbidden error (this is correct)
LoginLog in with admin accountFull access to all modules

🧹 Cleanup (Optional)

After successful installation, you can safely remove these files from the server:

  • schema.sql
  • seed_*.sql (all seed files)
  • seed_checklist_*.sql (all checklist seed files)
  • env.example
These files are protected by .htaccess so they can't be accessed via browser, but removing them is good practice.

🔧 Troubleshooting

ProblemSolution
Blank white pageCheck PHP version is 8.1+ in cPanel → Select PHP Version
"Failed to connect" errorVerify .env exists with correct database credentials
CORS error in browserMake sure CORS_ORIGIN in .env matches your exact domain
500 Internal Server ErrorCheck cPanel → Error Log; verify DB credentials
Photos not uploadingCheck uploads/ folder permissions are 755
Old content after updateHard refresh: Ctrl + Shift + R

Need Help?

Contact HSEBox support with:

Your domain URL · Error message or screenshot · PHP version from cPanel

HSEBox Guia de Instalação no Servidor

Versão 1.4.0 · Abril 2026

📋 Antes de Começar — Requisitos Mínimos

O seu alojamento deve cumprir estes requisitos:

RequisitoMínimoRecomendado
Tipo de alojamentocPanel shared hosting ou servidor ApachecPanel com acesso SSH
Versão PHP8.18.2 ou 8.3
Extensões PHPpdo_mysql, json, mbstring, mail(geralmente pré-instalado)
Base de dadosMySQL 5.7+ ou MariaDB 10.3+MySQL 8.0+ ou MariaDB 10.4+
Servidor webApache 2.4+ com mod_rewrite
SSL/HTTPSObrigatório
Espaço em disco50 MB (ficheiros da app)500 MB+ (para uploads)
⚠ Importante: HSEBox não funciona em servidores apenas com Nginx. Apache com mod_rewrite é obrigatório. A maioria dos fornecedores de alojamento cPanel usa Apache por defeito.

1 Criar a Base de Dados

  1. Inicie sessão no seu painel de controlo cPanel
  2. Vá a MySQL Databases
  3. Crie uma nova base de dados (ex.: youruser_hsebox)
  4. Crie um novo utilizador da base de dados com uma palavra-passe forte (combinação de letras, números, símbolos — pelo menos 16 caracteres)
  5. Clique em Add User to Database e conceda ALL PRIVILEGES
📝 Tome nota destes três valores — vai precisar deles no Passo 4:
• Nome da base de dados   • Nome de utilizador   • Palavra-passe

2 Carregar os Ficheiros da Aplicação

  1. Receberá uma pasta chamada HSEBox Web APP.zip contendo todos os ficheiros da aplicação
  2. Abra cPanel → Gestor de Ficheiros (ou ligue-se via FTP/SFTP)
  3. Navegue até onde deseja instalar o HSEBox:
    • Domínio principal: vá a public_html/
    • Subpasta: vá a public_html/your-folder-name/
    • Subdomínio: vá à raiz de documentos desse subdomínio
  4. Carregue todos os ficheiros e pastas da pasta de produção para o diretório escolhido

Após o upload, o diretório do servidor deverá conter:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Definir Permissões de Pastas

A pasta uploads/ precisa ser gravável para que os utilizadores possam carregar fotos e documentos.

  1. Em cPanel → Gestor de Ficheiros, clique com o botão direito na pasta uploads/
  2. Clique em Alterar Permissões
  3. Defina como 755 (Owner: Read/Write/Execute, Group: Read/Execute, Public: Read/Execute)
  4. Certifique-se de que se aplica a todas as subpastas dentro de uploads/

Alternativamente, via SSH:

chmod -R 755 uploads/

4 Criar o Ficheiro de Configuração

  1. No diretório do servidor, encontre o ficheiro chamado env.example
  2. Copie-o e renomeie a cópia para .env (note o ponto no início)
  3. Abra o .env para edição e preencha os seus valores:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 Como gerar o JWT_SECRET:
Vá a qualquer gerador online de texto aleatório, gere uma string de pelo menos 64 caracteres usando letras, números e símbolos, e cole como valor do JWT_SECRET. Deve ser único para cada instalação.
⚠ Importante:
CORS_ORIGIN e APP_URL devem ser o seu domínio exato incluindo https:// — sem barra no final
• Se estiver atrás do Cloudflare ou proxy reverso, defina TRUST_PROXY=1

5 Importar a Base de Dados

  1. Vá a cPanel → phpMyAdmin
  2. Selecione a sua base de dados na barra lateral esquerda
  3. Clique no separador Import no topo
  4. Importe três ficheiros nesta ordem exata:

Ficheiro 1: schema.sql — Cria todas as tabelas da base de dados

Ficheiro 2: O ficheiro seed para o seu idioma preferido:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

Ficheiro 3: O ficheiro seed da checklist para o mesmo idioma: seed_checklist_XX.sql

📝 Nota: O idioma que escolher aqui define os dados de referência padrão (níveis de risco, tipos de incidente, etc.) nesse idioma. Os utilizadores podem mudar o idioma da interface a qualquer momento — isto apenas afeta os valores pré-carregados nos menus.

6 Configuração de Subpasta (apenas se aplicável)

Ignore este passo se o HSEBox estiver instalado na raiz de um domínio (ex.: https://hsebox.yourcompany.com).

Se o instalou numa subpasta (ex.: https://yourcompany.com/hsebox/):

  1. Abra o ficheiro .htaccess para edição
  2. Encontre esta linha perto do topo (cerca da linha 7):
# RewriteBase /your-subfolder-name/

Remova o # e altere para o nome da sua pasta:

RewriteBase /hsebox/

Guarde o ficheiro.

7 Primeiro Acesso e Configuração

  1. Abra o seu navegador e vá ao URL do HSEBox (ex.: https://yourdomain.com)
  2. O Assistente de Configuração aparecerá automaticamente no primeiro acesso
  3. Siga o assistente para:
    • Introduza o nome e dados da empresa
    • Carregue o logótipo da empresa (opcional)
    • Crie a conta de administrador (email + palavra-passe)
    • Introduza a chave de ativação da licença
  4. Depois de concluído, estará autenticado como administrador
🎉 A partir daqui pode:
• Criar utilizadores adicionais (Definições → Gestão de Utilizadores)
• Configurar áreas de projeto
• Começar a utilizar os módulos HSE

8 Verificar que Tudo Funciona

Após a configuração, faça estas verificações rápidas:

VerificaçãoO que fazerResultado esperado
Verificação de saúdeVisite /health{ "status": "ok", "db": true, "jwt": true }
Verificação de segurançaVisite /.envErro 403 Forbidden (isto é correto)
LoginInicie sessão com a conta adminAcesso total a todos os módulos

🧹 Limpeza (Opcional)

Após uma instalação bem-sucedida, pode remover com segurança estes ficheiros do servidor:

  • schema.sql
  • seed_*.sql (todos os ficheiros seed)
  • seed_checklist_*.sql (todos os ficheiros seed de checklist)
  • env.example
Estes ficheiros são protegidos pelo .htaccess e não podem ser acedidos pelo navegador, mas removê-los é uma boa prática.

🔧 Resolução de Problemas

ProblemaSolução
Página em brancoVerifique se a versão PHP é 8.1+ em cPanel → Select PHP Version
Erro "Failed to connect"Verifique se o .env existe com as credenciais corretas da base de dados
Erro CORS no navegadorCertifique-se de que CORS_ORIGIN no .env corresponde ao seu domínio exato
Erro 500 Internal ServerVerifique cPanel → Error Log; confirme as credenciais da BD
Fotos não carregamVerifique se as permissões da pasta uploads/ são 755
Conteúdo antigo após atualizaçãoAtualização forçada: Ctrl + Shift + R

Precisa de Ajuda?

Contacte o suporte HSEBox com:

O seu URL · Mensagem de erro ou captura de ecrã · Versão PHP do cPanel

HSEBox Guía de Instalación en Servidor

Versión 1.4.0 · Abril 2026

📋 Antes de Comenzar — Requisitos Mínimos

Su hosting debe cumplir estos requisitos:

RequisitoMínimoRecomendado
Tipo de hostingcPanel shared hosting o servidor ApachecPanel con acceso SSH
Versión PHP8.18.2 o 8.3
Extensiones PHPpdo_mysql, json, mbstring, mail(generalmente preinstalado)
Base de datosMySQL 5.7+ o MariaDB 10.3+MySQL 8.0+ o MariaDB 10.4+
Servidor webApache 2.4+ con mod_rewrite
SSL/HTTPSObligatorio
Espacio en disco50 MB (archivos de la app)500 MB+ (para uploads)
⚠ Importante: HSEBox no funciona en servidores solo con Nginx. Se requiere Apache con mod_rewrite. La mayoría de los proveedores de hosting cPanel usan Apache por defecto.

1 Crear la Base de Datos

  1. Inicie sesión en su panel de control cPanel
  2. Vaya a MySQL Databases
  3. Cree una nueva base de datos (ej.: youruser_hsebox)
  4. Cree un nuevo usuario de base de datos con una contraseña segura (combinación de letras, números, símbolos — al menos 16 caracteres)
  5. Haga clic en Add User to Database y otorgue ALL PRIVILEGES
📝 Anote estos tres valores — los necesitará en el Paso 4:
• Nombre de la base de datos   • Nombre de usuario   • Contraseña

2 Subir los Archivos de la Aplicación

  1. Recibirá una carpeta llamada HSEBox Web APP.zip que contiene todos los archivos de la aplicación
  2. Abra cPanel → Administrador de Archivos (o conéctese vía FTP/SFTP)
  3. Navegue hasta donde desea instalar HSEBox:
    • Dominio principal: vaya a public_html/
    • Subcarpeta: vaya a public_html/your-folder-name/
    • Subdominio: vaya a la raíz de documentos de ese subdominio
  4. Suba todos los archivos y carpetas de la carpeta de producción al directorio elegido

Después de la subida, el directorio del servidor debería contener:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Configurar Permisos de Carpetas

La carpeta uploads/ necesita ser escribible para que los usuarios puedan subir fotos y documentos.

  1. En cPanel → Administrador de Archivos, haga clic derecho en la carpeta uploads/
  2. Haga clic en Cambiar Permisos
  3. Establezca en 755 (Owner: Read/Write/Execute, Group: Read/Execute, Public: Read/Execute)
  4. Asegúrese de que se aplica a todas las subcarpetas dentro de uploads/

Alternativamente, vía SSH:

chmod -R 755 uploads/

4 Crear el Archivo de Configuración

  1. En el directorio del servidor, encuentre el archivo llamado env.example
  2. Cópielo y renombre la copia a .env (note el punto al inicio)
  3. Abra el .env para edición y complete sus valores:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 Cómo generar el JWT_SECRET:
Vaya a cualquier generador de cadenas aleatorias en línea, genere una cadena de al menos 64 caracteres usando letras, números y símbolos, y péguela como valor de JWT_SECRET. Debe ser único para cada instalación.
⚠ Importante:
CORS_ORIGIN y APP_URL deben ser su dominio exacto incluyendo https:// — sin barra al final
• Si está detrás de Cloudflare o un proxy inverso, establezca TRUST_PROXY=1

5 Importar la Base de Datos

  1. Vaya a cPanel → phpMyAdmin
  2. Seleccione su base de datos en la barra lateral izquierda
  3. Haga clic en la pestaña Import en la parte superior
  4. Importe tres archivos en este orden exacto:

Archivo 1: schema.sql — Crea todas las tablas de la base de datos

Archivo 2: El archivo seed para su idioma preferido:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

Archivo 3: El archivo seed de checklist para el mismo idioma: seed_checklist_XX.sql

📝 Nota: El idioma que elija aquí establece los datos de referencia predeterminados (niveles de riesgo, tipos de incidente, etc.) en ese idioma. Los usuarios pueden cambiar el idioma de la interfaz en cualquier momento — esto solo afecta los valores precargados en los menús.

6 Configuración de Subcarpeta (solo si aplica)

Omita este paso si HSEBox está instalado en la raíz de un dominio (ej.: https://hsebox.yourcompany.com).

Si lo instaló en una subcarpeta (ej.: https://yourcompany.com/hsebox/):

  1. Abra el archivo .htaccess para edición
  2. Encuentre esta línea cerca del inicio (alrededor de la línea 7):
# RewriteBase /your-subfolder-name/

Elimine el # y cámbielo al nombre de su carpeta:

RewriteBase /hsebox/

Guarde el archivo.

7 Primer Acceso y Configuración

  1. Abra su navegador y vaya a la URL de HSEBox (ej.: https://yourdomain.com)
  2. El Asistente de Configuración aparecerá automáticamente en el primer acceso
  3. Siga el asistente para:
    • Ingrese el nombre y datos de la empresa
    • Suba el logotipo de la empresa (opcional)
    • Cree la cuenta de administrador (email + contraseña)
    • Ingrese la clave de activación de la licencia
  4. Una vez completado, estará conectado como administrador
🎉 Desde aquí puede:
• Crear usuarios adicionales (Configuración → Gestión de Usuarios)
• Configurar áreas de proyecto
• Comenzar a utilizar los módulos HSE

8 Verificar que Todo Funciona

Después de la configuración, realice estas verificaciones rápidas:

VerificaciónQué hacerResultado esperado
Verificación de saludVisite /health{ "status": "ok", "db": true, "jwt": true }
Verificación de seguridadVisite /.envError 403 Forbidden (esto es correcto)
LoginInicie sesión con la cuenta adminAcceso completo a todos los módulos

🧹 Limpieza (Opcional)

Después de una instalación exitosa, puede eliminar con seguridad estos archivos del servidor:

  • schema.sql
  • seed_*.sql (todos los archivos seed)
  • seed_checklist_*.sql (todos los archivos seed de checklist)
  • env.example
Estos archivos están protegidos por .htaccess y no se pueden acceder desde el navegador, pero eliminarlos es una buena práctica.

🔧 Solución de Problemas

ProblemaSolución
Página en blancoVerifique que la versión PHP sea 8.1+ en cPanel → Select PHP Version
Error "Failed to connect"Verifique que el .env exista con las credenciales correctas de la base de datos
Error CORS en el navegadorAsegúrese de que CORS_ORIGIN en .env coincida con su dominio exacto
Error 500 Internal ServerVerifique cPanel → Error Log; confirme las credenciales de la BD
Fotos no se subenVerifique que los permisos de la carpeta uploads/ sean 755
Contenido antiguo después de actualizarActualización forzada: Ctrl + Shift + R

¿Necesita Ayuda?

Contacte al soporte de HSEBox con:

Su URL · Mensaje de error o captura de pantalla · Versión PHP de cPanel

HSEBox دليل تثبيت الخادم

الإصدار 1.4.0 · أبريل 2026

📋 قبل البدء — الحد الأدنى من المتطلبات

يجب أن تستوفي استضافتك هذه المتطلبات:

المتطلبالحد الأدنىالموصى به
نوع الاستضافةاستضافة مشتركة cPanel أو خادم ApachecPanel مع وصول SSH
إصدار PHP8.18.2 أو 8.3
إضافات PHPpdo_mysql, json, mbstring, mail(عادة مثبت مسبقاً)
قاعدة البياناتMySQL 5.7+ أو MariaDB 10.3+MySQL 8.0+ أو MariaDB 10.4+
خادم الويبApache 2.4+ مع mod_rewrite
SSL/HTTPSمطلوب
مساحة القرص50 ميجابايت (ملفات التطبيق)+500 ميجابايت (للملفات المرفوعة)
⚠ هام: HSEBox لا يعمل على خوادم Nginx فقط. يتطلب Apache مع mod_rewrite. معظم مزودي استضافة cPanel يستخدمون Apache افتراضياً.

1 إنشاء قاعدة البيانات

  1. سجّل الدخول إلى لوحة تحكم cPanel
  2. انتقل إلى MySQL Databases
  3. أنشئ قاعدة بيانات جديدة (مثال: youruser_hsebox)
  4. أنشئ مستخدم قاعدة بيانات جديد بـكلمة مرور قوية (مزيج من الأحرف والأرقام والرموز — 16 حرفاً على الأقل)
  5. انقر على Add User to Database وامنحه ALL PRIVILEGES
📝 سجّل هذه القيم الثلاث — ستحتاجها في الخطوة 4:
• اسم قاعدة البيانات   • اسم مستخدم قاعدة البيانات   • كلمة مرور قاعدة البيانات

2 رفع ملفات التطبيق

  1. ستتلقى مجلداً باسم HSEBox Web APP.zip يحتوي على جميع ملفات التطبيق
  2. افتح cPanel → File Manager (أو اتصل عبر FTP/SFTP)
  3. انتقل إلى المكان الذي تريد تثبيت HSEBox فيه:
    • النطاق الرئيسي: انتقل إلى public_html/
    • مجلد فرعي: انتقل إلى public_html/your-folder-name/
    • نطاق فرعي: انتقل إلى المجلد الجذر لذلك النطاق الفرعي
  4. ارفع جميع الملفات والمجلدات من مجلد الإنتاج إلى المجلد الذي اخترته

بعد الرفع، يجب أن يحتوي مجلد الخادم على:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 تعيين أذونات المجلدات

يجب أن يكون مجلد uploads/ قابلاً للكتابة حتى يتمكن المستخدمون من رفع الصور والمستندات.

  1. في cPanel → File Manager، انقر بزر الماوس الأيمن على مجلد uploads/
  2. انقر على Change Permissions
  3. اضبطها على 755 (المالك: قراءة/كتابة/تنفيذ، المجموعة: قراءة/تنفيذ، العام: قراءة/تنفيذ)
  4. تأكد من تطبيق ذلك على جميع المجلدات الفرعية داخل uploads/

بدلاً من ذلك، عبر SSH:

chmod -R 755 uploads/

4 إنشاء ملف الإعدادات

  1. في مجلد الخادم، ابحث عن الملف المسمى env.example
  2. انسخه وأعد تسمية النسخة إلى .env (لاحظ النقطة في البداية)
  3. افتح .env للتحرير واملأ القيم الخاصة بك:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 كيفية إنشاء JWT_SECRET:
انتقل إلى أي مولد نصوص عشوائية عبر الإنترنت، وأنشئ نصاً من 64 حرفاً على الأقل باستخدام الأحرف والأرقام والرموز، ثم الصقه كقيمة JWT_SECRET. يجب أن يكون فريداً لكل تثبيت.
⚠ هام:
• يجب أن يكون CORS_ORIGIN و APP_URL هو نطاقك الدقيق بما في ذلك https:// — بدون شرطة مائلة في النهاية
• إذا كنت خلف Cloudflare أو وكيل عكسي، اضبط TRUST_PROXY=1

5 استيراد قاعدة البيانات

  1. انتقل إلى cPanel → phpMyAdmin
  2. اختر قاعدة البيانات من الشريط الجانبي الأيسر
  3. انقر على علامة التبويب Import في الأعلى
  4. استورد ثلاثة ملفات بهذا الترتيب بالضبط:

الملف 1: schema.sql — ينشئ جميع جداول قاعدة البيانات

الملف 2: ملف البيانات الأولية للغة المفضلة لديك:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

الملف 3: ملف بيانات قوائم التحقق لنفس اللغة: seed_checklist_XX.sql

📝 ملاحظة: اللغة التي تختارها هنا تحدد البيانات المرجعية الافتراضية (مستويات المخاطر، أنواع الحوادث، إلخ) بتلك اللغة. يمكن للمستخدمين تبديل لغة الواجهة في أي وقت — هذا يؤثر فقط على القيم المحملة مسبقاً في القوائم المنسدلة.

6 إعدادات المجلد الفرعي (فقط إذا كان ذلك ينطبق)

تخطَّ هذه الخطوة إذا تم تثبيت HSEBox على جذر النطاق (مثال: https://hsebox.yourcompany.com).

إذا قمت بتثبيته في مجلد فرعي (مثال: https://yourcompany.com/hsebox/):

  1. افتح ملف .htaccess للتحرير
  2. ابحث عن هذا السطر بالقرب من الأعلى (حوالي السطر 7):
# RewriteBase /your-subfolder-name/

أزل # وغيّره إلى اسم مجلدك:

RewriteBase /hsebox/

احفظ الملف.

7 الوصول الأول والإعداد

  1. افتح المتصفح وانتقل إلى عنوان URL الخاص بـ HSEBox (مثال: https://yourdomain.com)
  2. سيظهر معالج الإعداد تلقائياً عند الوصول الأول
  3. اتبع المعالج لـ:
    • إدخال اسم شركتك وتفاصيلها
    • رفع شعار شركتك (اختياري)
    • إنشاء حساب المدير (البريد الإلكتروني + كلمة المرور)
    • إدخال مفتاح تفعيل الترخيص
  4. بمجرد الانتهاء، ستسجل الدخول كمدير
🎉 من هنا يمكنك:
• إنشاء مستخدمين إضافيين (الإعدادات → إدارة المستخدمين)
• تكوين مناطق المشروع
• البدء في استخدام وحدات HSE

8 التحقق من أن كل شيء يعمل

بعد الإعداد، قم بهذه الفحوصات السريعة:

الفحصماذا تفعلالنتيجة المتوقعة
فحص الصحةقم بزيارة /health{ "status": "ok", "db": true, "jwt": true }
فحص الأمانقم بزيارة /.envخطأ 403 Forbidden (هذا صحيح)
تسجيل الدخولسجّل الدخول بحساب المديروصول كامل لجميع الوحدات

🧹 التنظيف (اختياري)

بعد التثبيت الناجح، يمكنك حذف هذه الملفات بأمان من الخادم:

  • schema.sql
  • seed_*.sql (جميع ملفات البيانات الأولية)
  • seed_checklist_*.sql (جميع ملفات بيانات قوائم التحقق)
  • env.example
هذه الملفات محمية بواسطة .htaccess لذا لا يمكن الوصول إليها عبر المتصفح، لكن حذفها يُعد ممارسة جيدة.

🔧 استكشاف الأخطاء وإصلاحها

المشكلةالحل
صفحة بيضاء فارغةتحقق من أن إصدار PHP هو 8.1+ في cPanel → Select PHP Version
خطأ "Failed to connect"تحقق من وجود ملف .env مع بيانات اعتماد قاعدة البيانات الصحيحة
خطأ CORS في المتصفحتأكد من أن CORS_ORIGIN في .env يطابق نطاقك بالضبط
خطأ 500 Internal Server Errorتحقق من cPanel → Error Log؛ تحقق من بيانات اعتماد قاعدة البيانات
الصور لا ترفعتحقق من أن أذونات مجلد uploads/ هي 755
محتوى قديم بعد التحديثتحديث إجباري: Ctrl + Shift + R

هل تحتاج مساعدة؟

تواصل مع دعم HSEBox مع:

عنوان URL الخاص بك · رسالة الخطأ أو لقطة شاشة · إصدار PHP من cPanel

HSEBox Server-Installationsanleitung

Version 1.4.0 · April 2026

📋 Bevor Sie beginnen — Mindestanforderungen

Ihr Hosting muss diese Anforderungen erfüllen:

AnforderungMinimumEmpfohlen
Hosting-TypcPanel Shared Hosting oder Apache-ServercPanel mit SSH-Zugang
PHP-Version8.18.2 oder 8.3
PHP-Erweiterungenpdo_mysql, json, mbstring, mail(normalerweise vorinstalliert)
DatenbankMySQL 5.7+ oder MariaDB 10.3+MySQL 8.0+ oder MariaDB 10.4+
WebserverApache 2.4+ mit mod_rewrite
SSL/HTTPSErforderlich
Speicherplatz50 MB (App-Dateien)500 MB+ (für Uploads)
⚠ Wichtig: HSEBox funktioniert nicht auf reinen Nginx-Servern. Apache mit mod_rewrite ist erforderlich. Die meisten cPanel-Hosting-Anbieter verwenden standardmäßig Apache.

1 Datenbank erstellen

  1. Melden Sie sich in Ihrem cPanel-Kontrollpanel an
  2. Gehen Sie zu MySQL Databases
  3. Erstellen Sie eine neue Datenbank (z.B. youruser_hsebox)
  4. Erstellen Sie einen neuen Datenbankbenutzer mit einem starken Passwort (Mischung aus Buchstaben, Zahlen, Sonderzeichen — mindestens 16 Zeichen)
  5. Klicken Sie auf Add User to Database und vergeben Sie ALL PRIVILEGES
📝 Notieren Sie sich diese drei Werte — Sie benötigen sie in Schritt 4:
• Datenbankname   • Datenbankbenutzername   • Datenbankpasswort

2 Anwendungsdateien hochladen

  1. Sie erhalten einen Ordner namens HSEBox Web APP.zip mit allen Anwendungsdateien
  2. Öffnen Sie cPanel → File Manager (oder verbinden Sie sich per FTP/SFTP)
  3. Navigieren Sie zu dem Ort, an dem Sie HSEBox installieren möchten:
    • Hauptdomain: gehen Sie zu public_html/
    • Unterordner: gehen Sie zu public_html/your-folder-name/
    • Subdomain: gehen Sie zum Dokumentenstamm dieser Subdomain
  4. Laden Sie alle Dateien und Ordner aus dem Produktionsordner in Ihr gewähltes Verzeichnis hoch

Nach dem Hochladen sollte Ihr Serververzeichnis Folgendes enthalten:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Ordnerberechtigungen festlegen

Der Ordner uploads/ muss beschreibbar sein, damit Benutzer Fotos und Dokumente hochladen können.

  1. Klicken Sie in cPanel → File Manager mit der rechten Maustaste auf den Ordner uploads/
  2. Klicken Sie auf Change Permissions
  3. Setzen Sie auf 755 (Besitzer: Lesen/Schreiben/Ausführen, Gruppe: Lesen/Ausführen, Öffentlich: Lesen/Ausführen)
  4. Stellen Sie sicher, dass dies für alle Unterordner innerhalb von uploads/ gilt

Alternativ über SSH:

chmod -R 755 uploads/

4 Konfigurationsdatei erstellen

  1. Suchen Sie in Ihrem Serververzeichnis die Datei namens env.example
  2. Kopieren Sie sie und benennen Sie die Kopie in .env um (beachten Sie den Punkt am Anfang)
  3. Öffnen Sie .env zum Bearbeiten und tragen Sie Ihre Werte ein:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 So generieren Sie JWT_SECRET:
Gehen Sie zu einem beliebigen Online-Zufallsstring-Generator, erstellen Sie einen String mit mindestens 64 Zeichen aus Buchstaben, Zahlen und Sonderzeichen und fügen Sie ihn als JWT_SECRET-Wert ein. Dieser muss für jede Installation einzigartig sein.
⚠ Wichtig:
CORS_ORIGIN und APP_URL müssen Ihre exakte Domain einschließlich https:// sein — ohne abschließenden Schrägstrich
• Wenn Sie hinter Cloudflare oder einem Reverse-Proxy sind, setzen Sie TRUST_PROXY=1

5 Datenbank importieren

  1. Gehen Sie zu cPanel → phpMyAdmin
  2. Wählen Sie Ihre Datenbank in der linken Seitenleiste aus
  3. Klicken Sie oben auf den Reiter Import
  4. Importieren Sie drei Dateien in genau dieser Reihenfolge:

Datei 1: schema.sql — Erstellt alle Datenbanktabellen

Datei 2: Die Seed-Datei für Ihre bevorzugte Sprache:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

Datei 3: Die Checklisten-Seed-Datei für dieselbe Sprache: seed_checklist_XX.sql

📝 Hinweis: Die hier gewählte Sprache legt die Standard-Referenzdaten (Risikostufen, Vorfalltypen usw.) in dieser Sprache fest. Benutzer können die Oberflächensprache jederzeit wechseln — dies betrifft nur die vorinstallierten Dropdown-Werte.

6 Unterordner-Konfiguration (nur falls zutreffend)

Überspringen Sie diesen Schritt, wenn HSEBox im Stammverzeichnis einer Domain installiert ist (z.B. https://hsebox.yourcompany.com).

Wenn Sie es in einem Unterordner installiert haben (z.B. https://yourcompany.com/hsebox/):

  1. Öffnen Sie die Datei .htaccess zum Bearbeiten
  2. Suchen Sie diese Zeile in der Nähe des Anfangs (etwa Zeile 7):
# RewriteBase /your-subfolder-name/

Entfernen Sie das # und ändern Sie es in Ihren Ordnernamen:

RewriteBase /hsebox/

Speichern Sie die Datei.

7 Erster Zugriff und Einrichtung

  1. Öffnen Sie Ihren Browser und navigieren Sie zu Ihrer HSEBox-URL (z.B. https://yourdomain.com)
  2. Der Einrichtungsassistent erscheint automatisch beim ersten Zugriff
  3. Folgen Sie dem Assistenten, um:
    • Ihren Firmennamen und Details einzugeben
    • Ihr Firmenlogo hochzuladen (optional)
    • Das Administratorkonto zu erstellen (E-Mail + Passwort)
    • Ihren Lizenzaktivierungsschlüssel einzugeben
  4. Nach Abschluss sind Sie als Administrator angemeldet
🎉 Von hier aus können Sie:
• Zusätzliche Benutzer erstellen (Einstellungen → Benutzerverwaltung)
• Projektbereiche konfigurieren
• Die HSE-Module nutzen

8 Überprüfen, ob alles funktioniert

Führen Sie nach der Einrichtung diese schnellen Prüfungen durch:

PrüfungWas zu tun istErwartetes Ergebnis
GesundheitscheckBesuchen Sie /health{ "status": "ok", "db": true, "jwt": true }
SicherheitscheckBesuchen Sie /.env403 Forbidden-Fehler (das ist korrekt)
AnmeldungMelden Sie sich mit dem Admin-Konto anVollzugriff auf alle Module

🧹 Aufräumen (Optional)

Nach erfolgreicher Installation können Sie diese Dateien sicher vom Server entfernen:

  • schema.sql
  • seed_*.sql (alle Seed-Dateien)
  • seed_checklist_*.sql (alle Checklisten-Seed-Dateien)
  • env.example
Diese Dateien sind durch .htaccess geschützt und können nicht über den Browser aufgerufen werden, aber das Entfernen ist eine gute Praxis.

🔧 Fehlerbehebung

ProblemLösung
Leere weiße SeiteÜberprüfen Sie, ob die PHP-Version 8.1+ ist unter cPanel → Select PHP Version
Fehler "Failed to connect"Überprüfen Sie, ob .env mit korrekten Datenbankzugangsdaten existiert
CORS-Fehler im BrowserStellen Sie sicher, dass CORS_ORIGIN in .env mit Ihrer exakten Domain übereinstimmt
500 Internal Server ErrorÜberprüfen Sie cPanel → Error Log; überprüfen Sie die Datenbankzugangsdaten
Fotos werden nicht hochgeladenÜberprüfen Sie, ob die Berechtigungen des Ordners uploads/ auf 755 gesetzt sind
Alter Inhalt nach UpdateHarter Refresh: Ctrl + Shift + R

Brauchen Sie Hilfe?

Kontaktieren Sie den HSEBox-Support mit:

Ihre Domain-URL · Fehlermeldung oder Screenshot · PHP-Version aus cPanel

HSEBox Guide d'Installation Serveur

Version 1.4.0 · Avril 2026

📋 Avant de Commencer — Configuration Minimale Requise

Votre hébergement doit répondre à ces exigences :

ExigenceMinimumRecommandé
Type d'hébergementHébergement mutualisé cPanel ou serveur ApachecPanel avec accès SSH
Version PHP8.18.2 ou 8.3
Extensions PHPpdo_mysql, json, mbstring, mail(généralement préinstallé)
Base de donnéesMySQL 5.7+ ou MariaDB 10.3+MySQL 8.0+ ou MariaDB 10.4+
Serveur webApache 2.4+ avec mod_rewrite
SSL/HTTPSObligatoire
Espace disque50 Mo (fichiers de l'app)500 Mo+ (pour les uploads)
⚠ Important : HSEBox ne fonctionne pas sur les serveurs Nginx uniquement. Apache avec mod_rewrite est requis. La plupart des fournisseurs d'hébergement cPanel utilisent Apache par défaut.

1 Créer la Base de Données

  1. Connectez-vous à votre panneau de contrôle cPanel
  2. Allez dans MySQL Databases
  3. Créez une nouvelle base de données (ex. : youruser_hsebox)
  4. Créez un nouvel utilisateur de base de données avec un mot de passe fort (mélange de lettres, chiffres, symboles — au moins 16 caractères)
  5. Cliquez sur Add User to Database et accordez ALL PRIVILEGES
📝 Notez ces trois valeurs — vous en aurez besoin à l'Étape 4 :
• Nom de la base de données   • Nom d'utilisateur de la base de données   • Mot de passe de la base de données

2 Téléverser les Fichiers de l'Application

  1. Vous recevrez un dossier appelé HSEBox Web APP.zip contenant tous les fichiers de l'application
  2. Ouvrez cPanel → File Manager (ou connectez-vous via FTP/SFTP)
  3. Naviguez jusqu'à l'emplacement où vous souhaitez installer HSEBox :
    • Domaine principal : allez dans public_html/
    • Sous-dossier : allez dans public_html/nom-du-dossier/
    • Sous-domaine : allez dans le répertoire racine de ce sous-domaine
  4. Téléversez tous les fichiers et dossiers du dossier de production dans le répertoire choisi

Après le téléversement, le répertoire de votre serveur devrait contenir :

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Définir les Permissions des Dossiers

Le dossier uploads/ doit être accessible en écriture pour que les utilisateurs puissent téléverser des photos et documents.

  1. Dans cPanel → File Manager, faites un clic droit sur le dossier uploads/
  2. Cliquez sur Change Permissions
  3. Définissez sur 755 (Propriétaire : Lecture/Écriture/Exécution, Groupe : Lecture/Exécution, Public : Lecture/Exécution)
  4. Assurez-vous que cela s'applique à tous les sous-dossiers dans uploads/

Alternativement, via SSH :

chmod -R 755 uploads/

4 Créer le Fichier de Configuration

  1. Dans le répertoire de votre serveur, trouvez le fichier appelé env.example
  2. Copiez-le et renommez la copie en .env (notez le point au début)
  3. Ouvrez .env pour l'éditer et renseignez vos valeurs :
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 Comment générer JWT_SECRET :
Allez sur n'importe quel générateur de chaînes aléatoires en ligne, générez une chaîne d'au moins 64 caractères utilisant des lettres, chiffres et symboles, et collez-la comme valeur de JWT_SECRET. Elle doit être unique pour chaque installation.
⚠ Important :
CORS_ORIGIN et APP_URL doivent correspondre à votre domaine exact incluant https:// — sans barre oblique finale
• Si vous êtes derrière Cloudflare ou un proxy inverse, définissez TRUST_PROXY=1

5 Importer la Base de Données

  1. Allez dans cPanel → phpMyAdmin
  2. Sélectionnez votre base de données dans la barre latérale gauche
  3. Cliquez sur l'onglet Import en haut
  4. Importez trois fichiers dans cet ordre exact :

Fichier 1 : schema.sql — Crée toutes les tables de la base de données

Fichier 2 : Le fichier seed pour la langue de votre choix :

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

Fichier 3 : Le seed de checklist pour la même langue : seed_checklist_XX.sql

📝 Note : La langue que vous choisissez ici définit les données de référence par défaut (niveaux de risque, types d'incidents, etc.) dans cette langue. Les utilisateurs peuvent toujours changer la langue de l'interface à tout moment — cela n'affecte que les valeurs pré-chargées des menus déroulants.

6 Configuration du Sous-dossier (uniquement si applicable)

Ignorez cette étape si HSEBox est installé à la racine d'un domaine (ex. : https://hsebox.yourcompany.com).

Si vous l'avez installé dans un sous-dossier (ex. : https://yourcompany.com/hsebox/) :

  1. Ouvrez le fichier .htaccess pour l'éditer
  2. Trouvez cette ligne près du début (vers la ligne 7) :
# RewriteBase /your-subfolder-name/

Supprimez le # et modifiez-le avec le nom de votre dossier :

RewriteBase /hsebox/

Enregistrez le fichier.

7 Premier Accès et Configuration

  1. Ouvrez votre navigateur et accédez à votre URL HSEBox (ex. : https://yourdomain.com)
  2. L'Assistant de Configuration apparaîtra automatiquement lors du premier accès
  3. Suivez l'assistant pour :
    • Saisir le nom et les détails de votre entreprise
    • Téléverser le logo de votre entreprise (optionnel)
    • Créer le compte administrateur (e-mail + mot de passe)
    • Saisir votre clé d'activation de licence
  4. Une fois terminé, vous serez connecté en tant qu'administrateur
🎉 À partir de là, vous pouvez :
• Créer des utilisateurs supplémentaires (Paramètres → Gestion des utilisateurs)
• Configurer les zones de projet
• Commencer à utiliser les modules HSE

8 Vérifier que Tout Fonctionne

Après la configuration, effectuez ces vérifications rapides :

VérificationQue faireRésultat attendu
Vérification de santéVisitez /health{ "status": "ok", "db": true, "jwt": true }
Vérification de sécuritéVisitez /.envErreur 403 Forbidden (c'est normal)
ConnexionConnectez-vous avec le compte adminAccès complet à tous les modules

🧹 Nettoyage (Optionnel)

Après une installation réussie, vous pouvez supprimer en toute sécurité ces fichiers du serveur :

  • schema.sql
  • seed_*.sql (tous les fichiers seed)
  • seed_checklist_*.sql (tous les fichiers seed de checklist)
  • env.example
Ces fichiers sont protégés par .htaccess et ne sont donc pas accessibles via le navigateur, mais les supprimer est une bonne pratique.

🔧 Dépannage

ProblèmeSolution
Page blancheVérifiez que la version PHP est 8.1+ dans cPanel → Select PHP Version
Erreur « Failed to connect »Vérifiez que .env existe avec les identifiants de base de données corrects
Erreur CORS dans le navigateurAssurez-vous que CORS_ORIGIN dans .env correspond à votre domaine exact
500 Internal Server ErrorVérifiez cPanel → Error Log ; vérifiez les identifiants de la base de données
Les photos ne se téléversent pasVérifiez que les permissions du dossier uploads/ sont à 755
Contenu obsolète après mise à jourActualisation forcée : Ctrl + Shift + R

Besoin d'Aide ?

Contactez le support HSEBox avec :

Votre URL de domaine · Message d'erreur ou capture d'écran · Version PHP depuis cPanel

HSEBox सर्वर इंस्टॉलेशन गाइड

Version 1.4.0 · अप्रैल 2026

📋 शुरू करने से पहले — न्यूनतम आवश्यकताएं

आपकी होस्टिंग को इन आवश्यकताओं को पूरा करना होगा:

आवश्यकतान्यूनतमअनुशंसित
होस्टिंग प्रकारcPanel शेयर्ड होस्टिंग या Apache सर्वरSSH एक्सेस के साथ cPanel
PHP संस्करण8.18.2 या 8.3
PHP एक्सटेंशनpdo_mysql, json, mbstring, mail(आमतौर पर पहले से इंस्टॉल)
डेटाबेसMySQL 5.7+ या MariaDB 10.3+MySQL 8.0+ या MariaDB 10.4+
वेब सर्वरmod_rewrite के साथ Apache 2.4+
SSL/HTTPSआवश्यक
डिस्क स्पेस50 MB (ऐप फाइलें)500 MB+ (अपलोड के लिए)
⚠ महत्वपूर्ण: HSEBox केवल Nginx सर्वर पर काम नहीं करता। mod_rewrite के साथ Apache आवश्यक है। अधिकांश cPanel होस्टिंग प्रदाता डिफ़ॉल्ट रूप से Apache का उपयोग करते हैं।

1 डेटाबेस बनाएं

  1. अपने cPanel कंट्रोल पैनल में लॉग इन करें
  2. MySQL Databases पर जाएं
  3. एक नया डेटाबेस बनाएं (उदा.: youruser_hsebox)
  4. एक मजबूत पासवर्ड के साथ एक नया डेटाबेस यूज़र बनाएं (अक्षरों, संख्याओं, प्रतीकों का मिश्रण — कम से कम 16 अक्षर)
  5. Add User to Database पर क्लिक करें और ALL PRIVILEGES प्रदान करें
📝 इन तीन मानों को नोट करें — आपको स्टेप 4 में इनकी आवश्यकता होगी:
• डेटाबेस का नाम   • डेटाबेस यूज़रनेम   • डेटाबेस पासवर्ड

2 एप्लिकेशन फाइलें अपलोड करें

  1. आपको HSEBox Web APP.zip नामक एक फोल्डर मिलेगा जिसमें सभी एप्लिकेशन फाइलें हैं
  2. cPanel → File Manager खोलें (या FTP/SFTP से कनेक्ट करें)
  3. उस स्थान पर नेविगेट करें जहां आप HSEBox इंस्टॉल करना चाहते हैं:
    • मुख्य डोमेन: public_html/ पर जाएं
    • सबफोल्डर: public_html/your-folder-name/ पर जाएं
    • सबडोमेन: उस सबडोमेन के डॉक्यूमेंट रूट पर जाएं
  4. प्रोडक्शन फोल्डर से सभी फाइलें और फोल्डर अपनी चुनी हुई डायरेक्टरी में अपलोड करें

अपलोड के बाद, आपकी सर्वर डायरेक्टरी में यह होना चाहिए:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 फोल्डर अनुमतियां सेट करें

uploads/ फोल्डर को लिखने योग्य होना चाहिए ताकि उपयोगकर्ता फोटो और दस्तावेज़ अपलोड कर सकें।

  1. cPanel → File Manager में, uploads/ फोल्डर पर राइट-क्लिक करें
  2. Change Permissions पर क्लिक करें
  3. 755 पर सेट करें (Owner: Read/Write/Execute, Group: Read/Execute, Public: Read/Execute)
  4. सुनिश्चित करें कि यह uploads/ के अंदर सभी सबफोल्डर पर लागू हो

वैकल्पिक रूप से, SSH के माध्यम से:

chmod -R 755 uploads/

4 कॉन्फ़िगरेशन फाइल बनाएं

  1. अपनी सर्वर डायरेक्टरी में, env.example नामक फाइल खोजें
  2. इसे कॉपी करें और कॉपी का नाम .env रखें (शुरुआत में डॉट पर ध्यान दें)
  3. .env को एडिट करने के लिए खोलें और अपनी वैल्यू भरें:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 JWT_SECRET कैसे जनरेट करें:
किसी भी ऑनलाइन रैंडम स्ट्रिंग जनरेटर पर जाएं, अक्षरों, संख्याओं और प्रतीकों का उपयोग करके कम से कम 64 अक्षरों की एक स्ट्रिंग जनरेट करें, और इसे JWT_SECRET वैल्यू के रूप में पेस्ट करें। यह प्रत्येक इंस्टॉलेशन के लिए अद्वितीय होनी चाहिए।
⚠ महत्वपूर्ण:
CORS_ORIGIN और APP_URL आपका सटीक डोमेन होना चाहिए जिसमें https:// शामिल हो — अंत में स्लैश नहीं
• यदि Cloudflare या रिवर्स प्रॉक्सी के पीछे हैं, तो TRUST_PROXY=1 सेट करें

5 डेटाबेस इम्पोर्ट करें

  1. cPanel → phpMyAdmin पर जाएं
  2. बाईं साइडबार से अपना डेटाबेस चुनें
  3. शीर्ष पर Import टैब पर क्लिक करें
  4. तीन फाइलें इसी क्रम में इम्पोर्ट करें:

फाइल 1: schema.sql — सभी डेटाबेस टेबल बनाती है

फाइल 2: आपकी पसंदीदा भाषा के लिए seed फाइल:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

फाइल 3: उसी भाषा के लिए checklist seed: seed_checklist_XX.sql

📝 नोट: आप यहां जो भाषा चुनते हैं वह उस भाषा में डिफ़ॉल्ट संदर्भ डेटा (जोखिम स्तर, घटना प्रकार, आदि) सेट करती है। उपयोगकर्ता किसी भी समय इंटरफ़ेस भाषा बदल सकते हैं — यह केवल ड्रॉपडाउन में पहले से लोड किए गए मानों को प्रभावित करता है।

6 सबफोल्डर कॉन्फ़िगरेशन (केवल यदि लागू हो)

इस स्टेप को छोड़ दें यदि HSEBox किसी डोमेन के रूट पर इंस्टॉल है (उदा.: https://hsebox.yourcompany.com)।

यदि आपने इसे सबफोल्डर में इंस्टॉल किया है (उदा.: https://yourcompany.com/hsebox/):

  1. .htaccess फाइल को एडिट करने के लिए खोलें
  2. शीर्ष के पास यह लाइन खोजें (लगभग लाइन 7 पर):
# RewriteBase /your-subfolder-name/

# हटाएं और इसे अपने फोल्डर के नाम से बदलें:

RewriteBase /hsebox/

फाइल सेव करें।

7 पहला एक्सेस और सेटअप

  1. अपना ब्राउज़र खोलें और अपने HSEBox URL पर जाएं (उदा.: https://yourdomain.com)
  2. पहली बार एक्सेस करने पर सेटअप विज़ार्ड स्वचालित रूप से दिखाई देगा
  3. विज़ार्ड का अनुसरण करें:
    • अपनी कंपनी का नाम और विवरण दर्ज करें
    • अपनी कंपनी का लोगो अपलोड करें (वैकल्पिक)
    • एडमिनिस्ट्रेटर अकाउंट बनाएं (ईमेल + पासवर्ड)
    • अपनी लाइसेंस एक्टिवेशन कुंजी दर्ज करें
  4. पूरा होने पर, आप एडमिनिस्ट्रेटर के रूप में लॉग इन हो जाएंगे
🎉 यहां से आप कर सकते हैं:
• अतिरिक्त उपयोगकर्ता बनाएं (Settings → User Management)
• प्रोजेक्ट क्षेत्र कॉन्फ़िगर करें
• HSE मॉड्यूल का उपयोग शुरू करें

8 सत्यापित करें कि सब कुछ काम करता है

सेटअप के बाद, ये त्वरित जांच करें:

जांचक्या करेंअपेक्षित परिणाम
हेल्थ चेक/health पर जाएं{ "status": "ok", "db": true, "jwt": true }
सुरक्षा जांच/.env पर जाएं403 Forbidden त्रुटि (यह सही है)
लॉगिनएडमिन अकाउंट से लॉग इन करेंसभी मॉड्यूल तक पूर्ण पहुंच

🧹 सफाई (वैकल्पिक)

सफल इंस्टॉलेशन के बाद, आप सर्वर से इन फाइलों को सुरक्षित रूप से हटा सकते हैं:

  • schema.sql
  • seed_*.sql (सभी seed फाइलें)
  • seed_checklist_*.sql (सभी checklist seed फाइलें)
  • env.example
ये फाइलें .htaccess द्वारा सुरक्षित हैं इसलिए ब्राउज़र के माध्यम से एक्सेस नहीं की जा सकतीं, लेकिन इन्हें हटाना अच्छी प्रथा है।

🔧 समस्या निवारण

समस्यासमाधान
खाली सफेद पेजcPanel → Select PHP Version में जांचें कि PHP संस्करण 8.1+ है
« Failed to connect » त्रुटिसत्यापित करें कि .env सही डेटाबेस क्रेडेंशियल्स के साथ मौजूद है
ब्राउज़र में CORS त्रुटिसुनिश्चित करें कि .env में CORS_ORIGIN आपके सटीक डोमेन से मेल खाता है
500 Internal Server ErrorcPanel → Error Log जांचें; DB क्रेडेंशियल्स सत्यापित करें
फोटो अपलोड नहीं हो रहींजांचें कि uploads/ फोल्डर की अनुमतियां 755 हैं
अपडेट के बाद पुरानी सामग्रीहार्ड रिफ्रेश करें: Ctrl + Shift + R

मदद चाहिए?

HSEBox सपोर्ट से संपर्क करें:

आपका डोमेन URL · त्रुटि संदेश या स्क्रीनशॉट · cPanel से PHP संस्करण

HSEBox Guida all'Installazione Server

Versione 1.4.0 · Aprile 2026

📋 Prima di Iniziare — Requisiti Minimi

Il vostro hosting deve soddisfare questi requisiti:

RequisitoMinimoRaccomandato
Tipo di hostingcPanel hosting condiviso o server ApachecPanel con accesso SSH
Versione PHP8.18.2 o 8.3
Estensioni PHPpdo_mysql, json, mbstring, mail(solitamente preinstallato)
DatabaseMySQL 5.7+ o MariaDB 10.3+MySQL 8.0+ o MariaDB 10.4+
Server webApache 2.4+ con mod_rewrite
SSL/HTTPSObbligatorio
Spazio su disco50 MB (file dell'app)500 MB+ (per upload)
⚠ Importante: HSEBox non funziona su server solo Nginx. È richiesto Apache con mod_rewrite. La maggior parte dei provider di hosting cPanel usa Apache per impostazione predefinita.

1 Creare il Database

  1. Accedete al vostro pannello di controllo cPanel
  2. Andate su MySQL Databases
  3. Create un nuovo database (es. youruser_hsebox)
  4. Create un nuovo utente database con una password complessa (combinazione di lettere, numeri, simboli — almeno 16 caratteri)
  5. Cliccate su Add User to Database e concedete ALL PRIVILEGES
📝 Prendete nota di questi tre valori — vi serviranno nel Passaggio 4:
• Nome del database   • Nome utente del database   • Password del database

2 Caricare i File dell'Applicazione

  1. Riceverete una cartella chiamata HSEBox Web APP.zip contenente tutti i file dell'applicazione
  2. Aprite cPanel → File Manager (o connettetevi tramite FTP/SFTP)
  3. Navigate nella posizione in cui desiderate installare HSEBox:
    • Dominio principale: andate su public_html/
    • Sottocartella: andate su public_html/nome-della-cartella/
    • Sottodominio: andate nella document root di quel sottodominio
  4. Caricate tutti i file e le cartelle dalla cartella di produzione nella directory scelta

Dopo il caricamento, la directory del server dovrebbe contenere:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Impostare i Permessi delle Cartelle

La cartella uploads/ deve essere scrivibile affinché gli utenti possano caricare foto e documenti.

  1. In cPanel → File Manager, cliccate con il tasto destro sulla cartella uploads/
  2. Cliccate su Change Permissions
  3. Impostate a 755 (Proprietario: Lettura/Scrittura/Esecuzione, Gruppo: Lettura/Esecuzione, Pubblico: Lettura/Esecuzione)
  4. Assicuratevi che questo si applichi a tutte le sottocartelle all'interno di uploads/

In alternativa, tramite SSH:

chmod -R 755 uploads/

4 Creare il File di Configurazione

  1. Nella directory del server, trovate il file chiamato env.example
  2. Copiatelo e rinominate la copia in .env (notate il punto all'inizio)
  3. Aprite .env per la modifica e inserite i vostri valori:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 Come generare JWT_SECRET:
Andate su un qualsiasi generatore di stringhe casuali online, generate una stringa di almeno 64 caratteri utilizzando lettere, numeri e simboli, e incollatela come valore di JWT_SECRET. Questo valore deve essere unico per ogni installazione.
⚠ Importante:
CORS_ORIGIN e APP_URL devono corrispondere esattamente al vostro dominio includendo https:// — senza barra finale
• Se siete dietro Cloudflare o un reverse proxy, impostate TRUST_PROXY=1

5 Importare il Database

  1. Andate su cPanel → phpMyAdmin
  2. Selezionate il vostro database dalla barra laterale sinistra
  3. Cliccate sulla scheda Import in alto
  4. Importate tre file esattamente in questo ordine:

File 1: schema.sql — Crea tutte le tabelle del database

File 2: Il file seed per la lingua preferita:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

File 3: Il file seed checklist per la stessa lingua: seed_checklist_XX.sql

📝 Nota: La lingua scelta qui imposta i dati di riferimento predefiniti (livelli di rischio, tipi di incidente, ecc.) in quella lingua. Gli utenti possono comunque cambiare la lingua dell'interfaccia in qualsiasi momento — questo influisce solo sui valori precaricati nei menu a discesa.

6 Configurazione Sottocartella (solo se applicabile)

Saltate questo passaggio se HSEBox è installato nella root di un dominio (es. https://hsebox.yourcompany.com).

Se lo avete installato in una sottocartella (es. https://yourcompany.com/hsebox/):

  1. Aprite il file .htaccess per la modifica
  2. Trovate questa riga vicino all'inizio (circa alla riga 7):
# RewriteBase /your-subfolder-name/

Rimuovete il # e sostituitelo con il nome della vostra cartella:

RewriteBase /hsebox/

Salvate il file.

7 Primo Accesso e Configurazione

  1. Aprite il browser e andate al vostro URL HSEBox (es. https://yourdomain.com)
  2. La Procedura Guidata di Configurazione apparirà automaticamente al primo accesso
  3. Seguite la procedura guidata per:
    • Inserire il nome e i dettagli della vostra azienda
    • Caricare il logo aziendale (opzionale)
    • Creare l'account amministratore (email + password)
    • Inserire la chiave di attivazione della licenza
  4. Una volta completato, sarete connessi come amministratore
🎉 Da qui potete:
• Creare utenti aggiuntivi (Impostazioni → Gestione Utenti)
• Configurare le aree di progetto
• Iniziare a utilizzare i moduli HSE

8 Verificare che Tutto Funzioni

Dopo la configurazione, eseguite questi controlli rapidi:

ControlloCosa fareRisultato atteso
Controllo statoVisitate /health{ "status": "ok", "db": true, "jwt": true }
Controllo sicurezzaVisitate /.envErrore 403 Forbidden (questo è corretto)
AccessoAccedete con l'account adminAccesso completo a tutti i moduli

🧹 Pulizia (Opzionale)

Dopo un'installazione riuscita, potete rimuovere in sicurezza questi file dal server:

  • schema.sql
  • seed_*.sql (tutti i file seed)
  • seed_checklist_*.sql (tutti i file seed checklist)
  • env.example
Questi file sono protetti da .htaccess quindi non possono essere accessibili tramite browser, ma rimuoverli è una buona pratica.

🔧 Risoluzione dei Problemi

ProblemaSoluzione
Pagina bianca vuotaVerificate che la versione PHP sia 8.1+ in cPanel → Select PHP Version
Errore "Failed to connect"Verificate che .env esista con le credenziali database corrette
Errore CORS nel browserAssicuratevi che CORS_ORIGIN in .env corrisponda esattamente al vostro dominio
500 Internal Server ErrorControllate cPanel → Error Log; verificate le credenziali del DB
Le foto non si caricanoControllate che i permessi della cartella uploads/ siano 755
Contenuto vecchio dopo aggiornamentoAggiornamento forzato: Ctrl + Shift + R

Hai Bisogno di Aiuto?

Contatta il supporto HSEBox con:

URL del vostro dominio · Messaggio di errore o screenshot · Versione PHP dal cPanel

HSEBox Gabay sa Pag-install sa Server

Bersyon 1.4.0 · Abril 2026

📋 Bago Magsimula — Minimum na Kinakailangan

Kailangang matugunan ng iyong hosting ang mga sumusunod na kinakailangan:

KinakailanganMinimumInirerekomenda
Uri ng hostingcPanel shared hosting o Apache servercPanel na may SSH access
Bersyon ng PHP8.18.2 o 8.3
PHP extensionspdo_mysql, json, mbstring, mail(karaniwang naka-install na)
DatabaseMySQL 5.7+ o MariaDB 10.3+MySQL 8.0+ o MariaDB 10.4+
Web serverApache 2.4+ na may mod_rewrite
SSL/HTTPSKinakailangan
Disk space50 MB (app files)500 MB+ (para sa uploads)
⚠ Mahalaga: Hindi gumagana ang HSEBox sa mga Nginx-only server. Kailangan ang Apache na may mod_rewrite. Karamihan ng cPanel hosting providers ay gumagamit ng Apache bilang default.

1 Gumawa ng Database

  1. Mag-log in sa iyong cPanel control panel
  2. Pumunta sa MySQL Databases
  3. Gumawa ng bagong database (hal., youruser_hsebox)
  4. Gumawa ng bagong database user na may matibay na password (halo ng mga letra, numero, simbolo — hindi bababa sa 16 na karakter)
  5. I-click ang Add User to Database at ibigay ang ALL PRIVILEGES
📝 Itala ang tatlong value na ito — kakailanganin mo ang mga ito sa Hakbang 4:
• Pangalan ng database   • Username ng database   • Password ng database

2 I-upload ang mga Application Files

  1. Makakatanggap ka ng folder na tinatawag na HSEBox Web APP.zip na naglalaman ng lahat ng application files
  2. Buksan ang cPanel → File Manager (o kumonekta sa pamamagitan ng FTP/SFTP)
  3. Mag-navigate sa kung saan mo gustong i-install ang HSEBox:
    • Main domain: pumunta sa public_html/
    • Subfolder: pumunta sa public_html/your-folder-name/
    • Subdomain: pumunta sa document root ng subdomain na iyon
  4. I-upload ang lahat ng files at folders mula sa production folder papunta sa iyong napiling directory

Pagkatapos mag-upload, ang iyong server directory ay dapat naglalaman ng:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 I-set ang Folder Permissions

Ang uploads/ folder ay kailangang writable para makapag-upload ang mga user ng mga larawan at dokumento.

  1. Sa cPanel → File Manager, i-right-click ang uploads/ folder
  2. I-click ang Change Permissions
  3. I-set sa 755 (Owner: Read/Write/Execute, Group: Read/Execute, Public: Read/Execute)
  4. Siguraduhing naka-apply ito sa lahat ng subfolders sa loob ng uploads/

Bilang alternatibo, sa pamamagitan ng SSH:

chmod -R 755 uploads/

4 Gumawa ng Configuration File

  1. Sa iyong server directory, hanapin ang file na tinatawag na env.example
  2. Kopyahin ito at palitan ang pangalan ng kopya sa .env (pansinin ang tuldok sa simula)
  3. Buksan ang .env para i-edit at ilagay ang iyong mga value:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 Paano gumawa ng JWT_SECRET:
Pumunta sa kahit anong online random string generator, gumawa ng string na hindi bababa sa 64 na karakter gamit ang mga letra, numero, at simbolo, at i-paste ito bilang JWT_SECRET value. Kailangang natatangi ito para sa bawat installation.
⚠ Mahalaga:
• Ang CORS_ORIGIN at APP_URL ay dapat eksaktong tumugma sa iyong domain kasama ang https:// — walang trailing slash
• Kung nasa likod ng Cloudflare o reverse proxy, i-set ang TRUST_PROXY=1

5 I-import ang Database

  1. Pumunta sa cPanel → phpMyAdmin
  2. Piliin ang iyong database mula sa kaliwang sidebar
  3. I-click ang Import tab sa itaas
  4. Mag-import ng tatlong files sa eksaktong pagkakasunod-sunod na ito:

File 1: schema.sql — Gumagawa ng lahat ng database tables

File 2: Ang seed file para sa iyong gustong wika:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

File 3: Ang checklist seed para sa parehong wika: seed_checklist_XX.sql

📝 Paalala: Ang wikang pipiliin mo dito ang magtatakda ng default na reference data (risk levels, incident types, atbp.) sa wikang iyon. Maaari pa ring palitan ng mga user ang wika ng interface anumang oras — naaapektuhan lang nito ang mga pre-loaded na dropdown values.

6 Subfolder Configuration (kung kinakailangan lamang)

Laktawan ang hakbang na ito kung ang HSEBox ay naka-install sa root ng isang domain (hal., https://hsebox.yourcompany.com).

Kung in-install mo ito sa isang subfolder (hal., https://yourcompany.com/hsebox/):

  1. Buksan ang .htaccess file para i-edit
  2. Hanapin ang linyang ito malapit sa itaas (mga linya 7):
# RewriteBase /your-subfolder-name/

Alisin ang # at palitan ito ng pangalan ng iyong folder:

RewriteBase /hsebox/

I-save ang file.

7 Unang Access at Setup

  1. Buksan ang iyong browser at pumunta sa iyong HSEBox URL (hal., https://yourdomain.com)
  2. Awtomatikong lalabas ang Setup Wizard sa unang access
  3. Sundin ang wizard para:
    • Ilagay ang pangalan at detalye ng iyong kumpanya
    • I-upload ang logo ng kumpanya (opsyonal)
    • Gumawa ng administrator account (email + password)
    • Ilagay ang iyong license activation key
  4. Kapag tapos na, naka-log in ka na bilang administrator
🎉 Mula dito maaari kang:
• Gumawa ng karagdagang mga user (Settings → User Management)
• I-configure ang mga project area
• Simulan ang paggamit ng mga HSE module

8 I-verify na Gumagana ang Lahat

Pagkatapos ng setup, gawin ang mga mabilisang pagsusuri na ito:

PagsusuriGagawinInaasahang resulta
Health checkBisitahin ang /health{ "status": "ok", "db": true, "jwt": true }
Security checkBisitahin ang /.env403 Forbidden error (tama ito)
LoginMag-log in gamit ang admin accountBuong access sa lahat ng modules

🧹 Paglilinis (Opsyonal)

Pagkatapos ng matagumpay na pag-install, maaari mong ligtas na alisin ang mga file na ito mula sa server:

  • schema.sql
  • seed_*.sql (lahat ng seed files)
  • seed_checklist_*.sql (lahat ng checklist seed files)
  • env.example
Ang mga file na ito ay protektado ng .htaccess kaya hindi ma-access sa pamamagitan ng browser, ngunit magandang practice ang pag-alis ng mga ito.

🔧 Pag-troubleshoot

ProblemaSolusyon
Blangkong puting pahinaTingnan kung ang PHP version ay 8.1+ sa cPanel → Select PHP Version
"Failed to connect" errorI-verify na umiiral ang .env na may tamang database credentials
CORS error sa browserSiguraduhing ang CORS_ORIGIN sa .env ay eksaktong tumutugma sa iyong domain
500 Internal Server ErrorTingnan ang cPanel → Error Log; i-verify ang DB credentials
Hindi nag-a-upload ang mga larawanTingnan kung ang uploads/ folder permissions ay 755
Lumang content pagkatapos mag-updateHard refresh: Ctrl + Shift + R

Kailangan ng Tulong?

Makipag-ugnayan sa HSEBox support gamit ang:

Iyong domain URL · Error message o screenshot · PHP version mula sa cPanel

HSEBox Sunucu Kurulum Kılavuzu

Sürüm 1.4.0 · Nisan 2026

📋 Başlamadan Önce — Minimum Gereksinimler

Hosting hizmetiniz aşağıdaki gereksinimleri karşılamalıdır:

GereksinimMinimumÖnerilen
Hosting türücPanel paylaşımlı hosting veya Apache sunucuSSH erişimli cPanel
PHP sürümü8.18.2 veya 8.3
PHP eklentileripdo_mysql, json, mbstring, mail(genellikle önceden yüklü)
VeritabanıMySQL 5.7+ veya MariaDB 10.3+MySQL 8.0+ veya MariaDB 10.4+
Web sunucusuApache 2.4+ ile mod_rewrite
SSL/HTTPSGerekli
Disk alanı50 MB (uygulama dosyaları)500 MB+ (yüklemeler için)
⚠ Önemli: HSEBox yalnızca Nginx sunucularında çalışmaz. mod_rewrite etkinleştirilmiş Apache gereklidir. Çoğu cPanel hosting sağlayıcısı varsayılan olarak Apache kullanır.

1 Veritabanını Oluşturun

  1. cPanel kontrol panelinize giriş yapın
  2. MySQL Databases bölümüne gidin
  3. Yeni bir veritabanı oluşturun (örn. youruser_hsebox)
  4. Güçlü bir parola ile yeni bir veritabanı kullanıcısı oluşturun (harf, rakam ve sembol karışımı — en az 16 karakter)
  5. Add User to Database seçeneğine tıklayın ve ALL PRIVILEGES yetkisi verin
📝 Bu üç değeri not edin — 4. Adımda bunlara ihtiyacınız olacak:
• Veritabanı adı   • Veritabanı kullanıcı adı   • Veritabanı parolası

2 Uygulama Dosyalarını Yükleyin

  1. Tüm uygulama dosyalarını içeren HSEBox Web APP.zip adlı bir klasör alacaksınız
  2. cPanel → File Manager bölümünü açın (veya FTP/SFTP ile bağlanın)
  3. HSEBox'ı kurmak istediğiniz konuma gidin:
    • Ana alan adı: public_html/ dizinine gidin
    • Alt klasör: public_html/klasor-adiniz/ dizinine gidin
    • Alt alan adı: ilgili alt alan adının belge kök dizinine gidin
  4. Üretim klasöründeki tüm dosya ve klasörleri seçtiğiniz dizine yükleyin

Yükleme sonrası sunucu dizininiz şunları içermelidir:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 Klasör İzinlerini Ayarlayın

uploads/ klasörünün yazılabilir olması gerekir, böylece kullanıcılar fotoğraf ve belge yükleyebilir.

  1. cPanel → File Manager bölümünde uploads/ klasörüne sağ tıklayın
  2. Change Permissions seçeneğine tıklayın
  3. 755 olarak ayarlayın (Sahip: Okuma/Yazma/Çalıştırma, Grup: Okuma/Çalıştırma, Genel: Okuma/Çalıştırma)
  4. Bu ayarın uploads/ içindeki tüm alt klasörlere uygulandığından emin olun

Alternatif olarak, SSH ile:

chmod -R 755 uploads/

4 Yapılandırma Dosyasını Oluşturun

  1. Sunucu dizininizde env.example adlı dosyayı bulun
  2. Bu dosyayı kopyalayın ve kopyasını .env olarak yeniden adlandırın (başındaki noktaya dikkat edin)
  3. .env dosyasını düzenleme için açın ve değerlerinizi girin:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 JWT_SECRET nasıl oluşturulur:
Herhangi bir çevrimiçi rastgele dize oluşturucuya gidin, harf, rakam ve sembollerden oluşan en az 64 karakterlik bir dize oluşturun ve JWT_SECRET değeri olarak yapıştırın. Bu, her kurulum için benzersiz olmalıdır.
⚠ Önemli:
CORS_ORIGIN ve APP_URL, https:// dahil tam alan adınız olmalıdır — sonunda eğik çizgi olmadan
• Cloudflare veya ters proxy arkasındaysanız, TRUST_PROXY=1 olarak ayarlayın

5 Veritabanını İçe Aktarın

  1. cPanel → phpMyAdmin bölümüne gidin
  2. Sol kenar çubuğundan veritabanınızı seçin
  3. Üst kısımdaki Import sekmesine tıklayın
  4. Üç dosyayı tam olarak bu sırayla içe aktarın:

Dosya 1: schema.sql — Tüm veritabanı tablolarını oluşturur

Dosya 2: Tercih ettiğiniz dil için seed dosyası:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

Dosya 3: Aynı dil için checklist seed dosyası: seed_checklist_XX.sql

📝 Not: Burada seçtiğiniz dil, varsayılan referans verilerini (risk seviyeleri, olay türleri vb.) o dilde ayarlar. Kullanıcılar arayüz dilini istedikleri zaman değiştirebilir — bu yalnızca önceden yüklenmiş açılır menü değerlerini etkiler.

6 Alt Klasör Yapılandırması (yalnızca gerekirse)

HSEBox bir alan adının kök dizinine kurulduysa (örn. https://hsebox.yourcompany.com) bu adımı atlayın.

Bir alt klasöre kurduysanız (örn. https://yourcompany.com/hsebox/):

  1. .htaccess dosyasını düzenleme için açın
  2. Dosyanın üst kısmında (yaklaşık 7. satır) şu satırı bulun:
# RewriteBase /your-subfolder-name/

# işaretini kaldırın ve klasör adınızı yazın:

RewriteBase /hsebox/

Dosyayı kaydedin.

7 İlk Erişim ve Kurulum

  1. Tarayıcınızı açın ve HSEBox URL'nize gidin (örn. https://yourdomain.com)
  2. İlk erişimde Kurulum Sihirbazı otomatik olarak görünecektir
  3. Sihirbazı takip ederek şunları yapın:
    • Şirket adınızı ve bilgilerinizi girin
    • Şirket logonuzu yükleyin (isteğe bağlı)
    • Yönetici hesabını oluşturun (e-posta + parola)
    • Lisans aktivasyon anahtarınızı girin
  4. Tamamlandığında yönetici olarak giriş yapmış olacaksınız
🎉 Buradan itibaren şunları yapabilirsiniz:
• Ek kullanıcılar oluşturun (Ayarlar → Kullanıcı Yönetimi)
• Proje alanlarını yapılandırın
• HSE modüllerini kullanmaya başlayın

8 Her Şeyin Çalıştığını Doğrulayın

Kurulumdan sonra şu hızlı kontrolleri yapın:

KontrolNe yapmalıBeklenen sonuç
Sağlık kontrolü/health adresini ziyaret edin{ "status": "ok", "db": true, "jwt": true }
Güvenlik kontrolü/.env adresini ziyaret edin403 Forbidden hatası (bu doğrudur)
GirişYönetici hesabıyla giriş yapınTüm modüllere tam erişim

🧹 Temizlik (İsteğe Bağlı)

Başarılı kurulumdan sonra bu dosyaları sunucudan güvenle silebilirsiniz:

  • schema.sql
  • seed_*.sql (tüm seed dosyaları)
  • seed_checklist_*.sql (tüm checklist seed dosyaları)
  • env.example
Bu dosyalar .htaccess tarafından korunmaktadır, bu nedenle tarayıcı üzerinden erişilemezler, ancak kaldırmak iyi bir uygulamadır.

🔧 Sorun Giderme

SorunÇözüm
Boş beyaz sayfacPanel → Select PHP Version bölümünden PHP sürümünün 8.1+ olduğunu kontrol edin
"Failed to connect" hatası.env dosyasının doğru veritabanı bilgileriyle var olduğunu doğrulayın
Tarayıcıda CORS hatası.env dosyasındaki CORS_ORIGIN değerinin tam alan adınızla eşleştiğinden emin olun
500 Internal Server ErrorcPanel → Error Log bölümünü kontrol edin; veritabanı bilgilerini doğrulayın
Fotoğraflar yüklenmiyoruploads/ klasör izinlerinin 755 olduğunu kontrol edin
Güncellemeden sonra eski içerikSayfayı zorla yenileyin: Ctrl + Shift + R

Yardıma İhtiyacınız Var mı?

HSEBox destek ile iletişime geçin:

Alan adı URL'niz · Hata mesajı veya ekran görüntüsü · cPanel'deki PHP sürümü

HSEBox سرور انسٹالیشن گائیڈ

ورژن 1.4.0 · اپریل 2026

📋 شروع کرنے سے پہلے — کم از کم ضروریات

آپ کی ہوسٹنگ کو ان ضروریات کو پورا کرنا ضروری ہے:

ضرورتکم از کمتجویز کردہ
ہوسٹنگ کی قسمcPanel شیئرڈ ہوسٹنگ یا Apache سرورSSH رسائی کے ساتھ cPanel
PHP ورژن8.18.2 یا 8.3
PHP ایکسٹینشنزpdo_mysql, json, mbstring, mail(عام طور پر پہلے سے انسٹال)
ڈیٹابیسMySQL 5.7+ یا MariaDB 10.3+MySQL 8.0+ یا MariaDB 10.4+
ویب سرورApache 2.4+ مع mod_rewrite
SSL/HTTPSضروری
ڈسک اسپیس50 MB (ایپ فائلز)500 MB+ (اپ لوڈز کے لیے)
⚠ اہم: HSEBox صرف Nginx سرورز پر کام نہیں کرتا۔ mod_rewrite کے ساتھ Apache ضروری ہے۔ زیادہ تر cPanel ہوسٹنگ فراہم کنندگان ڈیفالٹ طور پر Apache استعمال کرتے ہیں۔

1 ڈیٹابیس بنائیں

  1. اپنے cPanel کنٹرول پینل میں لاگ ان کریں
  2. MySQL Databases پر جائیں
  3. ایک نیا ڈیٹابیس بنائیں (مثلاً youruser_hsebox)
  4. ایک مضبوط پاس ورڈ کے ساتھ نیا ڈیٹابیس صارف بنائیں (حروف، نمبرز اور علامات کا مرکب — کم از کم 16 حروف)
  5. Add User to Database پر کلک کریں اور ALL PRIVILEGES دیں
📝 یہ تین اقدار نوٹ کریں — مرحلہ 4 میں ان کی ضرورت ہوگی:
• ڈیٹابیس کا نام   • ڈیٹابیس صارف نام   • ڈیٹابیس پاس ورڈ

2 ایپلیکیشن فائلز اپ لوڈ کریں

  1. آپ کو HSEBox Web APP.zip نامی فولڈر ملے گا جس میں تمام ایپلیکیشن فائلز ہوں گی
  2. cPanel → File Manager کھولیں (یا FTP/SFTP سے جڑیں)
  3. اس جگہ جائیں جہاں آپ HSEBox انسٹال کرنا چاہتے ہیں:
    • مرکزی ڈومین: public_html/ پر جائیں
    • سب فولڈر: public_html/your-folder-name/ پر جائیں
    • سب ڈومین: اس سب ڈومین کی ڈاکیومنٹ روٹ پر جائیں
  4. پروڈکشن فولڈر سے تمام فائلز اور فولڈرز اپنی منتخب ڈائریکٹری میں اپ لوڈ کریں

اپ لوڈ کے بعد، آپ کی سرور ڈائریکٹری میں یہ ہونا چاہیے:

your-directory/ ├── .htaccess ├── index.html ├── index.php ├── config.php ├── env.example ├── favicon.ico ├── hsebox-logo.png ├── schema.sql ├── seed_en.sql (or your language) ├── seed_checklist_en.sql (or your language) ├── assets/ (JavaScript, CSS, images) ├── core/ (PHP backend classes) ├── routes/ (PHP API routes) └── uploads/ (empty folders for user uploads) ├── activities/ ├── client-documents/ ├── company-logo/ ├── incidents/ ├── observations/ └── permits/

3 فولڈر پرمیشنز سیٹ کریں

uploads/ فولڈر کو قابل تحریر ہونا ضروری ہے تاکہ صارفین تصاویر اور دستاویزات اپ لوڈ کر سکیں۔

  1. cPanel → File Manager میں uploads/ فولڈر پر رائٹ کلک کریں
  2. Change Permissions پر کلک کریں
  3. 755 سیٹ کریں (مالک: پڑھنا/لکھنا/چلانا، گروپ: پڑھنا/چلانا، عوام: پڑھنا/چلانا)
  4. یقینی بنائیں کہ یہ uploads/ کے اندر تمام سب فولڈرز پر لاگو ہو

متبادل طور پر، SSH کے ذریعے:

chmod -R 755 uploads/

4 کنفیگریشن فائل بنائیں

  1. اپنی سرور ڈائریکٹری میں env.example نامی فائل تلاش کریں
  2. اس کی کاپی بنائیں اور کاپی کا نام .env رکھیں (شروع میں نقطے پر دھیان دیں)
  3. .env فائل کو ایڈٹنگ کے لیے کھولیں اور اپنی اقدار درج کریں:
# Database (from Step 1) DB_HOST=localhost DB_PORT=3306 DB_NAME=youruser_hsebox DB_USER=youruser_dbuser DB_PASS=your_database_password # Security Token JWT_SECRET=paste_your_64_character_random_string_here JWT_EXPIRY=604800 # Your Domain (must match exactly, including https://) CORS_ORIGIN=https://yourdomain.com APP_URL=https://yourdomain.com # Production Settings (do not change) APP_ENV=production DEBUG=0 TRUST_PROXY=0 AUTO_SEED_DICTIONARIES=1 MAX_UPLOAD_SIZE=10485760 ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp,image/gif
🔑 JWT_SECRET کیسے بنائیں:
کسی بھی آن لائن رینڈم سٹرنگ جنریٹر پر جائیں، حروف، نمبرز اور علامات کے ساتھ کم از کم 64 حروف کی سٹرنگ بنائیں اور JWT_SECRET کی قدر کے طور پر پیسٹ کریں۔ یہ ہر انسٹالیشن کے لیے منفرد ہونا ضروری ہے۔
⚠ اہم:
CORS_ORIGIN اور APP_URL آپ کا عین مطابق ڈومین ہونا چاہیے بشمول https:// — آخر میں سلیش نہیں
• اگر Cloudflare یا ریورس پراکسی کے پیچھے ہیں تو TRUST_PROXY=1 سیٹ کریں

5 ڈیٹابیس امپورٹ کریں

  1. cPanel → phpMyAdmin پر جائیں
  2. بائیں سائیڈبار سے اپنا ڈیٹابیس منتخب کریں
  3. اوپر Import ٹیب پر کلک کریں
  4. تین فائلیں بالکل اسی ترتیب سے امپورٹ کریں:

فائل 1: schema.sql — تمام ڈیٹابیس ٹیبلز بناتی ہے

فائل 2: اپنی پسندیدہ زبان کے لیے سیڈ فائل:

LanguageFile
Englishseed_en.sql
Arabicseed_ar.sql
Germanseed_de.sql
Spanishseed_es.sql
Filipinoseed_fil.sql
Frenchseed_fr.sql
Hindiseed_hi.sql
Italianseed_it.sql
Portugueseseed_pt.sql
Turkishseed_tr.sql
Urduseed_ur.sql

فائل 3: اسی زبان کے لیے چیک لسٹ سیڈ فائل: seed_checklist_XX.sql

📝 نوٹ: یہاں آپ جو زبان منتخب کرتے ہیں وہ ڈیفالٹ ریفرنس ڈیٹا (خطرے کی سطحیں، واقعے کی اقسام وغیرہ) اس زبان میں سیٹ کرتی ہے۔ صارفین کسی بھی وقت انٹرفیس کی زبان تبدیل کر سکتے ہیں — یہ صرف پہلے سے لوڈ شدہ ڈراپ ڈاؤن اقدار کو متاثر کرتا ہے۔

6 سب فولڈر کنفیگریشن (صرف اگر ضرورت ہو)

اگر HSEBox کسی ڈومین کی روٹ پر انسٹال ہے (مثلاً https://hsebox.yourcompany.com) تو یہ مرحلہ چھوڑ دیں۔

اگر آپ نے اسے سب فولڈر میں انسٹال کیا ہے (مثلاً https://yourcompany.com/hsebox/):

  1. .htaccess فائل کو ایڈٹنگ کے لیے کھولیں
  2. فائل کے اوپری حصے میں (تقریباً لائن 7 کے قریب) یہ لائن تلاش کریں:
# RewriteBase /your-subfolder-name/

# ہٹائیں اور اپنے فولڈر کا نام لکھیں:

RewriteBase /hsebox/

فائل محفوظ کریں۔

7 پہلی رسائی اور سیٹ اپ

  1. اپنا براؤزر کھولیں اور اپنے HSEBox URL پر جائیں (مثلاً https://yourdomain.com)
  2. پہلی رسائی پر سیٹ اپ وزرڈ خود بخود ظاہر ہوگا
  3. وزرڈ کی پیروی کریں:
    • اپنی کمپنی کا نام اور تفصیلات درج کریں
    • اپنی کمپنی کا لوگو اپ لوڈ کریں (اختیاری)
    • ایڈمنسٹریٹر اکاؤنٹ بنائیں (ای میل + پاس ورڈ)
    • اپنی لائسنس ایکٹیویشن کی درج کریں
  4. مکمل ہونے پر، آپ ایڈمنسٹریٹر کے طور پر لاگ ان ہو جائیں گے
🎉 یہاں سے آپ یہ کر سکتے ہیں:
• اضافی صارفین بنائیں (سیٹنگز → صارف مینجمنٹ)
• پراجیکٹ ایریاز کنفیگر کریں
• HSE ماڈیولز استعمال شروع کریں

8 تصدیق کریں کہ سب کچھ کام کرتا ہے

سیٹ اپ کے بعد یہ فوری جانچ کریں:

جانچکیا کریںمتوقع نتیجہ
ہیلتھ چیک/health وزٹ کریں{ "status": "ok", "db": true, "jwt": true }
سیکیورٹی چیک/.env وزٹ کریں403 Forbidden ایرر (یہ درست ہے)
لاگ انایڈمن اکاؤنٹ سے لاگ ان کریںتمام ماڈیولز تک مکمل رسائی

🧹 صفائی (اختیاری)

کامیاب انسٹالیشن کے بعد آپ یہ فائلز سرور سے محفوظ طریقے سے حذف کر سکتے ہیں:

  • schema.sql
  • seed_*.sql (تمام سیڈ فائلز)
  • seed_checklist_*.sql (تمام چیک لسٹ سیڈ فائلز)
  • env.example
یہ فائلز .htaccess سے محفوظ ہیں اس لیے براؤزر سے قابل رسائی نہیں ہیں، لیکن انہیں ہٹانا اچھا عمل ہے۔

🔧 مسائل کا حل

مسئلہحل
خالی سفید صفحہcPanel → Select PHP Version میں PHP ورژن 8.1+ ہونے کی تصدیق کریں
"Failed to connect" ایررتصدیق کریں کہ .env درست ڈیٹابیس اسناد کے ساتھ موجود ہے
براؤزر میں CORS ایرریقینی بنائیں کہ .env میں CORS_ORIGIN آپ کے عین مطابق ڈومین سے میل کھاتا ہے
500 Internal Server ErrorcPanel → Error Log چیک کریں؛ ڈیٹابیس اسناد کی تصدیق کریں
تصاویر اپ لوڈ نہیں ہو رہیںuploads/ فولڈر کی پرمیشنز 755 ہونے کی تصدیق کریں
اپ ڈیٹ کے بعد پرانا موادزبردستی ریفریش کریں: Ctrl + Shift + R

مدد چاہیے؟

HSEBox سپورٹ سے رابطہ کریں:

آپ کا ڈومین URL · ایرر میسج یا اسکرین شاٹ · cPanel سے PHP ورژن

✅ Thank you! We will contact you soon.

Head Office: Rua Quinta d'Arca, Lot B9, Lower Level, Chainça – Abrantes, 2200-172 Abrantes, Portugal - Europe.

HSEBox and Mastery Hub Academy™

are registered trademarks of HSEBox Technologies, Lda.

We proudly offer our services and training programs worldwide.