Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 44816c3dfa5b6622976c81c9a5145d46c15ae8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# phpPgAdmin6

PHP Based administration tool for PostgreSQL. Blazing fast routing with [Slim Framework 3](https://www.slimframework.com/) and solid abstraction layer in its core with [AdoDB](https://adodb.org/). Originally forked from [phppgadmin/phppgadmin](https://github.com/phppgadmin/phppgadmin).

[![Packagist](https://img.shields.io/packagist/dm/huasofoundries/phppgadmin6.svg)](https://packagist.org/packages/huasofoundries/phppgadmin6)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/289a56c1c7d94216b3d089c220689e9e)](https://www.codacy.com/app/amenadiel/phpPgAdmin6?utm_source=github.com&utm_medium=referral&utm_content=HuasoFoundries/phpPgAdmin6&utm_campaign=Badge_Grade)
[![StyleCI](https://styleci.io/repos/21398998/shield?branch=develop)](https://styleci.io/repos/21398998)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/?branch=develop)
[![Build Status](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/badges/build.png?b=develop)](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/build-status/develop)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FHuasoFoundries%2FphpPgAdmin6.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FHuasoFoundries%2FphpPgAdmin6?ref=badge_shield)

This is a hard fork of [phppgadmin](https://github.com/phppgadmin/phppgadmin) which adds the following enhancements:

-   Composer Installation and dependency management
-   [PSR-2 Coding Standard](https://www.php-fig.org/psr/psr-2) (Will evolve to PSR-12 soon)
-   [PSR-4 Autoloading](https://www.php-fig.org/psr/psr-4)
-   Removal of global variables (WIP)
-   Removal of superglobals in favour of [PSR-7 Message interfaces](http://www.php-fig.org/psr/psr-7/) (WIP)
-   Full PHP 7+ support
-   Usage of Dependency Injection compliant with [PSR-11 Container interface](http://www.php-fig.org/psr/psr-11/)
-   Support for PG 9.3+ features (Materialized Views, BRIN Indexes, etc)
-   Nice urls

### WIP

Other enhancements are in progress and would be a nice to have:

## Requirements

-   PHP 5.6+ (but you should really, really consider switching to at least v7.1)
-   ext-psql
-   [Composer](https://getcomposer.org/download/)

## Installation

### Using Composer (recommended)

[Install Composer in your machine](https://getcomposer.org/download/).

Install with composer running the following command in your shell (replacing <FOLDER> whith your desired folder name)

```sh
composer create-project huasofoundries/phppgadmin6 <FOLDER> v6.0.*@rc --no-dev --prefer-dist
```

Alternatively, clone this repo and run (inside then folder where the project was cloned)

```sh
composer install --no-dev
```

#### Installing dev branch

If there's something broken and I cannot risk breaking the rest to fix your issue, I might push a fix or feature to [develop branch](https://github.com/HuasoFoundries/phpPgAdmin6/tree/develop). Said branch can be installed as

```sh
composer create-project huasofoundries/phppgadmin6 <FOLDER> v6.*.*@beta --no-dev --prefer-dist
```

(or, you know, clone the repo and make sure you're in develop branch)

## Rewrite Rules

As this project is built over [Slim Framework 3](https://www.slimframework.com/), **you'll need some rewrite rules for nice-urls to work**.

### Apache

Make sure you have the RewriteEngine module active in your Apache installation.

Place an `.htaccess` file on your project root with the following contents

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

```

### Nginx

Add the following vhost to your `sites-enabled` folder

```
server {
        listen 80;
        # or whatever port you want

        server_name yourservername.com;

        root /path/to/project;

        index index.php;

        # Use this block if you're running in your domain or subdomain root
        location / {
          try_files $uri $uri/ /index.php$is_args$args;
        }

      # If running inside a subfolder use instead
        #location /subfolder/ {
        #   try_files $uri $uri/ /subfolder/index.php$is_args$args;
        #}

        # pass the PHP scripts to FastCGI server listening on IP:PORT or socket
        location ~ \.php$ {
                fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;

                # Check that the PHP script exists before passing it
                try_files $fastcgi_script_name =404;

                # Bypass the fact that try_files resets $fastcgi_path_info
                # see: http://trac.nginx.org/nginx/ticket/321
                set $path_info $fastcgi_path_info;
                fastcgi_param PATH_INFO $path_info;

                fastcgi_index index.php;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                # or fastcgi_pass 127.0.0.1:9000; depending on your PHP-FPM pool
        }
}
```

Please note that you have to customize your server name, php upstream (sock or IP) and optinally the subfolder you want phpPgAdmin6 to run on.

## License

This work is licensed under MIT or GPL 2.0 (or any later version) or BSD-3-Clause
You can choose between one of them if you use this work.

`SPDX-License-Identifier: MIT OR GPL-2.0-or-later OR BSD-3-Clause`

## Credits & FAQ

We're preserving due credits to all people that contributed in the past, as well as other release notes
contained in the old version of [phppgadmin](https://github.com/phppgadmin/phppgadmin)

-   [Bugs](docs/BUGS.md)
-   [Changelog](docs/CHANGELOG.md) (_outdated_)
-   [Credits](docs/CREDITS.md)
-   [Developers](docs/DEVELOPERS.md)
-   [FAQ](docs/FAQ.md) (_outdated_)
-   [History](docs/HISTORY.md) (_outdated_)
-   [Translators](docs/TRANSLATORS.md)

Kudos to all people that helped build the original project, upon which this one was built.