Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intranet not available when some php modules disabled or not compiled #801

Closed
5 of 8 tasks
llaville opened this issue Apr 19, 2021 · 3 comments · Fixed by #777
Closed
5 of 8 tasks

Intranet not available when some php modules disabled or not compiled #801

llaville opened this issue Apr 19, 2021 · 3 comments · Fixed by #777
Labels

Comments

@llaville
Copy link
Contributor

ISSUE TYPE

  • Bug Report

Checklist

OS / ENVIRONMENT

1. Host operating system and version: Windows 10 (20H2)
2. (Windows only) Native Docker or Docker Toolbox: Docker on WSL2
3. Docker version: Docker version 20.10.2, build 2291f61
4. Docker Compose version:
5. (Linux) Is SELinux enabled?: NO
6. What git commit hash are you on?: cdfb55e

SUMMARY

Intranet is not available, and we get either blank page or PHP Fatal errors

STEPS TO REPRODUCE

Start all containers and set localhost URL in your favorite browser

EXPECTED BEHAVIOUR

Intranet should be available, even if some features are disabled

ACTUAL BEHAVIOUR

Blank page or PHP Fatal Errors (depending of module disabled)

OTHER INFORMATION

Start command

$ docker-compose up -d

Outputs

$ ./check-config.sh

# ==============================================================================
# Checking git
# ==============================================================================
[SUCC]  git is clean

# ==============================================================================
# Checking .env file
# ==============================================================================
[SUCC]  .env file exists
[SUCC]  .env file is readable
[SUCC]  All variables are present in .env file
[SUCC]  No variables is duplicated in .env file

# ==============================================================================
# Checking .env file values
# ==============================================================================
[SUCC]  All .env file variables have correct values

# ==============================================================================
# Checking required Devilbox core directories exist
# ==============================================================================
[SUCC]  All PHP cfg/ sub directories are present
[SUCC]  All PHP log/ sub directories are present
[SUCC]  All PHP mod/ sub directories are present
[SUCC]  All HTTPD cfg/ sub directories are present
[SUCC]  All HTTPD log/ sub directories are present

# ==============================================================================
# Checking devilbox core directory permissions
# ==============================================================================
[SUCC]  All devilbox directories have correct permissions
[SUCC]  All devilbox directories have correct uid
[SUCC]  All devilbox directories have correct gid

# ==============================================================================
# Checking devilbox core file permissions
# ==============================================================================
[SUCC]  All devilbox files have correct permissions
[SUCC]  All devilbox files have correct uid
[SUCC]  All devilbox files have correct gid

# ==============================================================================
# Checking projects permissions
# ==============================================================================
[SUCC]  All project dirs have correct permissions
[SUCC]  All project dirs have correct uid
[SUCC]  All project dirs have correct gid

# ==============================================================================
# Checking projects settings
# ==============================================================================
[SUCC]  All projects have valid DNS records
[SUCC]  All projects have valid HTTPD_DOCROOT_DIR

# ==============================================================================
# Checking customizations
# ==============================================================================
[INFO]  No custom configurations applied

# ==============================================================================
# SUMMARY
# ==============================================================================
[SUCC]  Found no errors
[INFO]  No custom configurations applied
[INFO]  Ensure to run 'docker-compose stop; docker-compose rm -f' on .env changes or custom configs
$ diff env-example .env

515c515
< PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
---
> PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole,mongo,mongodb,redis,memcached,mysqli,pgsql
  • When mongo (for PHP 5.2) or mongodb (for PHP 5.3 to 8.1) are disabled by configuration (or not compiled in devilbox/docker-php-fpm docker image), we get this error :
Fatal error: Uncaught Error: Class 'MongoDB\Driver\Manager' not found in /var/www/default/include/lib/container/Mongo.php:47 Stack trace: #0 /var/www/default/include/lib/container/BaseClass.php(35): devilbox\Mongo->__construct('mongo', Array) #1 /var/www/default/config.php(161): devilbox\BaseClass::getInstance('mongo') #2 /var/www/default/htdocs/index.php(22): loadClass('Mongo') #3 {main} thrown in /var/www/default/include/lib/container/Mongo.php on line 47
  • When redis is disable by configuration (or not compiled in devilbox/docker-php-fpm docker image), we get this error :
Fatal error: Uncaught Error: Class 'Redis' not found in /var/www/default/include/lib/container/Redis.php:41 Stack trace: #0 /var/www/default/include/lib/container/BaseClass.php(35): devilbox\Redis->__construct('redis', Array) #1 /var/www/default/config.php(146): devilbox\BaseClass::getInstance('redis') #2 /var/www/default/htdocs/index.php(20): loadClass('Redis') #3 {main} thrown in /var/www/default/include/lib/container/Redis.php on line 41
  • When memcache and memcached are disabled by configuration (or not compiled in devilbox/docker-php-fpm docker image), we still see info, DB panels while we should see an error or warning message

  • When mysqli or pgsql are disable by configuration (or not compiled in devilbox/docker-php-fpm docker image), we get blank page

@llaville llaville added the bug label Apr 19, 2021
@llaville
Copy link
Contributor Author

PR to fix it will follow ...

@cytopia
Copy link
Owner

cytopia commented Apr 19, 2021

When memcache and memcached are disabled by configuration (or not compiled in devilbox/docker-php-fpm docker image), we still see info, DB panels while we should see an error or warning message

I'm not so sure about this one.
Imo, If the container are started, they should also show up as started, regardless if PHP has a module for it.

@llaville
Copy link
Contributor Author

Important info: PR 802 did not solve tools menus that have php modules requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants