[Docker] Uncaught Error: Call to undefined function mysql_connect()
-
I have setup the wordpress using docker-compose. It originally had 2 services,
– mariadb and – wordpress.Later, i have added the 3rd service, SSL certificate. Now the yml file looks like following.
services: #Database mariadb: image: mariadb:10.4 volumes: - ./database:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: shoppee MYSQL_USER: user MYSQL_PASSWORD: user_password #ssl ssl: build: context: ./apache2/ dockerfile: Dockerfile ports: - '80:80' - '443:443' volumes: - ./:/var/www/html - /home/ubuntu/certs:/var/certs - /home/ubuntu/configs/000-default.conf:/etc/apache2/sites-enabled/000-default.conf - /home/ubuntu/configs/apache2.conf:/etc/apache2/apache2.conf #PHP php: build: context: . dockerfile: php.dockerfile volumes: - ./:/var/www/html volumes: mariadb:when i start the services, I’m getting following error,
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/wp-includes/wp-db.php:1688 Stack trace: #0 /var/www/html/wp-includes/wp-db.php(632): wpdb->db_connect() #1 /var/www/html/wp-includes/load.php(545): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'mysql') #2 /var/www/html/wp-settings.php(124): require_wp_db() #3 /var/www/html/wp-config.php(120): require_once('/var/www/html/w...') #4 /var/www/html/wp-load.php(37): require_once('/var/www/html/w...') #5 /var/www/html/wp-blog-header.php(13): require_once('/var/www/html/w...') #6 /var/www/html/index.php(17): require('/var/www/html/w...') #7 {main} thrown in /var/www/html/wp-includes/wp-db.php on line 1688Could please anyone advice on this ? I’m desperately stuck on this one.
The topic ‘[Docker] Uncaught Error: Call to undefined function mysql_connect()’ is closed to new replies.