doctor

doctor combines checks for PHP, extensions, project files, repository access and basic security into one diagnostic report.

DiagnosticsVersion 1.1.4Stable
lil-terminal

Overview

Start with doctor when the same lil-terminal build behaves differently on two hosting accounts. Then narrow the report to platform, extensions, files, repo or security.

Find the failing layer first

doctor does not repair the server automatically. Its job is to separate platform limits, missing extensions, filesystem problems, repository connectivity and security configuration so the next action is based on evidence instead of guesswork.

Syntax

lil-terminal
doctor [group] [-q|-j]

Reference

doctor

check everything

doctor platform

show PHP, SAPI, limits, session and OPcache checks

doctor extensions

show PHP extension checks

doctor files

check project paths, permissions and storage

doctor repo

check the lil-repository

doctor security

check HTTPS, authorization and cookies

-q

show warnings and failures only

-j

return machine-readable JSON

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Check project files, then show only problems

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install doctor
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install doctor -m
Exact public version

Install exactly this published version.

install doctor -v 1.1.4
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade doctor
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install doctor -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Check project files, then show only problems
doctor
Training example — PHP environment, server and repository responses are simulated
PLATFORM          
+ php             8.4.24 cli
+ memory          -1
+ execution       0 s
+ upload          upload 2M, post 8M
+ session         /var/lib/php/sessions
! opcache         disabled or unavailable

EXTENSIONS        
+ session         loaded
+ json            loaded
+ tokenizer       loaded
+ filter          loaded
+ hash            loaded
+ pcre            loaded
! curl            optional
+ openssl         loaded
+ fileinfo        loaded
! mbstring        optional
! zip             optional
+ phar            loaded
! mysqli          optional
! imap            optional
+ exif            loaded
! imagick         optional
+ sodium          loaded
+ zlib            loaded
! bz2             optional

FILES             
+ lil             training-runtime/lil.php [w]
+ cwd             sandbox [w]
+ base            sandbox [w]
! extensions      training-runtime/sandbox_fixture/extensions.php [ro]
+ temp            /tmp [w]
+ disk            29.7 GB free of 31.5 GB
! asset-css       not installed
! asset-js        not installed

REPO              
+ endpoint        https://repo.lil.dog
! install-api     undefined
+ installer       latest v1.4.6

SECURITY          
! https           not detected
! authorization   disabled build
+ display-errors  0
+ url-include     
! expose-php      1
! cookie          HttpOnly off, Secure off
+ lil-mode        0644

OK                27
WARN              16
FAIL              0
Show PHP, SAPI, limits, session and OPcache checks
doctor platform
Training example — PHP environment, server and repository responses are simulated
+ php        8.4.24 cli
+ memory     -1
+ execution  0 s
+ upload     upload 2M, post 8M
+ session    /var/lib/php/sessions
! opcache    disabled or unavailable

OK           5
WARN         1
FAIL         0
Show PHP extension checks
doctor extensions
Training example — PHP environment, server and repository responses are simulated
+ session    loaded
+ json       loaded
+ tokenizer  loaded
+ filter     loaded
+ hash       loaded
+ pcre       loaded
! curl       optional
+ openssl    loaded
+ fileinfo   loaded
! mbstring   optional
! zip        optional
+ phar       loaded
! mysqli     optional
! imap       optional
+ exif       loaded
! imagick    optional
+ sodium     loaded
+ zlib       loaded
! bz2        optional

OK           12
WARN         7
FAIL         0
Check project paths, permissions and storage
doctor files
Training example — PHP environment, server and repository responses are simulated
+ lil         training-runtime/lil.php [w]
+ cwd         sandbox [w]
+ base        sandbox [w]
! extensions  training-runtime/sandbox_fixture/extensions.php [ro]
+ temp        /tmp [w]
+ disk        29.7 GB free of 31.5 GB
! asset-css   not installed
! asset-js    not installed

