Compare commits

...
76 Commits
Author SHA1 Message Date
Isaac Bennetch 7aa164f6e1 Update to 4.7.7
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-12-23 09:40:30 -05:00
Michal Čihař c086bcea60 Remove no longer used configuration
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-14 10:54:36 +01:00
Michal Čihař 885eb78b98 Set $i to last used server in configuration
This makes it easier to adjust it in config.user.inc.php.

Fixes #142

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-14 10:50:21 +01:00
Isaac Bennetch 686bf94364 Update to 4.7.6
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-11-30 22:37:35 -05:00
Michal ČihařandGitHub ade6f52350 Merge pull request #140 from kujiy/master
Added description of `PMA_PORTS`
2017-11-20 09:42:24 +01:00
KujiyandGitHub c29aadee1b Added description of PMA_PORTS 2017-11-20 14:30:46 +09:00
Isaac Bennetch 30857caf5c Update for phpMyAdmin 4.7.5
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-10-23 09:33:39 -04:00
Michal Čihař 2c92dfa55c Add configuration for Probot Stale
See https://github.com/probot/stale/

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 13:56:56 +02:00
Michal Čihař a576282372 Update to Alpine linux 3.6
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 13:55:59 +02:00
Isaac Bennetch c4abbbaa35 Update to 4.7.4
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-08-24 19:30:29 -04:00
Michal Čihař 15e82b23d2 Update to 4.7.3
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-20 23:09:24 +02:00
Isaac Bennetch ff2edd1f87 Update Docker image to phpMyAdmin 4.7.2
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-06-29 15:35:37 -04:00
Michal Čihař 275b59e3dd Remove no longer needed ctype dependency
Fixes #115

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-06-19 12:42:05 +02:00
Michal ČihařandGitHub a18b6e3842 Merge pull request #128 from tomasliubinas/patch-1
Remove link to db container
2017-06-07 15:25:14 +02:00
Tomas LiubinasandGitHub 524e669ce9 Remove link to another container
You don't need linking to db container in case of arbitrary server
2017-06-07 16:09:49 +03:00
Isaac Bennetch 8884f19c18 Update Docker image to 4.7.1
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-05-26 12:36:15 -04:00
Michal Čihař 1cfae7dbf6 Document new docker tags
We will build images based on snapshots as well.

