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

Fatal error: Class 'mysqli' not found in - on line 19 #943

Closed
Toshiwoz opened this issue Jun 19, 2017 · 3 comments
Closed

Fatal error: Class 'mysqli' not found in - on line 19 #943

Toshiwoz opened this issue Jun 19, 2017 · 3 comments

Comments

@Toshiwoz
Copy link

Toshiwoz commented Jun 19, 2017

Hi,
I am trying to run a new container using compose, and I am getting this message:
Fatal error: Class 'mysqli' not found in - on line 19

I am using docker compose, and till now it worked without a problem, is it due to recent changes? Maybe the new 4.8 version?

Here the (censored) compose file I use:

version: '2'

services:
  wordpress:
    image: wordpress
    ports:
      - 8096:80
    volumes:
      - /persist/wordpress/xxx.xxxxxxx.xx/:/var/www/html/
      - /persist/wordpress/:/usr/local/etc/php/conf.d/
      - /persist/wordpress/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
    restart: always
    environment:
      - WORDPRESS_DB_PASSWORD=xxxxxxxxxx
      - WORDPRESS_DB_USER=user
      - WORDPRESS_DB_NAME=wp_xx
      - WORDPRESS_TABLE_PREFIX=xxwp_
      - VIRTUAL_HOST=xxx.xxxxxxx.xx
      - LETSENCRYPT_HOST=xxx.xxxxxxx.xx
      - LETSENCRYPT_EMAIL=xxxxx@xxxxx.xx
    external_links:
      - mysql
    networks:
      - net_db
      - proxy

networks:
  net_db:
    external:
      name: dblayer_xxx
  proxy:
    external:
      name: proxy_xxx
@tianon
Copy link
Member

tianon commented Jun 19, 2017

That's odd -- from what I can tell, mysqli is still included:

$ docker pull wordpress
Using default tag: latest
latest: Pulling from library/wordpress
ef0380f84d05: Already exists 
d676534ff315: Already exists 
c80a1f6ddd8d: Already exists 
c3e9b0c1871f: Already exists 
b5e2756f5f08: Already exists 
cd2ca1686b17: Already exists 
529b20a8291d: Already exists 
dd0c35492a16: Already exists 
719b692e57dd: Already exists 
19f393a2429a: Already exists 
125592bbc92c: Already exists 
2a288be79100: Already exists 
2a5502930c88: Already exists 
3b984cb927ea: Pull complete 
02a2191cdfe3: Pull complete 
b27821cc8027: Pull complete 
ef0e2e9e9b36: Pull complete 
5093214ddfa7: Pull complete 
Digest: sha256:3171062081a424196624db488f59b70b9fc15a8b77512c93ba58221f494c4ab5
Status: Downloaded newer image for wordpress:latest

$ docker run -it --rm wordpress sh -c 'php -i | grep mysqli'
/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,
mysqli
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
API Extensions => mysqli

@Toshiwoz
Copy link
Author

Hi, strangely, now it works.
Maybe because:

  • I got rid of the volumes for the uploads.ini file
  • I had low memory, and restarting some containers I freed some memory

@tianon
Copy link
Member

tianon commented Jun 20, 2017

Huh, well glad it got sorted out! I'm going to close, since it sounds like it was an environmental issue. 👍

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

No branches or pull requests

2 participants