OK            5
WARN          3
FAIL          0
Check the lil-repository
doctor repo
Training example — PHP environment, server and repository responses are simulated
+ endpoint     https://repo.lil.dog
! install-api  undefined
+ installer    latest v1.4.6

OK             2
WARN           1
FAIL           0
Check HTTPS, authorization and cookies
doctor security
Training example — PHP environment, server and repository responses are simulated
! https           not detected
! authorization   disabled build
+ display-errors  0
+ url-include     
! expose-php      1
! cookie          HttpOnly off, Secure off
+ lil-mode        0644

OK                3
WARN              4
FAIL              0
Show warnings and failures only
doctor -q
Training example — PHP environment, server and repository responses are simulated
PLATFORM         
! opcache        disabled or unavailable

EXTENSIONS       
! curl           optional
! mbstring       optional
! zip            optional
! mysqli         optional
! imap           optional
! imagick        optional
! bz2            optional

FILES            
! extensions     training-runtime/sandbox_fixture/extensions.php [ro]
! asset-css      not installed
! asset-js       not installed

REPO             
! install-api    undefined

SECURITY         
! https          not detected
! authorization  disabled build
! expose-php     1
! cookie         HttpOnly off, Secure off

OK               27
WARN             16
FAIL             0
Return machine-readable JSON
doctor -j
Training example — PHP environment, server and repository responses are simulated
{
    "summary": {
        "ok": 27,
        "warn": 16,
        "fail": 0
    },
    "checks": [
        {
            "group": "platform",
            "name": "php",
            "status": "ok",
            "detail": "8.4.24 cli"
        },
        {
            "group": "platform",
            "name": "memory",
            "status": "ok",
            "detail": "-1"
        },
        {
            "group": "platform",
            "name": "execution",
            "status": "ok",
            "detail": "0 s"
        },
        {
            "group": "platform",
            "name": "upload",
            "status": "ok",
            "detail": "upload 2M, post 8M"
        },
        {
            "group": "platform",
            "name": "session",
            "status": "ok",
            "detail": "/var/lib/php/sessions"
        },
        {
            "group": "platform",
            "name": "opcache",
            "status": "warn",
            "detail": "disabled or unavailable"
        },
        {
            "group": "extensions",
            "name": "session",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "json",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "tokenizer",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "filter",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "hash",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "pcre",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "curl",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "openssl",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "fileinfo",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "mbstring",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "zip",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "phar",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "mysqli",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "imap",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "exif",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "imagick",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "sodium",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "zlib",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "bz2",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "files",
            "name": "lil",
            "status": "ok",
            "detail": "training-runtime/lil.php [w]"
        },
        {
            "group": "files",
            "name": "cwd",
            "status": "ok",
            "detail": "sandbox [w]"
        },
        {
            "group": "files",
            "name": "base",
            "status": "ok",
            "detail": "sandbox [w]"
        },
        {
            "group": "files",
            "name": "extensions",
            "status": "warn",
            "detail": "training-runtime/sandbox_fixture/extensions.php [ro]"
        },
        {
            "group": "files",
            "name": "temp",
            "status": "ok",
            "detail": "/tmp [w]"
        },
        {
            "group": "files",
            "name": "disk",
            "status": "ok",
            "detail": "29.7 GB free of 31.5 GB"
        },
        {
            "group": "files",
            "name": "asset-css",
            "status": "warn",
            "detail": "not installed"
        },
        {
            "group": "files",
            "name": "asset-js",
            "status": "warn",
            "detail": "not installed"
        },
        {
            "group": "repo",
            "name": "endpoint",
            "status": "ok",
            "detail": "https://repo.lil.dog"
        },
        {
            "group": "repo",
            "name": "install-api",
            "status": "warn",
            "detail": "undefined"
        },
        {
            "group": "repo",
            "name": "installer",
            "status": "ok",
            "detail": "latest v1.4.6"
        },
        {
            "group": "security",
            "name": "https",
            "status": "warn",
            "detail": "not detected"
        },
        {
            "group": "security",
            "name": "authorization",
            "status": "warn",
            "detail": "disabled build"
        },
        {
            "group": "security",
            "name": "display-errors",
            "status": "ok",
            "detail": "0"
        },
        {
            "group": "security",
            "name": "url-include",
            "status": "ok",
            "detail": ""
        },
        {
            "group": "security",
            "name": "expose-php",
            "status": "warn",
            "detail": "1"
        },
        {
            "group": "security",
            "name": "cookie",
            "status": "warn",
            "detail": "HttpOnly off, Secure off"
        },
        {
            "group": "security",
            "name": "lil-mode",
            "status": "ok",
            "detail": "0644"
        }
    ]
}
Reject an unknown diagnostic group
doctor platform -q
Training example — PHP environment, server and repository responses are simulated
! opcache  disabled or unavailable

