-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpman.config.php.example
More file actions
73 lines (66 loc) · 2.96 KB
/
Copy pathphpman.config.php.example
File metadata and controls
73 lines (66 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
// phpMan configuration — copy to phpman.config.php and adjust.
// Created automatically by install.sh or `make staging` / `make release`.
//
// This file lives in ~/.phpman/ (PHPMAN_HOME), NOT in webroot.
// The webroot only needs a minimal phpman.config.php with one line:
// define('PHPMAN_HOME', '/home/user/.phpman');
//
// === Minimal config (everything else uses defaults) ===
// define('PHPMAN_HOME', getenv('HOME') . '/.phpman');
// define('PHPMAN_BASE_URL', 'https://www.example.com/phpMan.php');
//
// === Add LLM emoji enhancement ===
// define('LLM_API_KEY', 'sk-xxx');
// define('LLM_API_URL', 'https://api.openai.com/v1/chat/completions');
// define('LLM_MODEL', 'gpt-4o-mini');
//
// Leave values commented to use defaults in src/config.php.
// --- PHPMAN_HOME ---
// Base directory for all phpMan local data (cache DB, logs, backups).
// Default: PHPMAN_HOME env var, then $HOME/.phpman
// Use ~/.phpman_test for staging to avoid sharing DB/logs/backups with production.
// define('PHPMAN_HOME', getenv('HOME') . '/.phpman');
// define('PHPMAN_HOME', getenv('HOME') . '/.phpman_test');
// Or override individual paths below:
// define('PHPMAN_CACHE_DIR', '/path/to/custom/cache');
// define('PHPMAN_LOG_DIR', '/path/to/custom/logs');
// define('PHPMAN_BACKUP_DIR', '/path/to/custom/backups');
// --- Base URL (v4.3.3) ---
// Public web URL of this phpMan instance. Used by CLI scripts (batch_enhance,
// build-index, enhance) to generate correct links when running offline.
// Default: PHPMAN_BASE_URL env var, then 'http://localhost:8080/phpMan.php'
// define('PHPMAN_BASE_URL', 'https://www.chedong.com/phpMan.php');
// --- LLM Enhancement (v4.0) ---
// define('LLM_API_KEY', '');
// define('LLM_API_URL', '');
// define('LLM_MODEL', '');
// define('LLM_MAX_TOKENS', 4096);
// define('PHPMAN_ENHANCE_MAX_CHARS', 32000); // max chars for LLM-enhanced output
// --- Fallback LLM (v4.2.2) ---
// Optional: multiple fallback endpoints tried in order when primary fails
// with 5xx/429/timeout. Each entry must have url, key, model.
// Leave empty array or comment out to skip fallback entirely.
// define('LLM_FALLBACKS', [
// [
// 'url' => 'https://api.openai.com/v1/chat/completions',
// 'key' => 'sk-xxx',
// 'model' => 'gpt-4o-mini',
// ],
// [
// 'url' => 'https://api.anthropic.com/v1/messages',
// 'key' => 'sk-yyy',
// 'model' => 'claude-haiku-4-5',
// ],
// ]);
// --- Google Analytics (v4.4.4+) ---
// Set your GA4 measurement ID to enable pageview tracking.
// Leave empty to disable (default).
// define('PHPMAN_GA_ID', 'G-XXXXXXXXXX');
// --- MCP Authentication (#97) ---
// Set a secret key to require X-API-Key header on all MCP requests.
// Leave empty to allow unauthenticated access (default, for local/trusted networks).
// define('MCP_API_KEY', 'your-secret-key-here');
// --- Debug ---
// Set true for development/troubleshooting; false for production.
// define('PHPMAN_DEBUG', false);