Moh*_*ini 5 wordpress docker elementor
我正在使用 docker 在本地计算机上运行 Wordpress。当我想在我的 WordPress 网站上激活 Elementor Pro 时,出现此错误:
PHP script '/var/www/html/wp-content/plugins/elementor-pro/abzarwp/abzarwp.php' is protected by SourceGuardian and requires a SourceGuardian loader 'ixed.7.2.lin' to be installed.
1) Click here to download the required 'ixed.7.2.lin' loader from the SourceGuardian site
2) Install the loader to /usr/local/lib/php/extensions/no-debug-non-zts-20170718
3) Edit and add 'extension=ixed.7.2.lin' directive
4) Restart the web server
Run Code Online (Sandbox Code Playgroud)
我的docker-composer.yml就像这里:
PHP script '/var/www/html/wp-content/plugins/elementor-pro/abzarwp/abzarwp.php' is protected by SourceGuardian and requires a SourceGuardian loader 'ixed.7.2.lin' to be installed.
1) Click here to download the required 'ixed.7.2.lin' loader from the SourceGuardian site
2) Install the loader to /usr/local/lib/php/extensions/no-debug-non-zts-20170718
3) Edit and add 'extension=ixed.7.2.lin' directive
4) Restart the web server
Run Code Online (Sandbox Code Playgroud)
而且,我的 WordPressDockerfile是这样的:
FROM wordpress:php7.2-apache
RUN apt-get update \
&& apt-get -y --no-install-recommends install wget \
&& rm -rf /var/lib/apt/lists/*
Run Code Online (Sandbox Code Playgroud)
现在,我该如何解决这个问题?我的意思是如何SourceGuardian在 wordpress docker 镜像中安装?
我Dockerfile像这样更新我的 WordPress:
FROM wordpress:php7.2-apache
# Install and enable Source Gaurdian loader
RUN PHP_VERSION=$(php -v | head -n1 | cut -d' ' -f2 | cut -d. -f1-2) \
&& mkdir -p /tmp/sourceguardian \
&& cd /tmp/sourceguardian \
&& curl -Os https://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz \
&& tar xzf loaders.linux-x86_64.tar.gz \
&& cp ixed.${PHP_VERSION}.lin "$(php -i | grep '^extension_dir =' | cut -d' ' -f3)/sourceguardian.so" \
&& echo "extension=sourceguardian.so" > /usr/local/etc/php/conf.d/15-sourceguardian.ini \
&& rm -rf /tmp/sourceguardian
Run Code Online (Sandbox Code Playgroud)
现在,一切都很完美!
| 归档时间: |
|
| 查看次数: |
2514 次 |
| 最近记录: |