OK         5
WARN       1
FAIL       0
Return machine-readable JSON
doctor extensions -j
Training example — PHP environment, server and repository responses are simulated
{
    "summary": {
        "ok": 12,
        "warn": 7,
        "fail": 0
    },
    "checks": [
        {
            "group": "extensions",
            "name": "session",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "json",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "tokenizer",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "filter",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "hash",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "pcre",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "curl",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "openssl",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "fileinfo",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "mbstring",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "zip",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "phar",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "mysqli",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "imap",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "exif",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "imagick",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "sodium",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "zlib",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "bz2",
            "status": "warn",
            "detail": "optional"
        }
    ]
}
Show warnings and failures only
doctor security -q
Training example — PHP environment, server and repository responses are simulated
! https          not detected
! authorization  disabled build
! expose-php     1
! cookie         HttpOnly off, Secure off

OK               3
WARN             4
FAIL             0
Show warnings and failures only
doctor -q -j
Training example — PHP environment, server and repository responses are simulated
{
    "summary": {
        "ok": 27,
        "warn": 16,
        "fail": 0
    },
    "checks": [
        {
            "group": "platform",
            "name": "opcache",
            "status": "warn",
            "detail": "disabled or unavailable"
        },
        {
            "group": "extensions",
            "name": "curl",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "mbstring",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "zip",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "mysqli",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "imap",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "imagick",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "bz2",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "files",
            "name": "extensions",
            "status": "warn",
            "detail": "training-runtime/sandbox_fixture/extensions.php [ro]"
        },
        {
            "group": "files",
            "name": "asset-css",
            "status": "warn",
            "detail": "not installed"
        },
        {
            "group": "files",
            "name": "asset-js",
            "status": "warn",
            "detail": "not installed"
        },
        {
            "group": "repo",
            "name": "install-api",
            "status": "warn",
            "detail": "undefined"
        },
        {
            "group": "security",
            "name": "https",
            "status": "warn",
            "detail": "not detected"
        },
        {
            "group": "security",
            "name": "authorization",
            "status": "warn",
            "detail": "disabled build"
        },
        {
            "group": "security",
            "name": "expose-php",
            "status": "warn",
            "detail": "1"
        },
        {
            "group": "security",
            "name": "cookie",
            "status": "warn",
            "detail": "HttpOnly off, Secure off"
        }
    ]
}
Return machine-readable JSON
doctor --json
Training example — PHP environment, server and repository responses are simulated
{
    "summary": {
        "ok": 27,
        "warn": 16,
        "fail": 0
    },
    "checks": [
        {
            "group": "platform",
            "name": "php",
            "status": "ok",
            "detail": "8.4.24 cli"
        },
        {
            "group": "platform",
            "name": "memory",
            "status": "ok",
            "detail": "-1"
        },
        {
            "group": "platform",
            "name": "execution",
            "status": "ok",
            "detail": "0 s"
        },
        {
            "group": "platform",
            "name": "upload",
            "status": "ok",
            "detail": "upload 2M, post 8M"
        },
        {
            "group": "platform",
            "name": "session",
            "status": "ok",
            "detail": "/var/lib/php/sessions"
        },
        {
            "group": "platform",
            "name": "opcache",
            "status": "warn",
            "detail": "disabled or unavailable"
        },
        {
            "group": "extensions",
            "name": "session",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "json",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "tokenizer",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "filter",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "hash",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "pcre",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "curl",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "openssl",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "fileinfo",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "mbstring",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "zip",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "phar",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "mysqli",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "imap",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "exif",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "imagick",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "extensions",
            "name": "sodium",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "zlib",
            "status": "ok",
            "detail": "loaded"
        },
        {
            "group": "extensions",
            "name": "bz2",
            "status": "warn",
            "detail": "optional"
        },
        {
            "group": "files",
            "name": "lil",
            "status": "ok",
            "detail": "training-runtime/lil.php [w]"
        },
        {
            "group": "files",
            "name": "cwd",
            "status": "ok",
            "detail": "sandbox [w]"
        },
        {
            "group": "files",
            "name": "base",
            "status": "ok",
            "detail": "sandbox [w]"
        },
        {
            "group": "files",
            "name": "extensions",
            "status": "warn",
            "detail": "training-runtime/sandbox_fixture/extensions.php [ro]"
        },
        {
            "group": "files",
            "name": "temp",
            "status": "ok",
            "detail": "/tmp [w]"
        },
        {
            "group": "files",
            "name": "disk",
            "status": "ok",
            "detail": "29.7 GB free of 31.5 GB"
        },
        {
            "group": "files",
            "name": "asset-css",
            "status": "warn",
            "detail": "not installed"
        },
        {
            "group": "files",
            "name": "asset-js",
            "status": "warn",
            "detail": "not installed"
        },
        {
            "group": "repo",
            "name": "endpoint",
            "status": "ok",
            "detail": "https://repo.lil.dog"
        },
        {
            "group": "repo",
            "name": "install-api",
            "status": "warn",
            "detail": "undefined"
        },
        {
            "group": "repo",
            "name": "installer",
            "status": "ok",
            "detail": "latest v1.4.6"
        },
        {
            "group": "security",
            "name": "https",
            "status": "warn",
            "detail": "not detected"
        },
        {
            "group": "security",
            "name": "authorization",
            "status": "warn",
            "detail": "disabled build"
        },
        {
            "group": "security",
            "name": "display-errors",
            "status": "ok",
            "detail": "0"
        },
        {
            "group": "security",
            "name": "url-include",
            "status": "ok",
            "detail": ""
        },
        {
            "group": "security",
            "name": "expose-php",
            "status": "warn",
            "detail": "1"
        },
        {
            "group": "security",
            "name": "cookie",
            "status": "warn",
            "detail": "HttpOnly off, Secure off"
        },
        {
            "group": "security",
            "name": "lil-mode",
            "status": "ok",
            "detail": "0644"
        }
    ]
}
Return machine-readable JSON
doctor repo -j
Training example — PHP environment, server and repository responses are simulated
{
    "summary": {
        "ok": 2,
        "warn": 1,
        "fail": 0
    },
    "checks": [
        {
            "group": "repo",
            "name": "endpoint",
            "status": "ok",
            "detail": "https://repo.lil.dog"
        },
        {
            "group": "repo",
            "name": "install-api",
            "status": "warn",
            "detail": "undefined"
        },
        {
            "group": "repo",
            "name": "installer",
            "status": "ok",
            "detail": "latest v1.4.6"
        }
    ]
}
Check everything
doctor unknown
Training example — PHP environment, server and repository responses are simulated
?
Check everything
doctor -z
Training example — PHP environment, server and repository responses are simulated
?
Check everything
doctor platform extensions
Training example — PHP environment, server and repository responses are simulated
?
Show warnings and failures only
doctor files -q
Training example — PHP environment, server and repository responses are simulated
! extensions  training-runtime/sandbox_fixture/extensions.php [ro]
! asset-css   not installed
! asset-js    not installed

OK            5
WARN          3
FAIL          0

Related documentation

Current public release

v1.1.42026-11-01

Production refinement

Current stable release of doctor. doctor combines checks for PHP, extensions, project files, repository access and basic security into one diagnostic report.