Menu

Tree [f7da58] master 0.2.0alpha /
 History

HTTPS access


File Date Author Commit
 core 2019-10-11 Alexei Muzarov Alexei Muzarov [85fb0b] Added new function to get database link simplier.
 csslibs 2018-01-12 Alexei Muzarov Alexei Muzarov [388db1] New constant [MECCANO_CSS_DIR] to define path t...
 documents 2015-07-22 Alexei Muzarov Alexei Muzarov [76b0de] Contact information has been updated. License a...
 install 2019-10-11 Alexei Muzarov Alexei Muzarov [39c3ae] Changed encoding to support emoji.
 jslibs 2015-06-08 Alexei Muzarov Alexei Muzarov [d817c1] System paths have been changed to prevent appea...
 phplibs 2015-06-08 Alexei Muzarov Alexei Muzarov [d817c1] System paths have been changed to prevent appea...
 servpages 2019-04-14 Alexei Muzarov Alexei Muzarov [7fc74b] Stub-page displays secondary message only if ma...
 shfiles 2015-09-19 Alexei Muzarov Alexei Muzarov [8bef46] New system constant [MECCANO_SHARED_FILES] and ...
 tmp 2015-07-22 Alexei Muzarov Alexei Muzarov [76b0de] Contact information has been updated. License a...
 uninstall 2015-07-22 Alexei Muzarov Alexei Muzarov [76b0de] Contact information has been updated. License a...
 unpacked 2015-07-22 Alexei Muzarov Alexei Muzarov [76b0de] Contact information has been updated. License a...
 CHANGELOG.md 2019-10-13 Alexei Muzarov Alexei Muzarov [10f214] Updated CHANGELOG files.
 CHANGELOG_RU.md 2019-10-13 Alexei Muzarov Alexei Muzarov [10f214] Updated CHANGELOG files.
 LICENSE 2015-07-31 Alexei Muzarov Alexei Muzarov [5c64f4] Readme and license have been added. Some minor ...
 README.md 2019-12-06 Alexei Muzarov Alexei Muzarov [5842a4] Minor change.
 README_RU.md 2019-10-13 Alexei Muzarov Alexei Muzarov [7b0f09] Updated README files.
 conf.php 2019-10-12 Alexei Muzarov Alexei Muzarov [b1fb92] Minor changes.
 index.html 2015-07-22 Alexei Muzarov Alexei Muzarov [76b0de] Contact information has been updated. License a...

Read Me

phpMeccano - a framework for development of web services

phpMeccano is an open-source module-structured PHP framework. Framework phpMeccano gives APIs with the following abilities:

  • creation and management of the user groups;
  • authentication of the users, including 2FA;
  • control of access to functions through the group policy;
  • creation of the multilingual interface;
  • copying, moving and removing of the local files and folders;
  • logging of the events;
  • creation and sharing of the messages and files between contacts of the user like in simple social network;
  • creation of the topics to discuss and to comment them;
  • management of the web service's maintenance mode.

Plug-in system allows to extend capabilities and to add new features. Current framework version is the third alpha version.

Requirements

phpMeccano requires web server (Apache, NGINX or lighttpd) with installed and configured PHP and MySQL/MariaDB.
phpMeccano was tested with the following environments:

  • Debian 10
  • Apache 2.4.38
  • PHP 7.3.9
  • MariaDB 10.3.17

===================================

  • CentOS Linux 7
  • Apache 2.4.6
  • PHP 5.4.16
  • MariaDB 5.5.64

===================================

  • Ubuntu 18.04
  • Apache 2.4.29
  • PHP 7.2.19
  • MySQL 5.7.27

===================================

  • Ubuntu 18.04
  • nginx/1.14.0
  • PHP 7.2.19
  • MySQL 8.0.17

===================================

  • Ubuntu 18.04
  • lighttpd/1.4.45
  • PHP 7.2.19
  • MySQL 8.0.17

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.

Installation

Make sure that framework components are placed into the web-accessible directory. Then edit file conf.php and set the database parameters:

  • MECCANO_DBSTORAGE_ENGINE - database storage engine. Available values are "MyISAM" and "InnoDB";
  • MECCANO_DBANAME - name of the database administrator;
  • MECCANO_DBAPASS - password of the database administrator;
  • MECCANO_DBHOST - database host;
  • MECCANO_DBPORT - database port;
  • MECCANO_DBNAME - name of the database;
  • MECCANO_TPREF - prefix of the database tables.

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.

API Reference

Please, follow the wiki to get the API reference. There are available English and Russian versions.

Bitbucket
GitHub

Code example

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();
}

License

GNU General Public License, version 2, or (at your option) any later version.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.