Diagnosis rules
The Diagnostics screen does two things:
- Environment checks: Checks the Windows environment and the state of Coduva.
- Log findings: Scans service and project logs for known error patterns and shows each matching line with a plain explanation and a suggested fix.
Each result has one of four levels: OK, Info, Warning, Error.
For step-by-step instructions, see Troubleshooting.
Screen
The checks run automatically when the screen opens. The Run checks button at the top runs them again, and Create health report writes the results to a file. A health report can also be created from the command palette (Ctrl+K → Create health report).
- Summary: If there are no Warning or Error results among the checks, it shows Environment is healthy ("All <n> checks passed."); otherwise it shows Needs attention: <n> ("<ok>/<total> checks passed. Suggested fixes are below."). Next to it is the Last run time, below it a color-coded bar showing the distribution by level, and four counters. The summary counts only the environment checks; log findings are listed separately.
- Checks: Checks with problems are listed first. Each row shows the check name, its level, its explanation if there is a problem, and its details (for example
80 · httpd.exe (PID 4120)or missing addresses). - Log findings: Each finding shows its title, how many times it was seen, its explanation, the suggested fix, the last matching line, and the path of the log file.
Fix buttons
Where a problem check has a fix button, it appears next to the check:
| Button | What it does |
|---|---|
| Install components | Opens the Control center, where missing components are installed with its Install components button |
| Change ports | Opens the Settings screen, where ports are changed under Network |
| Sync hosts file | Syncs the hosts file immediately (requires UAC approval) and runs the checks again |
| Trust | Adds the local certificate authority to the Windows current-user root store (Windows shows a confirmation window) and runs the checks again |
| Download Visual C++ | Opens Microsoft's Visual C++ 2015–2022 (x64) installer (https://aka.ms/vs/17/release/vc_redist.x64.exe) in the browser |
Environment checks
| Check | What is checked | When there is a problem | Action |
|---|---|---|---|
| Visual C++ runtime | vcruntime140.dll and vcruntime140_1.dll in %SystemRoot%\System32 | Error: PHP needs Microsoft Visual C++ 2015–2022 (x64) to run | Download Visual C++ |
| Component directory path | Whether C:\Coduva (or CODUVA_HOME) contains only ASCII characters | Warning: some tools may cause problems | — |
| Components | Whether Nginx, PHP and MariaDB are installed | Warning: missing components are listed | Install components |
| PHP command line | Whether php.exe -v for the default PHP runs within 20 seconds | Error: usually a missing DLL or a broken installation | — |
| Web server port | Whether the Nginx HTTP port is free and not blocked | Error: the program holding the port and its PID are shown | Change ports |
| Database port | Whether the MariaDB port is free and not blocked | Error: the program holding the port and its PID are shown | Change ports |
| HTTPS port | Whether another program holds the HTTPS port | Error if a project uses HTTPS, otherwise Info | Change ports |
| hosts file | Whether each project's address is present in the hosts file | Warning: missing addresses are listed. Error if the file cannot be read | Sync hosts file |
| Local certificate authority | Only if a project uses HTTPS: whether Windows trusts the CA | Warning: the browser shows an HTTPS warning | Trust |
| Other local servers | Whether WampServer, XAMPP or Laragon is running | Warning: may cause port conflicts | — |
| Disk space | Free space on the disk that holds the component directory | Warning if less than 2 GB | — |
| Windows Defender | Whether real-time protection is on | Info: may slow down PHP projects; consider adding the component directory and project folders to the exclusion list | — |
The Other local servers and Windows Defender rows are listed only when that condition is detected.
Log scan
Scanned logs and their source names:
| Source | Log files |
|---|---|
nginx | C:\Coduva\logs\nginx-error.log and each project's C:\Coduva\logs\sites\<name>-error.log |
php | C:\Coduva\logs\php-<version>-error.log files and project application logs |
mariadb | C:\Coduva\logs\mariadb-error.log |
framework | WordPress: wp-content\debug.log; Laravel: storage\logs\laravel.log |
Scan rules:
- The last 300 lines of each log are read.
- Matching is a case-insensitive text search.
- If the same rule matches several times in the same file, it is shown as one finding; the number of times it was seen and the last matching line (up to 400 characters) are shown.
- Findings are sorted by severity: Error first, then Warning.
Rule format
Rules are written in a data file named resources/doctor-rules.json, separate from the program code, and are built into the program at compile time. New rules are added to this file without changing the code and arrive with new Coduva versions; rules in an installed program cannot be edited by hand.
{
"schema": 1,
"rules": [
{
"id": "php_memory",
"source": "php",
"all": ["Allowed memory size of"],
"severity": "warn",
"title": "PHP memory limit exceeded",
"explanation": "A script tried to use more memory than memory_limit allows.",
"fix": "Raise the memory limit on the PHP and Node screen (e.g. 1G) or reduce the script's memory use."
}
]
}| Field | Meaning |
|---|---|
schema | Version of the file format; currently 1 |
id | Unique identifier of the rule |
source | Which logs the rule applies to: nginx, php, mariadb, framework |
all | Text that must all appear on the line |
any | Text of which at least one must appear on the line |
severity | info, warn or error |
title, explanation, fix | Title, explanation and suggestion shown in the interface |
A rule may use all and any together; if both are filled in, both conditions must be met. At least one of them must be filled in.
Rules
The 15 rules shipped with Coduva 0.2.0. Fix texts are shown as they appear in the application; Settings → Ports in the texts refers to the Network section of the Settings screen.
Nginx
Nginx could not bind the port
- ID:
nginx_bind_failed· Level: Error - Match: the line contains
bind() toandfailed - Explanation: The port the web server wants to use is held by another program, or Windows has reserved this port.
- Fix: In the Control center, check which program is using the port; close that program, or choose another port under Settings → Ports. See Ports.
Nginx configuration error
- ID:
nginx_emerg· Level: Error - Match:
[emerg] - Explanation: The Nginx configuration file could not be read or contains an invalid setting.
- Fix: Check that the project's web root exists, then restart the service. If the problem persists, share the error line in the health report.
HTTPS certificate could not be loaded
- ID:
nginx_ssl_key· Level: Error - Match:
SSL_CTX_use_PrivateKey - Explanation: The project's certificate or key file is corrupt or does not match.
- Fix: Turn HTTPS off for the project and turn it on again; Coduva regenerates the certificate.
PHP process did not respond
- ID:
nginx_upstream_refused· Level: Warning - Match:
connect() failedandwhile connecting to upstream - Explanation: Nginx could not pass the request to the PHP FastCGI process. The process may have crashed or not yet started.
- Fix: The Coduva watchdog restarts the process within a few seconds. If it keeps happening, check the PHP error log.
PHP
PHP memory limit exceeded
- ID:
php_memory· Level: Warning - Match:
Allowed memory size of - Explanation: A script tried to use more memory than
memory_limitallows. - Fix: Raise the memory limit on the PHP and Node screen (e.g.
1G) or reduce the script's memory use.
PHP execution time exceeded
- ID:
php_timeout· Level: Warning - Match:
Maximum execution time of - Explanation: A request took longer than
max_execution_time. - Fix: Increase the execution time on the PHP and Node screen, or move the long task to a queue.
PHP extension could not be loaded
- ID:
php_ext_load· Level: Error - Match:
PHP Startup: Unable to load dynamic library - Explanation: An extension's DLL file was not found or its dependencies are missing. This is usually caused by a missing Visual C++ runtime.
- Fix: See the Visual C++ check in Diagnostics; turn off the problem extension on the PHP and Node screen.
A PHP extension may be missing
- ID:
php_undefined_function· Level: Warning - Match:
Call to undefined function - Explanation: The code called a function from an extension that is not installed (e.g.
imagecreate→gd,mb_strlen→mbstring). - Fix: Enable the relevant extension on the PHP and Node screen and restart the web server.
Class not found
- ID:
php_class_not_found· Level: Warning - Match:
Class "andnot found - Explanation: Composer dependencies are not installed, or the autoloader is out of date.
- Fix: Run
composer installorcomposer dump-autoloadin the project.
MariaDB
MariaDB could not bind the port
- ID:
mariadb_bind· Level: Error - Match:
Can't start server: Bind on TCP/IP port - Explanation: The database port is in use by another MySQL or MariaDB installation.
- Fix: Stop the other database, or choose another port under Settings → Ports (e.g.
3308).
Problem with database files
- ID:
mariadb_innodb· Level: Error - Match: one of:
InnoDB: Plugin initialization aborted,InnoDB: Database page corruption,Aria recovery failed - Explanation: The MariaDB data files may have been damaged by an unexpected shutdown or a disk problem.
- Fix: First make a copy of the data directory (
C:\Coduva\data\mariadb). Then restore from a backup, or review the health report.
Database access denied
- ID:
mariadb_access_denied· Level: Warning - Match:
Access denied for user - Explanation: The user name or password is wrong. If the
rootpassword has been changed, Coduva cannot shut down the services cleanly. - Fix: Check the project's database settings. Coduva defaults: user
root, empty password, local access only.
WordPress and Laravel
Laravel application key is missing
- ID:
laravel_key· Level: Error - Match:
No application encryption key has been specified - Explanation:
APP_KEYis not defined in the.envfile. - Fix: Run the
key:generatecommand with the Laravel tools.
Laravel could not connect to the database
- ID:
laravel_db· Level: Error - Match: one of:
SQLSTATE[HY000] [2002],SQLSTATE[HY000] [1049] - Explanation: MariaDB is not running, the port is different, or the database does not exist.
- Fix: Start MariaDB; check the
DB_PORTandDB_DATABASEvalues in.env.
WordPress could not connect to the database
- ID:
wp_db· Level: Error - Match: one of:
Error establishing a database connection,Veritabanı bağlantısı kurulurken hata - Explanation: MariaDB is not running, or the details in
wp-config.phpare wrong. - Fix: Start MariaDB; check that the
DB_HOSTvalue inwp-config.phpis127.0.0.1:<port>.
Health report
Create health report saves the latest check results as a Markdown file:
%APPDATA%\Coduva\reports\saglik-raporu-<time>.mdThe report contains:
- The Coduva version, date and component directory
- A Checks table: check ID, level and details
- Log findings: each finding's title, level, count, explanation, fix, log file path and matching line
- Installed components and their versions
Passwords, tokens and secret key values in matching lines are masked before they are written to the report. The report is designed to be used instead of a screenshot when asking for support or sharing a problem; review its contents before sharing it.