我无法用 simplexml 解决问题。
我刚刚在带有 apache2 服务器的 aws linux/ubuntu 上设置了一个 ec2 实例并尝试安装商店。
问题:
Fatal error: Call to undefined function XXX\Recovery\Install\simplexml_load_file() in /var/www/XXX/recovery/install/src/Requirements.php on line 104
Run Code Online (Sandbox Code Playgroud)
搜索已知问题。我想出了手动安装的 php 包。检查 phpinfo 和 php -mi 后,假设安装了以下模块:
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache …Run Code Online (Sandbox Code Playgroud) 问题:
从Windows主机。端口映射/公开不起作用。
无法访问容器应用。
curl http://localhost:PORT (127.0.0.1 / 0.0.0.0)
-> Could not get any response
curl http://DOCKER-IP:PORT (127.17.0.1 / 127.17.0.2)
-> Could not get any response
curl http://DOCKER-SUBNET-ADDRESS:PORT (10.0.75.0)
-> Could not get any response
Run Code Online (Sandbox Code Playgroud)
设定:
Windows10主机系统+ Docker容器(带有简单的helloworld python flask应用程序)
Docker容器正在运行。在Docker容器内,flask应用程序的行为符合预期。
再生产:
获取你好世界回购
git clone https://github.com/shekhargulati/python-flask-docker-hello-world
构建并运行Docker容器
docker build -t simple-flask-app:latest .
docker run -d -p 5000:5000 simple-flask-app --name simple-flask-app
exec进入容器并检查烧瓶是否正在运行
docker exec -it simple-flask-app
apt-get install curl
curl http://127.0.0.1:5000
->查看200 OK + Flask is running(或类似这样的文字)
退出Docker容器
exit
在Windows主机上卷曲 …