我正在将一个非常旧的服务器(Debian etch)迁移到 Debian Stretch,并且开发的每个应用程序都有 PHP 问题,这是意料之中的。有些可以修复,有些不能(如几个 drupal 6 站点)。将来,单个应用程序将在 PHP7.0 下提供服务,但在那一天到来之前,我需要 PHP5.3 为它们提供服务。
我知道 Debian stretch 对可共同安装的 PHP 版本有某种“本机”支持,但我发现的所有示例都使用 PHP5.6(Jessie 的版本):https ://pehapkari.cz/blog/2017/03/27 /multiple-php-versions-the-easy-way/
另外,我发现了一些 PHP5.3 和 PHP5.4 或 PHP5.6 在 Debian Jessie、Wheezy 等上协同工作的示例,但不适用于 Debian Stretch (PHP7.0):https ://superuser.com/questions/913792 /php-5-3-10-on-debian-jessie
所以,首先,我需要知道在 Debian Stretch上的 apache2上是否可以让 PHP7.0 和 PHP5.3 一起工作。
其次,我需要弄清楚如何做到这一点。
我不是系统管理员,所以我的 debian 知识从头开始一天天地增长。
谢谢你。
我正在尝试在 archlinux 上设置我的 httpd (apache2) 服务器。现在一切正常,除了解析我的 php 文件。
我关注了这篇文章:https : //wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP。
我已经
这是我的 httpd.conf:
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# …Run Code Online (Sandbox Code Playgroud) 我尝试在没有docker 的虚拟机上运行的 Alpine GNU/Linux 发行版上设置 LEMP 堆栈。
然后我尝试php7-mysqli通过社区存储库安装:
sudo apk add php7-mysqli
Run Code Online (Sandbox Code Playgroud)
但我收到以下错误:
ERROR: unsatisfiable constraints:
so:libcrypto.so.43 (missing):
required by: php7-openssl-7.2.5-r0[so:libcrypto.so.43] php7-openssl-7.2.5-r0[so:libcrypto.so.43]
so:libssl.so.45 (missing):
required by: php7-openssl-7.2.5-r0[so:libssl.so.45] php7-openssl-7.2.5-r0[so:libssl.so.45]
Run Code Online (Sandbox Code Playgroud)
我已经安装了libressl,但错误仍然存在。知道为什么会发生这种情况吗?请记住,我已将存储库设置为社区的存储库:
http://dl-2.alpinelinux.org/alpine/edge/community
Run Code Online (Sandbox Code Playgroud)
我按照https://www.cyberciti.biz/faq/how-to-install-php-7-fpm-on-alpine-linux/中提到的说明进行操作
libressl2.6-libcrypto-2.6.3-r0我尝试通过以下命令安装:
sudo apk add libressl2.6-libcrypto-2.6.3-r0
Run Code Online (Sandbox Code Playgroud)
我得到以下输出:
ERROR: unsatisfiable constraints:
libressl2.6-libcrypto-2.6.3-r0 (missing):
required by: world[libressl2.6-libcrypto-2.6.3-r0]
Run Code Online (Sandbox Code Playgroud)
如果我尝试安装该libressl软件包,我会收到以下响应:
sudo apk add libressl
(1/2) Installing libressl2.6-libtls (2.6.3-r0)
(2/2) Installing libressl (2.6.3-r0)
Executing busybox-1.27.2-r8.trigger
OK: 119 MiB in 53 packages
Run Code Online (Sandbox Code Playgroud)
问题仍然存在。
我还尝试 …
I've installed apche2 and php7.1-fpm recently and added them to boot with
systemctl enable apache2
systemctl enable php7.1-fpm
Run Code Online (Sandbox Code Playgroud)
After rebooting the system systemctl status shows the following:
sudo systemctl status apache2.service php7.1-fpm.service
? apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
preset: enabled)
Active: failed (Result: timeout) since Mon 2017-12-25 18:53:43 CET;
10min ago
Process: 468 ExecStart=/usr/sbin/apachectl start (code=killed,
signal=TERM)
Dez 25 18:53:33 drupal-PC systemd[1]: Starting The Apache HTTP
Server...
Dez 25 18:53:43 drupal-PC apachectl[468]: AH00558: apache2: …Run Code Online (Sandbox Code Playgroud) 我在 AWS 机器上运行 CentOS 7。我最近启用了 IPv6,一切正常——除了 PHP 连接请求(也来自命令行的 curl)总是更喜欢使用 IPv6 而不是 IPv4。这会导致一些不真正支持它的网站出现问题,例如向 Apple、Android 发送通知,并且一切都在 IPv4 中运行良好。
如何让我的所有传出请求都使用 IPv4 而不是 IPv6?我也不想禁用传入的 IPv6,因为我的一些客户只使用 IPv6。
我正在将服务器从 Debian 9 (stretch) 升级到 Debian 10 (buster),并且我知道(并且打算)这会导致 PHP 从 PHP 7.0 升级到 PHP 7.3。
php -v确实显示 PHP 7.3 已安装,但是当尝试登录到服务器上运行的 Web 应用程序时,我收到一条(模糊的)错误消息,并且当我创建要运行的测试页面时,它显示phpinfoApache 似乎仍然正在运行 PHP 7.0。
我曾预计 Apache 将改用 PHP 7.3 作为操作系统升级的一部分。我需要做什么才能让 Apache 现在使用 PHP 7.3?
php7 ×6
php ×3
apache-httpd ×2
debian ×2
alpine-linux ×1
arch-linux ×1
centos ×1
cpanel ×1
php5 ×1
systemd ×1