212 lines
8.8 KiB
Markdown
212 lines
8.8 KiB
Markdown
# Stack & Integrations
|
||
|
||
**Analysis Date:** 2026-04-30
|
||
|
||
---
|
||
|
||
## Languages
|
||
|
||
**PHP**
|
||
- Minimum required: PHP 5.2 (enforced in `index.php` line 45: `version_compare(PHP_VERSION, '5.2', '<')`)
|
||
- Actual server target: unknown — hosting is `host420804.hostido.net.pl`
|
||
- Uses `mysqli` extension for database connectivity (not PDO)
|
||
- No `composer.json` — all dependencies are managed manually (vendored into `system/` and `js/`)
|
||
|
||
**JavaScript**
|
||
- Vanilla JS (no build pipeline, no npm)
|
||
- jQuery (bundled, minified) — version approximate pre-1.5 based on API patterns (`.browser`, no `.on()`)
|
||
- All JS files are static, pre-built assets committed directly to repo
|
||
|
||
**HTML / CSS**
|
||
- XHTML 1.0 Transitional doctype on frontend (`default_layout.php`)
|
||
- HTML 4.01 doctype on admin layout (`admin_layout.php`)
|
||
- Plain CSS — no preprocessor (no SASS/LESS/PostCSS)
|
||
- No responsive/mobile CSS detected
|
||
|
||
---
|
||
|
||
## Frameworks & Libraries
|
||
|
||
### Backend
|
||
|
||
**Kohana 2.3.4** (legacy PHP MVC framework)
|
||
- Version confirmed in `system/core/Bootstrap.php`: `define('KOHANA_VERSION', '2.3.4')`
|
||
- EOL framework — last released ~2009
|
||
- Directory layout:
|
||
- `system/` — Kohana core (controllers, libraries, helpers, ORM, router)
|
||
- `application/` — application code (controllers, models, views, config)
|
||
- `modules/` — optional Kohana modules
|
||
- Entry point: `index.php` → `system/core/Bootstrap.php`
|
||
- Routing: `application/config/routes.php`
|
||
|
||
**Kohana ORM** (bundled in `system/libraries/ORM.php`)
|
||
- Active Record pattern
|
||
- Models extend `ORM` class: `class Page_Model extends ORM`
|
||
- Files: `system/libraries/ORM.php`, `system/libraries/ORM_Iterator.php`, `system/libraries/ORM_Tree.php`, `system/libraries/ORM_Versioned.php`
|
||
- Usage example: `ORM::factory('page')->where('name', $name)->find()`
|
||
|
||
**SwiftMailer v3** (bundled in `system/vendor/swift/`)
|
||
- Used via Kohana's email helper (`system/helpers/email.php`)
|
||
- Configured in `application/config/email.php`
|
||
- Current driver: `native` (PHP `mail()` function)
|
||
- SMTP and sendmail drivers available but not configured
|
||
|
||
### Active Kohana Modules
|
||
|
||
- **gmaps** (`modules/gmaps/`) — Google Maps v2 API integration for contact page
|
||
- **debug_toolbar** (`modules/debug_toolbar/`) — dev toolbar, configured in `application/config/debug_toolbar.php` (NOT listed in active modules in `config.php` — disabled)
|
||
|
||
Disabled (commented out in `application/config/config.php`):
|
||
- `auth`, `forge`, `kodoc`, `media`, `archive`, `payment`, `unit_test`, `object_db`
|
||
|
||
### Frontend JS Libraries (all vendored in `js/`)
|
||
|
||
| File | Library | Notes |
|
||
|------|---------|-------|
|
||
| `js/jquery.min.js` | jQuery | ~1.3–1.4 era (minified, no version comment) |
|
||
| `js/jquery-ui.min.js` | jQuery UI | Bundled with themes in `js/jquery-ui/themes/` |
|
||
| `js/jquery.fancybox.pack.js` | FancyBox | Lightbox/modal plugin |
|
||
| `js/jquery.jcarousellite.min.js` | jCarouselLite | Carousel plugin |
|
||
| `js/jquery.mousewheel.min.js` | jQuery Mousewheel | Scroll support |
|
||
| `js/jquery.easing.pack.js` | jQuery Easing | Animation easing |
|
||
| `js/jquery.lightbox.min.js` | jQuery Lightbox | Alternative lightbox (unused, commented out in layout) |
|
||
| `js/jquery.bgiframe.min.js` | bgiframe | IE6 z-index fix |
|
||
| `js/jquery.pngfix.min.js` | PNG Fix | IE6 PNG transparency (unused, commented out) |
|
||
| `js/swfobject.min.js` | SWFObject 2.1 | Flash embed for `flash/centrumcopy.swf` |
|
||
| `js/tiny_mce/tiny_mce.js` | TinyMCE 3.2.7 | WYSIWYG editor in admin panel |
|
||
| `js/swampy_browser/` | SwampyBrowser 1.1 | File/image manager integrated with TinyMCE |
|
||
|
||
---
|
||
|
||
## Database
|
||
|
||
**Engine:** MySQL (via `mysqli` PHP extension)
|
||
|
||
**Connection config:** `application/config/database.php`
|
||
- Host: `localhost`
|
||
- Database: `host420804_db`
|
||
- User: `host420804_db`
|
||
- Password: stored in config file (plaintext — see CONCERNS)
|
||
- Character set: `utf8`
|
||
- Table prefix: none
|
||
- Persistent connections: disabled
|
||
- Query caching: disabled
|
||
- Benchmarking: enabled
|
||
|
||
**ORM / Query builder:** Kohana's built-in ORM (`system/libraries/ORM.php`) and query builder (`system/libraries/Database.php`). No Doctrine, no Eloquent.
|
||
|
||
**Application models** (`application/models/`):
|
||
| Model file | ORM class | Table |
|
||
|-----------|-----------|-------|
|
||
| `application/models/page.php` | `Page_Model extends ORM` | `page` |
|
||
| `application/models/user.php` | (user auth model) | `user` |
|
||
| `application/models/gallery.php` | Gallery_Model | `gallery` |
|
||
| `application/models/gallery_image.php` | Gallery_Image_Model | `gallery_image` |
|
||
| `application/models/news.php` | News_Model | `news` |
|
||
|
||
**Schema documentation:** Not present. See `.paul/codebase/db_schema.md` when created.
|
||
|
||
**Custom DB extension:** `application/libraries/MY_Database.php` — overrides `select()` to fix COUNT() handling with table prefix.
|
||
|
||
---
|
||
|
||
## External Integrations
|
||
|
||
### Google Maps API v2
|
||
- Module: `modules/gmaps/`
|
||
- Config: `application/config/gmaps.php`
|
||
- API key: hardcoded in `application/config/gmaps.php` (old v2 browser key — likely invalid/deprecated)
|
||
- Domain: `google.pl`
|
||
- Usage: contact page map centered at `50.0491231, 21.9869502` (Rzeszów, ul. Okulickiego 9)
|
||
- **Note:** Google Maps JavaScript API v2 was shut down in 2010. This integration is non-functional.
|
||
- Implementation: `application/controllers/front/page.php` → `contact()` method
|
||
|
||
### Google Analytics (Legacy)
|
||
- Config key: `application/config/application.php` → `$config['google_analytics'] = ''` (empty — disabled)
|
||
- Code exists in `application/views/default_layout.php` (classic `ga.js` snippet, not gtag.js)
|
||
- Only fires when `IN_PRODUCTION === true` AND `$google_analytics` is non-empty
|
||
- Currently: `IN_PRODUCTION` is `false` in `index.php` → Analytics never fires
|
||
|
||
### Email (SwiftMailer / native PHP mail)
|
||
- Library: SwiftMailer v3 bundled in `system/vendor/swift/`
|
||
- Config: `application/config/email.php` — driver set to `native` (PHP `mail()`)
|
||
- Application email address: `application/config/application.php` → `$config['email'] = ''` (empty — not configured)
|
||
- No transactional email service (no SendGrid, Mailgun, etc.)
|
||
|
||
### IE7.js (Google Code CDN)
|
||
- Loaded from external CDN: `http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js`
|
||
- Conditional comment — only loads on IE < 7
|
||
- Google Code was shut down in 2016 → this resource is unavailable
|
||
- Referenced in: `application/views/default_layout.php` and `application/views/admin_layout.php`
|
||
|
||
### Flash (SWF)
|
||
- Banner: `flash/centrumcopy.swf` (embedded via SWFObject 2.1)
|
||
- Fallback: `images/banner.webp` (shown if Flash unavailable)
|
||
- Flash is EOL — browsers no longer support it. The `<img>` fallback is what users see.
|
||
|
||
---
|
||
|
||
## Infrastructure
|
||
|
||
### Web Server
|
||
- **Apache** with `mod_rewrite` (inferred from `.htaccess`)
|
||
- `.htaccess` location: project root
|
||
- Key rules:
|
||
- Blocks direct access to `application/`, `modules/`, `system/` directories (403)
|
||
- 301 redirects for two old URL patterns (service/product pages renamed)
|
||
- All non-file/non-directory requests rewritten to `index.php?kohana_uri=$1`
|
||
|
||
### Hosting
|
||
- Provider: **Hostido** (`host420804.hostido.net.pl`)
|
||
- Remote path: `/public_html`
|
||
- Protocol: FTP (port 21)
|
||
- Credentials: `application/config/database.php` (DB), `.vscode/ftp-kr.json` and `.vscode/sftp.json` (FTP)
|
||
|
||
### Deployment
|
||
- **Manual FTP upload** via VS Code extensions:
|
||
- `ftp-kr` extension config: `.vscode/ftp-kr.json` — `autoUpload: true` on file save
|
||
- `sftp` extension config: `.vscode/sftp.json` — `uploadOnSave: false`
|
||
- No CI/CD pipeline
|
||
- No staging environment detected
|
||
- Ignored on upload: `.git`, `/.vscode`, `/.paul`, `/.serena`, `CLAUDE.md`
|
||
|
||
### Logs
|
||
- Application logs: `application/logs/` (PHP files, e.g. `2024-05-18.log.php`)
|
||
- Server access logs: `logs/access.log` (rotated with `.xz` compression)
|
||
- Server error logs: `logs/error.log`
|
||
- Log threshold: 1 (errors and exceptions only) — set in `application/config/config.php`
|
||
|
||
### Caching
|
||
- **Internal file cache:** enabled, 30 seconds — stores file paths and config (`application/config/config.php` → `internal_cache = 30`)
|
||
- Cache files: `application/cache/kohana_configuration`, `kohana_find_file_paths`, `kohana_language`
|
||
- No Memcache, Redis, or opcode caching configured
|
||
|
||
### Sessions
|
||
- Driver: native PHP sessions
|
||
- Name: `Frisson_session`
|
||
- Expiry: 1800 seconds (30 minutes)
|
||
- Config: `application/config/session.php`
|
||
|
||
### Output Compression
|
||
- gzip output compression: enabled (`application/config/config.php` → `output_compression = TRUE`)
|
||
- Applied at PHP level by Kohana
|
||
|
||
---
|
||
|
||
## Build Tools
|
||
|
||
**None.** There is no build pipeline.
|
||
|
||
- No `composer.json` / Composer
|
||
- No `package.json` / npm / yarn
|
||
- No Webpack, Vite, Gulp, Grunt
|
||
- No CSS preprocessor (no SASS/LESS)
|
||
- No JS minification step — minified files are committed as-is
|
||
- No asset versioning/cache-busting
|
||
|
||
All JS and CSS files are raw static assets served directly from `js/` and `css/` directories. Updates require manually replacing files and deploying via FTP.
|
||
|
||
---
|
||
|
||
*Stack analysis: 2026-04-30*
|