Download the PHP package unlikelysource/filecms-website without Composer

On this page you can find all versions of the php package unlikelysource/filecms-website. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filecms-website

FileCMS Website (0.2.5) / FileCMS (v0.3.18)

Simple PHP framework that builds HTML files from HTML widgets.

License: Apache v2

Critical Updates

2026-07-26: Important Update!!!

Passwords Now Hashed in Config

The latest version of filecms-core now expects the passwords stored in src/config.php to be hashed using Bcrypt. Run get_password_hash.sh PLAIN_TEXT_PASSWORD (or vendor/unlikelysource/filecms-core/get_password_hash.sh PLAIN_TEXT_PASSWORD) and copy and paste the output into the $config['SUPER']['password'] key and any $config['SUPER']['alt_logins'] keys you've added.

CAPTCHA Changes

Have a look at the updated CAPTCHA documentation (scroll further down to see it). Ten new config parameters have been added to make the CAPTCHA more difficult for automated hacking systems to crack. Copy the recommended settings from this documentation page, and adjust as needed.

CK Editor Replacement

2026-07-18: Important Update!!! Run vendor/unlikelysource/filecms-core/tinymce_upgrade_2026_07.sh

Upgrading From filecms-core v2.x to v3.x

Composer versions 0.2.* of this package are referred to in commit history and elsewhere as "v2.x"; 0.3.* (the line this README's version number, above, belongs to) is "v3.x". If your site was originally built against a 0.2.* release and you're bringing it up to the current 0.3.* release, there are several breaking changes to work through -- they're listed here in the order you're likely to hit them.

1. PHP 8 is now required

As of v0.3.9, the minimum PHP version is PHP 8 (v2.x supported PHP >=7.4). Confirm your server's PHP version before doing anything else -- everything below assumes PHP 8+.

2. Authentication moved from files to native PHP sessions

v0.3.1 removed Common\Security\Profile::getAuthFileName(), Profile::build(), and the DEFAULT_AUTH_DIR / DEFAULT_AUTH_PREFIX / AUTH_FILE_TTL constants. In v2.x, a successful login wrote an auth file to disk (under an AUTH_DIR config key) that was checked on subsequent requests; v3.x stores that same information in $_SESSION instead and never touches the filesystem for it.

3. Passwords must be password_hash() hashes, not plaintext

v0.3.16 changed login verification (Profile::authenticate()) to compare the submitted password against a stored hash with password_verify(), rather than comparing plaintext strings. This is the change most likely to silently break login on an in-place upgrade -- if SUPER.password (or any SUPER.alt_logins.*.password) is still a plaintext string after upgrading, no password will ever verify against it, and the account becomes unable to log in with no obvious error.

For every account, generate a hash and replace the plaintext value in config.php using this script:

alt_logins itself (multiple named accounts, each with its own username/password) has been part of the config schema since the original v2-to-v3 transition, but its verification lived in filecms-website's login.phtml template as a hand-rolled comparison; v0.3.16 moved that logic into Profile::authenticate() in core. If your site has its own copy of that old comparison code, you can retire it in favor of the shared method.

4. CKEditor replaced by TinyMCE

If your v2.x site is still running the original CKEditor integration, follow the CK Editor Replacement instructions below (v0.3.10 introduced the TinyMCE migration script). The SUPER.ckeditor config key becomes SUPER.tinymce.

5. CAPTCHA hardening (recommended, not required)

v0.3.17 reworked Common\Image\Captcha to render the whole phrase as a single distorted image instead of one clean image per character, which is substantially harder for automated (OCR) systems to read -- see the CAPTCHA section below for the full explanation and config keys. This is backward compatible: a v2.x-era config.php without the new font_files / overlap_min / overlap_max / wave_x_amplitude / wave_y_amplitude keys will keep working with built-in defaults, but you won't get the new hardening until you add them.

Checklist

  1. Confirm your installation is running PHP >= 8
  2. composer update unlikelysource/filecms-core
  3. Remove the AUTH_DIR config key if you have it set; confirm sessions work
  4. Regenerate every SUPER.password / SUPER.alt_logins.*.password as a password_hash() hash (using vendor/unlikelysource/filecms-core/get_password_hash.sh)
  5. Migrate CKEditor to TinyMCE, if not already done (using vendor/unlikelysource/filecms-core/tinymce_upgrade_2026_07.sh)
  6. Add the new CAPTCHA config keys to opt into the hardened rendering
  7. Test login (including any alt_logins accounts) end-to-end before considering the upgrade complete

CK Editor Replacement

Run this from the root of your filecms-website-based project (the directory that contains composer.json, src, templates and, after composer install, vendor):

This script does the following:

  1. Backs up templates/super/edit.phtml, src/upload.php and src/config/config.php (adds a .bak suffix)
  2. Adds tinymce/tinymce to composer.json and installs it
  3. Copies the TinyMCE assets into public/tinymce
  4. Downloads the updated templates/super/edit.phtml and src/upload.php

Two manual steps remain afterward:

  1. In src/config/config.php, rename the 'SUPER' => 'ckeditor' key to 'tinymce' (keep the existing width and height values):

  2. If you had customized templates/super/edit.phtml or src/upload.php, re-apply those customizations by comparing against the .bak files just created, then remove the .bak files once you're satisfied.

Website Installation

Automated Installation

To perform an automated installation, run the following command, where /path/to/website is the directory path to your new website:

  1. Install Composer (see https://getcomposer.org/doc/00-intro.md
  2. Run the following command:

This single command clones the repository, installs unlikelysource/filecms-core and its dependencies (PHPMailer, TinyMCE), and copies the TinyMCE assets into public/tinymce -- no further manual steps are required.

Basic website config

All references are from /path/to/website

Additional documentation on these three follows.

To Run Locally Using PHP

From this directory, run the following command:

To Run Locally Using Docker and docker-compose

Windows

Install Docker Desktop for Windows

Open the Power Shell (some commands don't work in the regular command prompt)

To bring the docker container online, run this command:

To stop the container do this:

To open a command shell into the container:

Linux / Mac

Install Docker + docker-compose:

Open a terminal window (Terminal Application)

To bring the docker container online, run this command:

To stop the container do this:

To open a command shell into the container:

Browser Access

To access from your browser:

Bootstrap and Document Root

Set the website document root to /public

Here is a summary of the three key constants defined by /bootstrap.php. Change as needed.

Constant Default Description
BASE_DIR Same directory as bootstrap.php Project root
HTML_DIR /templates/site Location of HTML snippets
SRC_DIR /src Location of source code

Pre-Processing

Before the final HTML view is rendered, /public/index.php includes /src/processsing.php. In this file you can include any pre-processing you need done.

Templates

By default templates are stored in /templates/site. You can alter this in the config file.

Config File

Default: /src/config/config.php

HTML

You can create HTML snippets designed to fit into layout.phtml any place in the designated HTML directory.

Cards

Important: each %%CARD%% directive you add must be on its own line!

Auto-Populate All Cards

To get an HTML file to auto-populate with cards use this syntax:

Example: you have a subdirectory off HTML_DIR named projects and you want to load all HTML card files under the cards folder:

Auto-Populate Specific Number of Cards

To only load a certain (random) number of cards, use =. Example: you have a subdirectory off HTML_DIR named features and you want to load 3 random HTML card files under the cards folder:

Auto-Populate Specified Cards in a Certain Order

For each card, only use the base filename, no extension (i.e. do not add .html). Example: you have a directory HTML_DIR/blog/cards with files one.html, two.html, three.html, etc. You want the cards to be loaded in the order one.html, two.html, three.html, etc.:

Editing Pages

By default, if you enter the URL /super/login you're prompted to login as a super user. Configure the username, password and secondary authentication factors in: /src/config/config.php under the SUPER config key.

SUPER config key

Example configuration for super user:

Here's a breakdown of the SUPER config keys

Key Explanation
username Super user login name
password Super user login password hash (using ./get_password_hash.sh)
attempts Maximum number of failed login attempts. If this number is exceeded, a random third authentication field is required for login.
validation Set of key:value pairs randomly selected each time you login. Values can be in the form of an array.
alt_logins Additional usernames and password hashes
message Message that displayed if login fails
profile Array of $_SERVER keys that form the super user's profile once logged in
login_fields Field names drawn from your login.phtml login form
validation You can specify as many of these as you want. If the login attemp exceeds attempts, the SimpleHtml framework will automatically add a random field drawn from this list.
allowed_ext Only files with an extension on this list can be edited.
ckeditor Default width and height of the CKeditor screen
super_* Settings pertaining to the location of the super admin user URL, templates and menu

Contact Form

The skeleton app includes under /templates a file contact.phtml that implements an email contact form with a CAPTCHA

CAPTCHA

FileCMS\Common\Image\Captcha::writeImages() renders the whole phrase as a single distorted image rather than one clean image per character. Rendering each character separately hands an automated reader its segmentation step for free -- it doesn't even need to figure out where one character ends and the next begins. Instead:

Example configuration:

Here's a breakdown of the CAPTCHA config keys

Key Explanation
input_tag_name Name of the $_POST field expected to hold the phrase the user typed in
sess_hash_key Name of the $_SESSION key holding the password_hash() of the correct phrase
font_file Fallback font, used if font_files is empty
font_files Pool of fonts randomized per character; more variety makes it harder for an OCR model trained on a single font
img_dir Directory the generated CAPTCHA PNG is written to (must be web-accessible)
num_bytes CAPTCHA phrase length is num_bytes * 2 hex characters
rotate_min / rotate_max Degrees of random rotation applied to each character
overlap_min / overlap_max Pixels shaved off each character's horizontal advance so adjacent glyphs touch/overlap
line_min / line_max Range for the random count of background noise lines
dot_min / dot_max Range for the random count of foreground noise dots
wave_x_amplitude / wave_y_amplitude Max pixel displacement of the horizontal/vertical wave distortion applied to the finished image

Import Feature

You can enable the import feature by setting the IMPORT::enable config key to TRUE. The importer itself is at /templates/site/super/import.phtml. Selected transformation filters can be applied to one or more pages during the import process.

Here are some notes on config file settings under the IMPORT config key:

Transform Feature

You can apply transformation filters on existing pages. The importer itself is at /templates/site/super/import.phtml. Included transformation classes are located in /src/Transform. You can add your own by simply extending FileCMS\Common\Transform\Base. After logging in as the admin user, go to /super/transform.

Here are some notes on config file settings under the TRANSFORM config key:

Clicks

A class FileCMS\Common\Stats\Clicks was added as of version 0.2.1. Records the following information into a CSV file:

CSV

You can use a CSV file just like a database using the new FileCMS\Common\Data\Csv class

public function getItemsFromCsv($key_field = NULL) : array

Change Log

tag: v0.2.2 / v0.2.3


All versions of filecms-website with dependencies

PHP Build Version
Package Version
Requires php Version >=8
unlikelysource/filecms-core Version >=0.3.17
phpmailer/phpmailer Version >=6.1
tinymce/tinymce Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package unlikelysource/filecms-website contains the following files

Loading the files please wait ...