dslk6326846 2019-01-28 14:52
浏览 78
已采纳

在docker上安装duplicator archive以进行本地wordpress开发

I have a live website, and I want to test something locally. With Duplicator I made a installer and locally I started a Docker Container for Wordpress. This is my docker-compose.yml:

version: "2"
services:
  my-wpdb:
    image: mariadb
    ports:
      - "8081:3306"
    environment:
      MYSQL_ROOT_PASSWORD: password
  my-wp:
    image: wordpress
    volumes:
      - ./:/var/www/html
    ports:
      - "8080:80"
    links:
      - my-wpdb:mysql
    environment:
      WORDPRESS_DB_PASSWORD: password

I copied the installer.php in the local folder and started the installation on localhost:8080/installer.php.

When I reach the page for the database connection it doesn't work, and I don't understand if what I want to achieve is not possible or I make some mistakes.

This is what I see:

And this is what I can read on dup-installer-log.txt:

INSTALLER ERROR:
*** PHP Fatal Error Message: Uncaught Error: Call to a member function options() on boolean in /var/www/html/dup-installer/classes/class.db.php:45
Stack trace:
#0 /var/www/html/dup-installer/ctrls/ctrl.s2.dbtest.php(162): DUPX_DB::connect('localhost', 'admin', 'password', NULL, '8081')
#1 /var/www/html/dup-installer/ctrls/ctrl.s2.dbtest.php(121): DUPX_DBTest->r10All(Array)
#2 /var/www/html/dup-installer/ctrls/ctrl.s2.dbtest.php(87): DUPX_DBTest->runBasic()
#3 /var/www/html/dup-installer/ctrls/ctrl.s2.base.php(92): DUPX_DBTest->run()
#4 /var/www/html/dup-installer/main.installer.php(196): require_once('/var/www/html/d...')
#5 {main}
  thrown (Code: 1, line 45 in /var/www/html/dup-installer/classes/class.db.php)

Can somebody help me?

  • 写回答

2条回答 默认 最新

  • duankan6894 2019-05-07 17:54
    关注

    According to your file. it should be

    Host: my-wpdb Database: mysql User: root password: password

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?