phpMeccano is an open-source module-structured PHP framework. Framework phpMeccano gives APIs with the following abilities:
Plug-in system allows to extend capabilities and to add new features. Current framework version is the third alpha version.
phpMeccano requires web server (Apache, NGINX or lighttpd) with installed and configured PHP and MySQL/MariaDB.
phpMeccano was tested with the following environments:
===================================
===================================
===================================
===================================
To run web installer you should use the recent versions of Firefox or Pale Moon; any WebKit/Blink based browser (Chromium, Google Chrome, Yandex Browser, Opera, Safari etc.); or Microsoft Edge. Web installer has been tested with desktop, iOS and Android versions of browsers.
Make sure that framework components are placed into the web-accessible directory. Then edit file conf.php and set the database parameters:
Also you may edit system paths at your opinion. Make sure that web server has read/write access to files and directories.
By editing value of MECCANO_DEF_LANG you can set default language. Initially available values are "en-US" (English) and "ru-RU" (Russian).
Refer to the documentation to get more info.
Save changes.
Now open web browser and go to address http://hostname/install/
to run web installer.
Please, follow the wiki to get the API reference. There are available English and Russian versions.
Write the following code to pass an authentication:
#!php
<?php
header('Content-Type: text/html; charset=utf-8');
require_once 'conf.php';
\core\loadPHP('auth');
$db = \core\dbLink();
$auth = new \core\Auth($db);
$auth_code = $auth->userLogin("your_username", "your_password");
if (is_string($auth_code)) {
if ($auth->login2FA($auth_code)) {
echo "You have passed two-factor authentication";
}
else {
echo $auth->errExp();
}
}
elseif ($auth_code) {
echo "You have passed single-factor authentication";
}
else {
echo $auth->errExp();
}
GNU General Public License, version 2, or (at your option) any later version.