PHPackages                             waps/framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. waps/framework

AbandonedArchivedFramework[Framework](/categories/framework)

waps/framework
==============

A framework for developing WebApps based on PHP and Apache

1.7.2(4y ago)441[7 issues](https://github.com/WAPS-Project/WAPS-Framework/issues)MPL-2.0PHP

Since Jan 28Pushed 10mo agoCompare

[ Source](https://github.com/WAPS-Project/WAPS-Framework)[ Packagist](https://packagist.org/packages/waps/framework)[ Docs](https://waps-framework.info/)[ RSS](/packages/waps-framework/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (18)Used By (0)

WAPS Framework
==============

[](#waps-framework)

[![FrameWork Logo](https://raw.githubusercontent.com/WAPS-Project/WAPS-Framework/master/framework.src/content/img/waps.png)](https://raw.githubusercontent.com/WAPS-Project/WAPS-Framework/master/framework.src/content/img/waps.png)

[![Generic badge](https://camo.githubusercontent.com/d98fc7fae2faa59d7f39dd93fba3cc2356d30463f8d6a9a71ed9e47f37377fac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6561645f446576656c6f7065722d4a6f73756e4c502d626c61636b2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562)](https://josunlp.de/)[![Ask Me Anything !](https://camo.githubusercontent.com/16001c3b60c38bd990e77d07db7a3bcbbd7427031eeb40e5e044e81e6564d434/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41736b2532306d652d616e797468696e672d3161626339632e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/JosunLP)[![license](https://camo.githubusercontent.com/b2cee6b529d9b68db3ca6e34377a1b18f09f1ed242d0588d96c364eea314e20a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5765624170702d5048502d53616d706c652d50726f6a6563742f5765704170702d5048502d53616d706c652d4672616d65776f726b2e7376673f7374796c653d666f722d7468652d6261646765)](https://gitlab.com/webapp-php-sample/framework/blob/master/LICENSE)[![Maintenance](https://camo.githubusercontent.com/8673e90d546a2c5ead6be528f7f7978f877d3f64205f10b19ad02e2d0d6726d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/WebApp-PHP-Sample-Project/WepApp-PHP-Sample-Framework/graphs/commit-activity)[![GitHub release](https://camo.githubusercontent.com/bd69898de5962cde674163d878b804451670a279824fab6985573c408494334e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f574150532d50726f6a6563742f574150532d4672616d65776f726b2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6769746875622e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562)](https://github.com/WebApp-PHP-Sample-Project/WepApp-PHP-Sample-Framework/releases)[![Generic badge](https://camo.githubusercontent.com/0ed0630de01af0abdb34f4854c12305fb54250452bb71ca48cb75ed791bf33bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6164655f776974682d5048502d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://www.php.net/)[![Stars](https://camo.githubusercontent.com/c87cd489a8ba6934922db311dcc8a3702675609d53112c1187a82c272416f25e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f574150532d50726f6a6563742f574150532d4672616d65776f726b3f7374796c653d666f722d7468652d6261646765)](https://github.com/WAPS-Project/WAPS-Framework)[![Vulnerabilities](https://camo.githubusercontent.com/5d4cf5782a7ff10decd7187f6cab85f161574f1a7556afad608dd2122657e737/68747470733a2f2f696d672e736869656c64732e696f2f736e796b2f76756c6e65726162696c69746965732f6769746875622f5765624170702d5048502d53616d706c652d50726f6a6563742f5765704170702d5048502d53616d706c652d4672616d65776f726b2e7376673f7374796c653d666f722d7468652d6261646765)](https://app.snyk.io/org/webapp-php-sample-project)[![Documentation](https://camo.githubusercontent.com/add0b8f48b863d37ce3a4503cc444e09c4f6ba6e6f6d7a254898f4375e7e58db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f63756d656e746174696f6e2d576170732d2d4672616d65776f726b2e696e666f2d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](http://waps-framework.info/)

### A PHP web app framework.

[](#a-php-web-app-framework)

It's designed to make small future projects faster and easier. This entire framework has emerged as a learning project and is being continuously developed.

Setup
-----

[](#setup)

- [Dependencies](#dependencies)
    - [Server](#server)
        - [Web Server](#web-server)
        - [Database Server](#database-server)
    - [Packet management](#packet-management)
        - [NPM](#npm)
- [Set up a project](#set-up-a-project)
- [Wiki](#Wiki)

Dependencies
------------

[](#dependencies)

### Server

[](#server)

#### Web Server

[](#web-server)

This framework was developed on the basis of the Apache web server. Nevertheless, it is possible with slight modifications, It also operate on a NGINX web server. But in contrast to the supplied htaccess file, changes to the NGINX config necessary. Everything necessary for this is explained below.

##### Apache

[](#apache)

As long as only one Apache web server is used, the project can be used without adjustments.

##### NGINX

[](#nginx)

For the operation of the framework under NGINX the following changes have to be made to the nginx config!

```
autoindex off;

error_page 500 /Error_500;

error_page 404 /Error_404;

error_page 403 /Error_403;

location ~ /?\.htaccess$ {
  return 403;
}

location ~ ^/?config/config\.json$ {
  return 403;
}

location ~ ^/?config/plugin\.config\.json$ {
  return 403;
}

location / {
  rewrite ^(.*)$ https://$http_host/$1 redirect;
  if (!-e $request_filename){
    rewrite ^/([\w]+)? /index.php?pagename=$1;
  }
}

```

It replaces the corresponding part that would otherwise be set by the htaccess.

#### Database Server

[](#database-server)

A MySql server was used to develop the framework, but it is no problem to use MariaDB as an alternative. For other database systems, slight changes have to be made to the framework.

### Packet management

[](#packet-management)

#### NPM

[](#npm)

To manage the CSS, JS and TS scripts, the framework uses the NODE Package Manager. To work with the framework, the instalation of the same is necessary.

After installation, first execute the command `npm install` in the project folder.

That should install all needed packages.

Set up a project
----------------

[](#set-up-a-project)

To set up a project, all servers named above must be available, a web server and a database server. At the start of the project, the corresponding access data of the database must be entered in the Config. This can be found in the path `./config/config.json`

Likewise, all other important data must be entered in the config. This can also be expanded flexibly. All new entries automatically become uppercase constants.

In addition, it is possible to install extensions in the area of plugins. These can be developed separately from projects and then integrated. The path in which plugins must be inserted is `./custom/plugin/`

### Creating new Pages/Classes

[](#creating-new-pagesclasses)

#### Page

[](#page)

To create a new page, simply create a new file after the schema fileName\_page\_php in folder `./page/open/`

The File Head of the new page must look like this:

```
1
