gpt4 book ai didi

php - 我如何在 Mac OS X Lion 上安装 php 5.4?

转载 作者:IT王子 更新时间:2023-10-29 01:20:19 29 4
gpt4 key购买 nike

我从 php.net 下载了 php 5.4.0我想在 mac os X lion 上升级它。

我也想问问有没有人知道如何升级apache。

提前致谢。


您好,我已经安装了它,但我不知道如何使用 httpd.conf 配置它

 /usr/local/bin/php -v
PHP 5.4.0 (cli) (built: Mar 3 2012 02:41:24)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

我尝试将其添加到 httpd.conf

正如它所说,但网络服务器不想启动

LoadModule php5_module libexec/libphp5.so

最佳答案

我已经写了一篇关于如何将本地 PHP 安装升级到 5.4 的博客。

在外部站点出现故障时存档内容:

Now let’s upgrade PHP in a few steps:

1. Download and unpack the PHP source archive
2. Install following packages using brew: libjpeg and pcre
3. Change directory to the source archive of PHP
4. Use the configure command to prepare the compilation process:

./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \
--with-kerberos=/usr \
--with-zlib=/usr \
--enable-bcmath \
--with-bz2=/usr \
--enable-calendar \
--with-curl=/usr \
--enable-dba \
--enable-exif \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-icu-dir=/usr \
--with-iodbc=/usr \
--with-ldap=/usr \
--with-ldap-sasl=/usr \
--with-libedit=/usr \
--enable-mbstring \
--enable-mbregex \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--without-pear \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/mysql/mysql.sock \
--with-readline=/usr \
--enable-shmop \
--with-snmp=/usr \
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-tidy \
--enable-wddx \
--with-xmlrpc \
--with-iconv-dir=/usr \
--with-xsl=/usr \
--enable-zip \
--with-pcre-regex \
--with-pgsql=/usr \
--with-pdo-pgsql=/usr \
--with-freetype-dir=/usr/X11 \
--with-jpeg-dir=/usr \
--with-png-dir=/usr/X11

就是这样。配置成功后使用‘make test’检查你的编译,‘sudo make install’实际安装新版本。

关于php - 我如何在 Mac OS X Lion 上安装 php 5.4?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9534451/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com