Fixes #109

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 16:18:49 +02:00
Michal ČihařandGitHub 24fd978c91 Run Travis tests on Trusty (#123)
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 14:15:52 +02:00
Michal Čihař 77d49d4d88 Create directory for sessions
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 13:20:04 +02:00
Michal Čihař 76631a48de Remove VOLUME from Dockerfile
Fixes #117

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 12:06:14 +02:00
Michal Čihař 6f28900cf9 Increase fastcgi_read_timeout
Fixes #120

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 11:54:58 +02:00
Michal Čihař 3febe28134 Document 4.7 tag
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:33:56 +02:00
Michal Čihař 1bcaeb5fec Fix getting empty values from environment
If environemnt variable is empty and is not part of $_ENV, the getenv
(obviously) returns empty string, but we should use it.

Fixes #118

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:28:29 +02:00
Michal Čihař 1204bcd696 Do not set password to null when not specified
This makes the authentication code think this parameter was not set at
all.

Fixes #118

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:21:32 +02:00
ericfjosneandMichal Čihař 447c731aaa Add PMA_PORTS configuration
Now enabling custom port for each hosts of the PMA_HOSTS environment variable, through the use of a new PMA_PORTS environment variable.

Fixes #112
2017-04-07 15:24:36 +02:00
Michal Čihař 69a0e832d9 Install php7-ctype into the container
It is needed by Symfony ExpressionLanguage (which is used by
motranslator for plurals).

This can be reverted once ExpressionLanguage is fixed
https://github.com/symfony/symfony/pull/22325

Fixes #115

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-07 07:53:31 +02:00
Michal Čihař 0fb67d3437 Adjust cleanup to current releases
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 20:39:40 +02:00
Michal Čihař 331c3452f4 These files are no longer part of release
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 20:37:56 +02:00
Michal Čihař 942a0dd5ff Update to 4.7.0
Fixes #113

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 20:10:35 +02:00
Michal Čihař c76721ba8b Fix typo
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:18:16 +02:00
Michal Čihař 554e98df45 Add dabase server link to docker-compose
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:14:02 +02:00
Michal Čihař 5646cff98e Do not report retries
This is expected to take some time...

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:09:20 +02:00
Michal Čihař 382f9b9489 better progress reporting
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:07:27 +02:00
Michal Čihař 70b6297233 Fix path to testing configuration
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:02:09 +02:00
Michal Čihař 6314b17ebd Need more time to run tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:01:34 +02:00
Michal Čihař 63fd59434e Display logs on timeout
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:51:04 +02:00
Michal Čihař a2782dd8f6 Detect correct path to sql file
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:50:01 +02:00
Michal Čihař 61bc237761 Document this is supposed to fail right now
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:30:32 +02:00
Michal Čihař 6736b49f7a Fix expression calculation
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:27:00 +02:00
Michal Čihař b5305971ba Verify test result from docker-compose.testing.yml
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:38:35 +02:00
Michal Čihař 2ebc458766 Run pip installation while building Docker container
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:30:44 +02:00
Michal Čihař 21b0804166 Use latest images for composer testing as well
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:30:21 +02:00
Michal Čihař b35554203c Fix path to testing script
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:27:10 +02:00
Michal Čihař e5a78047b2 Move all testing files into subdirectory
This makes the file structure a bit cleaner.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:24:10 +02:00
Michal Čihař a7aa88b4c6 Specify correct server to test
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:18:09 +02:00
Michal Čihař b45585ea00 Remove trailing whitespace
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:12:31 +02:00
Michal Čihař 5d3536c381 Ignore testing dockerfile from docker
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:12:11 +02:00
Michal Čihař 24679b0c0b Run docker-compose tests in Travis
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:11:04 +02:00
Michal Čihař f5c3a1b628 Avoid using echo -e
It is not working on some /bin/sh versions and there is no reason to
enforce bash just because of this.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:08:37 +02:00
Michal Čihař d79872987d Avoid setting set -e
We are handling error codes, so we do not want script to terminate automatically

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:08:10 +02:00
Paulo LobatoandMichal Čihař ed5d9c5fc9 Provision local test env similar the CI's tests
- Run tests inside or not container
2017-03-28 11:06:54 +02:00
Michal Čihař 446ed9e0d0 Use separate Dockerfile for testing image
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:05:23 +02:00
Paulo LobatoandMichal Čihař 4ddc41bc29 Document the docker-compose test environment 2017-03-28 11:04:12 +02:00
Paulo LobatoandMichal Čihař ec28d93349 Add database containers on compose test env
- Add MariaDB 10.1 version
  - Add MySQL 5.7 version
  - Link databases to PHPMyAdmin container
2017-03-28 11:03:46 +02:00
Michal Čihař 0ac5c9516c Fix syntax errors
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:31:55 +01:00
Michal Čihař a1270dc0d5 Avoid using non ascii chars
This just makes the testing harder

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:26:18 +01:00
Michal Čihař 73ea59e04b Impove coding style
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:25:56 +01:00
Michal Čihař 54a5953b37 Mechanize does not support Python 3
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:11:01 +01:00
Michal Čihař d07907e15d Use python 3 for testing
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:08:40 +01:00
Michal Čihař e2f38b46ab Install html5lib needed for mechanize
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:02:12 +01:00
Michal Čihař cbcd23494f Generate password before using it
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 10:59:03 +01:00
Michal Čihař 4432177a0a Generate random passwords for test
This way nobody will think there is anything secret in the
.travis.yml.

See https://github.com/phpmyadmin/phpmyadmin/issues/13115

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 10:34:03 +01:00
Michal Čihař e2052a2066 Enable opcache fast shutdown
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:54:30 +01:00
Michal Čihař 6e3955516f Disable opcache.use_cwd
All scripts are executed in single working directory, so it should not
cause any harm and according to documentation it should perform better.

Issue #98

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:45:40 +01:00
Michal Čihař 29d69f34ad Disable opcache API
By setting non existing path as restrict_api.

Fixes #65

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:44:13 +01:00
Michal Čihař ddfe8e2b1c Update php.ini
Update to match php.ini-production from PHP 7.0.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:40:43 +01:00
Michal Čihař facd453fc2 Disable allow_url_fopen
Fixes #55

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:27:46 +01:00
Michal Čihař b4d05f2604 Update to 4.6
Fixes #105

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-06 11:24:11 +01:00
Michal ČihařandGitHub ff50a29234 Merge pull request #102 from nijel/alpine-3.5
Upgrade to Alpine 3.5
2017-01-02 17:14:57 +01:00
Michal Čihař e943ff30d0 Merge remote-tracking branch 'origin/pull/94' into alpine-3.5 2017-01-02 17:00:46 +01:00
Michal Čihař 19a74cb25f Fix program name
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-02 16:56:07 +01:00
Michal Čihař a9cce1d72c Upgrade to Alpine 3.5
Also switch to PHP 7

Fixes #34

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-22 19:41:50 +01:00
Michal Čihař 4bc799bdb4 Fix markup
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 11:20:27 +01:00
Michal Čihař cc3e874181 Document hub tags
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 11:19:29 +01:00
Sam Mousa a4dc5b36cd Added some missing php extensions. 2016-11-28 10:48:41 +01:00
Sam Mousa f626ed635b Updated to use alpine edge and php7. 2016-11-28 10:40:43 +01:00
20 changed files with 1187 additions and 1018 deletions
+1 -4
View File
@@ -4,7 +4,4 @@ docker-compose.testing.yml
README.md
LICENSE
Makefile
world.sql
test-docker.sh
phpmyadmin_test.py
config.test.inc.php
testing
+23
View File
@@ -0,0 +1,23 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale Issue or Pull Request is closed
daysUntilClose: 7
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
# Label to use when marking as stale
staleLabel: wontfix
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label. Set to `false` to disable
unmarkComment: false
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: pulls
+21 -7
View File
@@ -1,31 +1,45 @@
dist: trusty
sudo: required
services:
- docker
language: python
python:
- "2.7"
env:
matrix:
- DB=mysql:latest
- DB=mariadb:latest
before_install:
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=my-secret-pw -d $DB
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=$TESTSUITE_PASSWORD -d $DB
install:
- pip install mechanize
- pip install mechanize html5lib
script:
# Build image
- docker build -t phpmyadmin/phpmyadmin .
# Test for single database
- docker run --name testadmin -d --link db_server:db -p 9090:80 phpmyadmin/phpmyadmin
- ./test-docker.sh testadmin 9090
- ./testing/test-docker.sh testadmin 9090
# Test for single database using env
- docker run --name envadmin -d --link db_server:db2 -e PMA_HOST=db2 -p 6060:80 phpmyadmin/phpmyadmin
- ./test-docker.sh envadmin 6060
- ./testing/test-docker.sh envadmin 6060
# Test for arbitrary database
- docker run --name arbitraryadmin -d --link db_server:db3 -e PMA_ARBITRARY=1 -p 7070:80 phpmyadmin/phpmyadmin
- ./test-docker.sh arbitraryadmin 7070 db3
- ./testing/test-docker.sh arbitraryadmin 7070 db3
# Test for arbitrary database with user config
- docker run --name userconfigadmin -d --link db_server:db3 -v `readlink -f ./config.test.inc.php`:/etc/phpmyadmin/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
- ./test-docker.sh userconfigadmin 7080 db3
- docker run --name userconfigadmin -d --link db_server:db3 -v `readlink -f ./testing/config.test.inc.php`:/etc/phpmyadmin/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
- ./testing/test-docker.sh userconfigadmin 7080 db3
# Test docker-compose
- docker-compose -f docker-compose.yml -f docker-compose.db.yml up -d
- ./testing/test-docker.sh phpmyadmin 8080 db_server
- docker-compose stop
# Run tests in testing container
- docker-compose -f docker-compose.testing.yml up -d phpmyadmin
- ./testing/wait-for-testing.sh
+6 -11
View File
@@ -1,7 +1,7 @@
FROM alpine:3.4
FROM alpine:3.6
# Install dependencies
RUN apk add --no-cache php5-mysqli php5-xml php5-gd php5-zlib php5-bz2 php5-zip php5-openssl php5-curl php5-opcache php5-json nginx php5-fpm supervisor
RUN apk add --no-cache php7-session php7-mysqli php7-mbstring php7-xml php7-gd php7-zlib php7-bz2 php7-zip php7-openssl php7-curl php7-opcache php7-json nginx php7-fpm supervisor
# Include keyring to verify download
COPY phpmyadmin.keyring /
@@ -14,7 +14,7 @@ COPY run.sh /run.sh
RUN chmod u+rwx /run.sh
# Calculate download URL
ENV VERSION 4.6.5.2
ENV VERSION 4.7.7
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
LABEL version=$VERSION
@@ -31,19 +31,14 @@ RUN set -x \
&& tar xzf phpMyAdmin.tar.gz \
&& rm -f phpMyAdmin.tar.gz phpMyAdmin.tar.gz.asc \
&& mv phpMyAdmin-$VERSION-all-languages /www \
&& mv /www/doc/html /www/htmldoc \
&& rm -rf /www/doc \
&& mkdir /www/doc \
&& mv /www/htmldoc /www/doc/html \
&& rm /www/doc/html/.buildinfo /www/doc/html/objects.inv \
&& rm -rf /www/js/jquery/src/ /www/js/openlayers/src/ /www/setup/ /www/examples/ /www/test/ /www/po/ /www/templates/test/ /www/phpunit.xml.* /www/build.xml /www/composer.json /www/RELEASE-DATE-$VERSION \
&& rm -rf /www/setup/ /www/examples/ /www/test/ /www/po/ /www/composer.json /www/RELEASE-DATE-$VERSION \
&& sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /www/libraries/vendor_config.php \
&& chown -R root:nobody /www \
&& find /www -type d -exec chmod 750 {} \; \
&& find /www -type f -exec chmod 640 {} \;
# Add volume for sessions to allow session persistence
VOLUME /sessions
# Add directory for sessions to allow session persistence
RUN mkdir /sessions
# We expose phpMyAdmin on port 80
EXPOSE 80
+23 -1
View File
@@ -22,6 +22,17 @@ The official MySQL and MariaDB use following environment variables to define the
* `MYSQL_ROOT_PASSWORD` - This variable is mandatory and specifies the password that will be set for the `root` superuser account.
* `MYSQL_USER`, `MYSQL_PASSWORD` - These variables are optional, used in conjunction to create a new user and to set that user's password.
## Docker hub tags
You can use following tags on Docker hub:
* `latest` - latest stable release
* `4.6` - latest stable release from the 4.6 branch
* `4.7` - latest stable release from the 4.7 branch
* `edge` - bleeding edge docker image (contains stable phpMyAdmin, but the Docker image changes might not yet be fully tested)
* `edge-4.7` - bleeding edge docker image + latest snapshots from 4.7 branch
* `edge-4.8` - bleeding edge docker image + latest snapshots from 4.8 branch (currently master)
## Usage with linked server
First you need to run MySQL or MariaDB server in Docker, and this image need
@@ -45,7 +56,7 @@ docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 phpmyadmin/phpmyadmin
You can use arbitrary servers by adding ENV variable `PMA_ARBITRARY=1` to the startup command:
```
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -e PMA_ARBITRARY=1 phpmyadmin/phpmyadmin
docker run --name myadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin
```
## Usage with docker-compose and arbitrary server
@@ -59,6 +70,16 @@ Using the docker-compose.yml from https://github.com/phpmyadmin/docker
docker-compose up -d
```
## Run the E2E tests with docker-compose
You can run the E2E tests with the local test environment by running MariaDB/MySQL databases. Adding ENV variable `PHPMYADMIN_RUN_TEST=true` already added on docker-compose file. Simply run:
Using the docker-compose.testing.yml from https://github.com/phpmyadmin/docker
```
docker-compose -f docker-compose.testing.yml up phpmyadmin
```
## Adding Custom Configuration
You can add your own custom config.inc.php settings (such as Configuration Storage setup)
@@ -89,6 +110,7 @@ Set the variable ``PMA_ABSOLUTE_URI`` to the fully-qualified path (``https://pma
* ``PMA_PORT`` - define port of the MySQL server
* ``PMA_HOSTS`` - define comma separated list of address/host names of the MySQL servers
* ``PMA_VERBOSES`` - define comma separated list of verbose names of the MySQL servers
* ``PMA_PORTS`` - define comma separated list of ports of the MySQL servers
* ``PMA_USER`` and ``PMA_PASSWORD`` - define username to use for config authentication method
* ``PMA_ABSOLUTE_URI`` - define user-facing URI
+3
View File
@@ -0,0 +1,3 @@
phpmyadmin:
external_links:
- db_server:db
+27 -6
View File
@@ -1,8 +1,29 @@
phpmyadmin:
image: phpmyadmin/phpmyadmin:testing
container_name: myadmin
version: '2'
services:
mariadb:
image: mariadb:latest
container_name: phpmyadmin_testing_mariadb
environment:
- PMA_ARBITRARY=1
restart: always
- MYSQL_ROOT_PASSWORD=test123
mysql:
image: mysql:latest
container_name: phpmyadmin_testing_mysql
environment:
- MYSQL_ROOT_PASSWORD=test123
phpmyadmin:
build:
context: testing/
container_name: phpmyadmin_testing
volumes:
- /sessions
ports:
- 8090:80
- 8090:80
environment:
- PMA_ARBITRARY=1
- TESTSUITE_PASSWORD=test123
depends_on:
- mariadb
- mysql
+1 -1
View File
@@ -86,7 +86,7 @@ http {
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_read_timeout 600;
fastcgi_read_timeout 1200;
fastcgi_buffering off;
fastcgi_index index.php;
+147 -182
View File
@@ -201,10 +201,6 @@ engine = On
; http://php.net/short-open-tag
short_open_tag = Off
; Allow ASP-style <% %> tags.
; http://php.net/asp-tags
asp_tags = Off
; The number of significant digits displayed in floating point numbers.
; http://php.net/precision
precision = 14
@@ -327,7 +323,7 @@ disable_classes =
; be increased on systems where PHP opens many files to reflect the quantity of
; the file operations performed.
; http://php.net/realpath-cache-size
;realpath_cache_size = 16k
;realpath_cache_size = 4096k
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
@@ -667,11 +663,10 @@ auto_prepend_file =
; http://php.net/auto-append-file
auto_append_file =
; By default, PHP will output a character encoding using
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
; By default, PHP will output a media type using the Content-Type header. To
; disable this, simply set it to be empty.
;
; PHP's built-in default is text/html
; PHP's built-in default media type is set to text/html.
; http://php.net/default-mimetype
default_mimetype = "text/html"
@@ -691,24 +686,16 @@ default_charset = "UTF-8"
; PHP output character encoding is set to empty.
; If empty, default_charset is used.
; mbstring or iconv output handler is used.
; See also output_buffer.
; http://php.net/output-encoding
;output_encoding =
; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
; to disable this feature and it will be removed in a future version.
; If post reading is disabled through enable_post_data_reading,
; $HTTP_RAW_POST_DATA is *NOT* populated.
; http://php.net/always-populate-raw-post-data
always_populate_raw_post_data = -1
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/usr/share/php"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
@@ -772,6 +759,11 @@ enable_dl = Off
; http://php.net/cgi.fix-pathinfo
;cgi.fix_pathinfo=1
; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside
; of the web tree and people will not be able to circumvent .htaccess security.
; http://php.net/cgi.dicard-path
;cgi.discard_path=1
; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
; security tokens of the calling client. This allows IIS to define the
; security context that the request runs under. mod_fastcgi under Apache
@@ -792,6 +784,13 @@ enable_dl = Off
; http://php.net/cgi.rfc2616-headers
;cgi.rfc2616_headers = 0
; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #!
; (shebang) at the top of the running script. This line might be needed if the
; script support running both as stand-alone script and via PHP CGI<. PHP in CGI
; mode skips this line and ignores its content if this directive is turned on.
; http://php.net/cgi.check-shebang-line
;cgi.check_shebang_line=1
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
@@ -818,7 +817,7 @@ max_file_uploads = 20
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On
allow_url_fopen = Off
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
@@ -869,6 +868,47 @@ default_socket_timeout = 60
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
;
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite3.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
@@ -926,10 +966,7 @@ cli_server.color = On
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
[sqlite]
; http://php.net/sqlite.assoc-case
;sqlite.assoc_case = 0
;intl.use_exceptions = 0
[sqlite3]
;sqlite3.extension_dir =
@@ -946,6 +983,10 @@ cli_server.color = On
; http://php.net/pcre.recursion-limit
;pcre.recursion_limit=100000
;Enables or disables JIT compilation of patterns. This requires the PCRE
;library to be compiled with JIT support.
;pcre.jit=1
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; http://php.net/pdo-odbc.connection-pooling
@@ -1079,64 +1120,6 @@ ibase.dateformat = "%Y-%m-%d"
; Default time format.
ibase.timeformat = "%H:%M:%S"
[MySQL]
; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
; http://php.net/mysql.allow_local_infile
mysql.allow_local_infile = On
; Allow or prevent persistent links.
; http://php.net/mysql.allow-persistent
mysql.allow_persistent = On
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/mysql.cache_size
mysql.cache_size = 2000
; Maximum number of persistent links. -1 means no limit.
; http://php.net/mysql.max-persistent
mysql.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
; http://php.net/mysql.max-links
mysql.max_links = -1
; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysql.default-port
mysql.default_port =
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysql.default-socket
mysql.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
; http://php.net/mysql.default-host
mysql.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
; http://php.net/mysql.default-user
mysql.default_user =
; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
; http://php.net/mysql.default-password
mysql.default_password =
; Maximum time (in seconds) for connect timeout. -1 means no limit
; http://php.net/mysql.connect-timeout
mysql.connect_timeout = 60
; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
; http://php.net/mysql.trace-mode
mysql.trace_mode = Off
[MySQLi]
; Maximum number of persistent links. -1 means no limit.
@@ -1201,6 +1184,19 @@ mysqlnd.collect_statistics = On
; http://php.net/mysqlnd.collect_memory_statistics
mysqlnd.collect_memory_statistics = Off
; Records communication from all extensions using mysqlnd to the specified log
; file.
; http://php.net/mysqlnd.debug
;mysqlnd.debug =
; Defines which queries will be logged.
; http://php.net/mysqlnd.log_mask
;mysqlnd.log_mask = 0
; Default size of the mysqlnd memory pool, which is used by result sets.
; http://php.net/mysqlnd.mempool_default_size
;mysqlnd.mempool_default_size = 16000
; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
; http://php.net/mysqlnd.net_cmd_buffer_size
;mysqlnd.net_cmd_buffer_size = 2048
@@ -1210,6 +1206,15 @@ mysqlnd.collect_memory_statistics = Off
; http://php.net/mysqlnd.net_read_buffer_size
;mysqlnd.net_read_buffer_size = 32768
; Timeout for network requests in seconds.
; http://php.net/mysqlnd.net_read_timeout
;mysqlnd.net_read_timeout = 31536000
; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
; key.
; http://php.net/mysqlnd.sha256_server_public_key
;mysqlnd.sha256_server_public_key =
[OCI8]
; Connection: Enables privileged connections using external
@@ -1291,45 +1296,6 @@ pgsql.ignore_notice = 0
; http://php.net/pgsql.log-notice
pgsql.log_notice = 0
[Sybase-CT]
; Allow or prevent persistent links.
; http://php.net/sybct.allow-persistent
sybct.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
; http://php.net/sybct.max-persistent
sybct.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
; http://php.net/sybct.max-links
sybct.max_links = -1
; Minimum server message severity to display.
; http://php.net/sybct.min-server-severity
sybct.min_server_severity = 10
; Minimum client message severity to display.
; http://php.net/sybct.min-client-severity
sybct.min_client_severity = 10
; Set per-context timeout
; http://php.net/sybct.timeout
;sybct.timeout=
;sybct.packet_size
; The maximum time in seconds to wait for a connection attempt to succeed before returning failure.
; Default: one minute
;sybct.login_timeout=
; The name of the host you claim to be connecting from, for display by sp_who.
; Default: none
;sybct.hostname=
; Allows you to define how often deadlocks are to be retried. -1 means "forever".
; Default: 0
;sybct.deadlock_retry_count=
[bcmath]
; Number of decimal digits for all bcmath functions.
; http://php.net/bcmath.scale
@@ -1433,7 +1399,7 @@ session.serialize_handler = php
; Development Value: 1
; Production Value: 1
; http://php.net/session.gc-probability
session.gc_probability = 0
session.gc_probability = 1
; Defines the probability that the 'garbage collection' process is started on every
; session initialization. The probability is calculated by using the following equation:
@@ -1580,64 +1546,31 @@ url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
; http://php.net/session.upload-progress.min-freq
;session.upload_progress.min_freq = "1"
[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
mssql.max_persistent = -1
; Maximum number of links (persistent+non persistent). -1 means no limit.
mssql.max_links = -1
; Minimum error severity to display.
mssql.min_error_severity = 10
; Minimum message severity to display.
mssql.min_message_severity = 10
; Compatibility mode with old versions of PHP 3.0.
mssql.compatibility_mode = Off
; Connect timeout
;mssql.connect_timeout = 5
; Query timeout
;mssql.timeout = 60
; Valid range 0 - 2147483647. Default = 4096.
;mssql.textlimit = 4096
; Valid range 0 - 2147483647. Default = 4096.
;mssql.textsize = 4096
; Limits the number of records in each batch. 0 = all records in one batch.
;mssql.batchsize = 0
; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL server settings
; Off => Returns values as YYYY-MM-DD hh:mm:ss
;mssql.datetimeconvert = On
; Use NT authentication when connecting to the server
mssql.secure_connection = Off
; Specify max number of processes. -1 = library default
; msdlib defaults to 25
; FreeTDS defaults to 4096
;mssql.max_procs = -1
; Specify client character set.
; If empty or not set the client charset from freetds.conf is used
; This is only used when compiled with FreeTDS
;mssql.charset = "ISO-8859-1"
; Only write session data when session data is changed. Enabled by default.
; http://php.net/session.lazy-write
;session.lazy_write = On
[Assertion]
; Switch whether to compile assertions at all (to have no overhead at run-time)
; -1: Do not compile at all
; 0: Jump over assertion at run-time
; 1: Execute assertions
; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
; Default Value: 1
; Development Value: 1
; Production Value: -1
; http://php.net/zend.assertions
zend.assertions = -1
; Assert(expr); active by default.
; http://php.net/assert.active
;assert.active = On
; Issue a PHP warning for each failed assertion.
; Throw an AssertationException on failed assertions
; http://php.net/assert.exception
;assert.exception = On
; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active)
; http://php.net/assert.warning
;assert.warning = On
@@ -1681,7 +1614,7 @@ mssql.secure_connection = Off
[mbstring]
; language for internal character representation.
; This affects mb_send_mail() and mbstrig.detect_order.
; This affects mb_send_mail() and mbstring.detect_order.
; http://php.net/mbstring.language
;mbstring.language = Japanese
@@ -1726,7 +1659,7 @@ mssql.secure_connection = Off
; substitute_character used when character cannot be converted
; one from another
; http://php.net/mbstring.substitute-character
;mbstring.substitute_character = none;
;mbstring.substitute_character = none
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
@@ -1853,7 +1786,7 @@ opcache.enable=1
; directory to the script key, thus eliminating possible collisions between
; files with the same name (basename). Disabling the directive improves
; performance, but may break existing applications.
;opcache.use_cwd=1
opcache.use_cwd=0
; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.
@@ -1871,13 +1804,9 @@ opcache.validate_timestamps=0
; size of the optimized code.
opcache.save_comments=0
; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
; may be always stored (save_comments=1), but not loaded by applications
; that don't need them anyway.
;opcache.load_comments=1
; If enabled, a fast shutdown sequence is used for the accelerated code
;opcache.fast_shutdown=0
; Depending on the used Memory Manager this may cause some incompatibilities.
opcache.fast_shutdown=1
; Allow file existence override (file_exists, etc.) performance feature.
;opcache.enable_file_override=0
@@ -1925,6 +1854,42 @@ opcache.save_comments=0
; Useful for internal debugging only.
;opcache.protect_memory=0
; Allows calling OPcache API functions only from PHP scripts which path is
; started from specified string. The default "" means no restriction
opcache.restrict_api=/disabled/
; Mapping base of shared memory segments (for Windows only). All the PHP
; processes have to map shared memory into the same address space. This
; directive allows to manually fix the "Unable to reattach to base address"
; errors.
;opcache.mmap_base=
; Enables and sets the second level cache directory.
; It should improve performance when SHM memory is full, at server restart or
; SHM reset. The default "" disables file based caching.
;opcache.file_cache=
; Enables or disables opcode caching in shared memory.
;opcache.file_cache_only=0
; Enables or disables checksum validation when script loaded from file cache.
;opcache.file_cache_consistency_checks=1
; Implies opcache.file_cache_only=1 for a certain process that failed to
; reattach to the shared memory (for Windows only). Explicitly enabled file
; cache is required.
;opcache.file_cache_fallback=1
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
;opcache.huge_code_pages=1
; Validate cached file permissions.
; opcache.validate_permission=0
; Prevent name collisions in chroot'ed environment.
; opcache.validate_root=0
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
+14 -6
View File
@@ -10,13 +10,15 @@ $vars = array(
'PMA_VERBOSE',
'PMA_VERBOSES',
'PMA_PORT',
'PMA_PORTS',
'PMA_USER',
'PMA_PASSWORD',
'PMA_ABSOLUTE_URI'
);
foreach ($vars as $var) {
if (!isset($_ENV[$var]) && getenv($var)) {
$_ENV[$var] = getenv($var);
$env = getenv($var);
if (!isset($_ENV[$var]) && $env !== false) {
$_ENV[$var] = $env;
}
}
@@ -39,9 +41,11 @@ $hosts = array('db');
if (!empty($_ENV['PMA_HOST'])) {
$hosts = array($_ENV['PMA_HOST']);
$verbose = array($_ENV['PMA_VERBOSE']);
$ports = array($_ENV['PMA_PORT']);
} elseif (!empty($_ENV['PMA_HOSTS'])) {
$hosts = explode(',', $_ENV['PMA_HOSTS']);
$verbose = explode(',', $_ENV['PMA_VERBOSES']);
$ports = explode(',', $_ENV['PMA_PORTS']);
}
/* Server settings */
@@ -50,20 +54,24 @@ for ($i = 1; isset($hosts[$i - 1]); $i++) {
if (isset($verbose[$i - 1])) {
$cfg['Servers'][$i]['verbose'] = $verbose[$i - 1];
}
if (isset($_ENV['PMA_PORT'])) {
$cfg['Servers'][$i]['port'] = $_ENV['PMA_PORT'];
if (isset($ports[$i - 1])) {
$cfg['Servers'][$i]['port'] = $ports[$i - 1];
}
if (isset($_ENV['PMA_USER'])) {
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = $_ENV['PMA_USER'];
$cfg['Servers'][$i]['password'] = isset($_ENV['PMA_PASSWORD']) ? $_ENV['PMA_PASSWORD'] : null;
$cfg['Servers'][$i]['password'] = isset($_ENV['PMA_PASSWORD']) ? $_ENV['PMA_PASSWORD'] : '';
} else {
$cfg['Servers'][$i]['auth_type'] = 'cookie';
}
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
}
/*
* Revert back to last configured server to make
* it easier in config.user.inc.php
*/
$i--;
/* Uploads setup */
$cfg['UploadDir'] = '';
+1 -1
View File
@@ -1,5 +1,5 @@
[program:php-fpm]
command=php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf -c /etc/php.ini
command=php-fpm7 --nodaemonize --fpm-config /etc/php-fpm.conf -c /etc/php.ini
user=nobody
autostart=true
autorestart=true
-47
View File
@@ -1,47 +0,0 @@
#!/bin/sh
set -x
NAME="$1"
PORT="$2"
if [ -n "$3" ] ; then
SERVER="--server $3"
else
SERVER=''
fi
URL=http://127.0.0.1:$PORT/
# Wait for container to start
ret=0
TIMEOUT=0
while ! docker exec "$NAME" ps aux | grep -q nginx ; do
echo 'Waiting for start...'
sleep 1
TIMEOUT=$((TIMEOUT + 1))
if [ $TIMEOUT -gt 10 ] ; then
echo "Failed to wait!"
ret=1
exit 1
fi
done
# Perform tests
if [ $ret -eq 0 ] ; then
python phpmyadmin_test.py --url "$URL" --username root --password my-secret-pw $SERVER
ret=$?
fi
# Show debug output in case of failure
if [ $ret -ne 0 ] ; then
curl "$URL"
docker ps -a
docker exec "$NAME" ps faux
docker exec "$NAME" cat /var/log/php-fpm.log
docker exec "$NAME" cat /var/log/nginx-error.log
docker exec "$NAME" cat /var/log/supervisord.log
exit $ret
fi
# List processes
docker exec "$NAME" ps faux
+10
View File
@@ -0,0 +1,10 @@
# Testing image for phpMyAdmin
FROM phpmyadmin/phpmyadmin
# Install test dependencies
RUN apk add --no-cache curl py2-pip
RUN pip install mechanize html5lib
COPY test-mariadb.ini test-mysql.ini /etc/supervisor.d/
COPY phpmyadmin_test.py test-docker.sh world.sql /
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import argparse
import os
import re
import sys
@@ -8,11 +9,16 @@ import mechanize
def test_content(match, content):
if not match in content:
print content
print(content)
raise Exception('{0} not found in content!'.format(match))
def test_phpmyadmin(url, username, password, server=None, sqlfile='world.sql'):
def test_phpmyadmin(url, username, password, server=None, sqlfile=None):
if sqlfile is None:
if os.path.exists('./world.sql'):
sqlfile = './world.sql'
else:
sqlfile = './testing/world.sql'
br = mechanize.Browser()
# Ignore robots.txt
@@ -49,10 +55,16 @@ def main():
parser.add_argument('--username', required=True)
parser.add_argument('--password', required=True)
parser.add_argument('--server')
parser.add_argument('--sqlfile', default='world.sql')
parser.add_argument('--sqlfile', default=None)
args = parser.parse_args()
test_phpmyadmin(args.url, args.username, args.password, args.server, args.sqlfile)
test_phpmyadmin(
args.url,
args.username,
args.password,
args.server,
args.sqlfile
)
if __name__ == '__main__':
+92
View File
@@ -0,0 +1,92 @@
#!/bin/sh
NAME="$1"
if [ -n "$2" ] ; then
PORT="$2"
TESTSUITE_PORT=$2
fi
if [ -n "$3" ] ; then
SERVER="--server $3"
PMA_HOST=$3
else
SERVER=''
fi
# Set PHPMyAdmin environment
PHPMYADMIN_HOSTNAME=${TESTSUITE_HOSTNAME:=localhost}
PHPMYADMIN_PORT=${TESTSUITE_PORT:=80}
PHPMYADMIN_URL=http://$PHPMYADMIN_HOSTNAME:$PORT/
# Color text output
GREEN="\033[0;32m"
RED="\033[0;31m"
NC="\033[0m" # No Color
ret=0
# Check if script is running inside container
if [ -f /.dockerenv ] ; then
echo "Tests running inside container..."
# Set database environment
PHPMYADMIN_DB_HOSTNAME=${PMA_HOST:=localhost}
PHPMYADMIN_DB_PORT=${PMA_PORT:=3306}
PHPMYADMIN_DB_URL=http://$PHPMYADMIN_DB_HOSTNAME:$PHPMYADMIN_DB_PORT/
# Wait for database to start
TIMEOUT=0
while ! curl "$PHPMYADMIN_DB_URL" &>/dev/null; do
echo "Waiting for ${PHPMYADMIN_DB_HOSTNAME} database start..."
sleep 10
TIMEOUT=$((TIMEOUT + 1))
if [ $TIMEOUT -gt 3 ] ; then
echo "Failed to connect ${PHPMYADMIN_DB_HOSTNAME} database!"
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
ret=1
exit 1
fi
done
else
echo "Tests running outside container..."
docker ps -a
COMMAND_HOST="docker exec ${NAME}"
fi
# Wait for container to start
TIMEOUT=0
while ! $COMMAND_HOST ps aux | grep -q nginx ; do
echo "Waiting for PHPMyAdmin start..."
sleep 1
TIMEOUT=$((TIMEOUT + 1))
if [ $TIMEOUT -gt 10 ] ; then
echo "Failed to connect PHPMyAdmin!"
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
ret=1
exit 1
fi
done
# Perform tests
if [ $ret -eq 0 ] ; then
if [ -f ./phpmyadmin_test.py ] ; then
FILENAME=./phpmyadmin_test.py
else
FILENAME=./testing/phpmyadmin_test.py
fi
python $FILENAME --url "$PHPMYADMIN_URL" --username root --password $TESTSUITE_PASSWORD $SERVER
ret=$?
fi
# Show debug output in case of failure
if [ $ret -ne 0 ] ; then
curl "$PHPMYADMIN_URL"
$COMMAND_HOST ps faux
$COMMAND_HOST cat /var/log/php-fpm.log
$COMMAND_HOST cat /var/log/nginx-error.log
$COMMAND_HOST cat /var/log/supervisord.log
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
exit $ret
fi
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${GREEN}SUCCESS${NC}"
+11
View File
@@ -0,0 +1,11 @@
[program:test-mariadb]
command=/test-docker.sh test 80 mariadb
autostart=true
autorestart=false
priority=3
startretries=1
stopwaitsecs=20
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+11
View File
@@ -0,0 +1,11 @@
[program:test-mysql]
command=/test-docker.sh test 80 mysql
autostart=true
autorestart=false
priority=3
startretries=1
stopwaitsecs=20
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# Helper script to wait for testing inside container completes
# Needs running docker-compose container based on docker-compose.testing.yml
GREEN="\033[0;32m"
RED="\033[0;31m"
NC="\033[0m" # No Color
TIMEOUT=0
sleep 5
while [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests'` -lt 2 ] ; do
sleep 1
TIMEOUT=$(($TIMEOUT + 1))
if [ $TIMEOUT -gt 20 ] ; then
docker-compose -f docker-compose.testing.yml logs phpmyadmin
echo "${RED}Timeout!${NC}"
exit 1
fi
done
if [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests.*SUCCESS'` -lt 2 ] ; then
docker-compose -f docker-compose.testing.yml logs phpmyadmin
echo "${RED}Failed${NC}"
exit 2
fi
docker-compose -f docker-compose.testing.yml logs phpmyadmin
echo "${GREEN}Success${NC}"
exit 0
File diff suppressed because it is too large Load Diff