Local setup
How to get a fork of INACT running on your own machine. Every fork installs the same way; only the .env differs.
How this page was verified
Written from master on 2026-09-06: the README, the env example, the bootstrap files and the deploy README. The shared database host facts come from the team's notes.
What you need on your machine
| Need | Why |
|---|---|
| PHP 7.3 | The QA and production boxes run 7.3. Newer PHP breaks on old code; php7.3 is what the JOTRE consumer calls explicitly. |
PHP extensions: pdo plus the driver you use (pdo_mysql, pdo_pgsql or pdo_sqlsrv with the Microsoft ODBC Driver), xml, mbstring, iconv, gd, zip, curl, mongodb | README.md names ext_xml and PDO. The code also calls mb_*, iconv, imagecreate*, ZipArchive and cURL, and composer.json requires mongodb/mongodb, which needs the mongodb extension. ldap only if you work on LDAP login. |
| Composer | composer install pulls Slim, illuminate/database, phinx, PhpSpreadsheet, TCPDF, HTML2PDF, PHPMailer, MongoDB and symfony/dotenv. |
| A web server that runs PHP with the repo root as docroot | Apache (the repo ships a .htaccess that only blocks .env), nginx with php-fpm (the Rumah box), or IIS (the Windows Server box and Tomori). There is no front controller rewrite; main.php is called directly. |
| A database: MySQL 5.7, PostgreSQL 14 or SQL Server 2019 | One code base, three drivers. Use the driver your instance runs in production; the instance pages say which. |
Write access to docUpload/ and docTemp/ | Uploaded files and temporary files. |
You do not need ionCube. The plain repositories are ordinary PHP. The encoded builds live in the *-encrypted twins and cannot run on an Apple-silicon Mac at all, so test those on the QA sites.
Steps
Clone the fork you work on, for example
git clone [email protected]:binari-digital/ina-jadestone.git.composer install.Copy
.env.exampleto.envand fill it in, see below.Point a virtual host at the repository root. The convention on developer machines is
inact-<instance>.<your-domain>, one host per fork, so edits are served live with no build step.Create the database, then:
bashphp vendor/bin/phinx migrate php vendor/bin/phinx seed:runphinx.phpreads.envthroughdb_config.php, so no separate phinx config is needed. Migrations and seeds live underdb/.Add the two cron entries from the README if you need email or the procurement queue locally:
text* * * * * php /path/to/inact/cron/inact_mailgun_curl.php >> /dev/null 2>&1 * * * * * php /path/to/inact/cron/cron_submit_queue.php >> /dev/null 2>&1Open the site. First login is the super-admin from
inact_super_admin(default[email protected]), see Users and Privileges.
The .env file
| Key | Meaning |
|---|---|
DEFAULT_LOCATION | The name of the default "location". INACT has a legacy multi-location scheme: connect.php builds $_DB[<location>] from the DB_* keys, and senslid_database_selector.php picks the location from the first segment of the request URL, falling back to this default. On a normal install there is one location. |
INCLUDES_URL | Base URL for templates/, includes/ and image/. Usually the site URL. |
DB_CONNECTION | mysql, postgres or mssql. db_config.php maps these to the PDO driver names mysql, pgsql and sqlsrv in the DB_DRIVER constant. |
DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME | The database. |
DB_TRUSTCERTIFICATE | SQL Server only: 1 to accept the server certificate. |
MONGO_HOST, MONGO_PORT, MONGO_DBNAME, MONGO_USERNAME, MONGO_PASSWORD | setting.php constructs a MongoDB\Client at boot from these. The client connects lazily, so an unreachable Mongo only breaks the features that use it: the activity log module and the log helpers in inweb.lib.php. |
NOTIF_OVERDUE_SINCE_DAY | Look-ahead for the overdue cron, see Cron jobs. |
ROUTING_DIGEST_DEBUG | true makes the digest cron verbose. |
PHP_PATH | The PHP binary, for scripts that shell out. |
EMAIL_QUOTA_PER_DAY, EMAIL_TOTAL_PER_BATCH | Optional, read by the mail cron; not in the example file. |
The application's own settings, branding, feature flags and defaults, are not in .env. They are rows in the inweb_config table, see inweb_config.
Which database to point at
Each fork's checkout on a developer machine points its .env at the shared dev database host rather than a local server, so "does this bug affect instance X" can be answered with real data:
| Host | What runs there |
|---|---|
192.168.1.52, the db VM on the office LAN | MySQL 5.6 and 5.7, PostgreSQL 12, 13 and 14, SQL Server 2019, each as a Docker container. SSH as ubuntu@db. |
192.168.1.110 | The SQL Server that holds Tomori's snapshot. |
The database names and ports per fork are on the instance pages. Master's test database inact-v3-eris exists on all three engines and is nearly empty; Medco's and Jadestone's are production snapshots and are the better place to try a query against real data. Production databases are elsewhere; the dev host only receives dump restores.
A migration you run locally touches only the snapshot you point at. Shared dev and staging migrate themselves on deploy, see Environments and deploy.
Checking that it works
- The login page renders and the super-admin can log in.
- Document Routing, Inbox loads its grid. The grids are dhtmlxGrid fed by
&xml=1requests; a blank grid with a working page usually means a query failed on your driver, see Database portability. php vendor/bin/phinx statusshows no pending migrations.
Gotchas
globals.phpemulatesregister_globals. Every request variable is also a plain PHP variable ($_POST['id']is also$id). Old code relies on it. Do not "fix" a variable that looks undefined before checking the request.- The legacy query helper throws on entry in master, Jadestone, Medco and Timas. A screen that dies with "Error Processing Request" reached
iw_mysql_query(). See Database portability. - PHP 8 is not supported. The code uses removed functions and relies on
register_globalsemulation. - Windows paths are real for Tomori. Test path handling there through the QA site, not locally.