如何将 MAMP 的 PHP 升级到 PHP 5.3?

发布于 2024-08-11 21:25:35 字数 242 浏览 2 评论 0原文

我无法找到任何有关如何执行此操作的资源。有人有任何想法或资源吗?!

我已经尝试更改 ./configure 选项,并且一次解决一个问题,但似乎这种方法可能需要永远..我当前的错误是..

检查 -ljpeg 中的 jpeg_read_header ...没有 配置:错误:libjpeg 出现问题。(a|so)。请检查 config.log 以获取更多信息。

我正在运行雪豹。

任何帮助都会很棒, 马特·穆勒

I haven't been able to find any resources on how to do this.. Anyone have any ideas or resources?!

I've tried changing the ./configure options and I'm solving things one at a time but it seems like this method could take forever.. My current error is..

checking for jpeg_read_header in -ljpeg... no
configure: error: Problem with libjpeg.(a|so). Please check config.log for more information.

I'm running Snow Leopard.

Any help would be great,
Matt Mueller

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

疯狂的代价 2024-08-18 21:25:36

我知道这是一个老问题,但仍然相关。

我正在更新我的 MAMP,并通过使用指南了解 PHP 的稳定版本的最新信息我在 davidgolding.net

指南 中找到如下所示:

首先,在本地主机上的 PHP 脚本中运行该

phpinfo()

函数,或者转到 PHPMyAdmin 并找到配置页面。您应该在顶部或顶部附近看到一大块配置标记:

'./configure' '--with-mysql=/Applications/MAMP/Library' 
'--with-apxs2=/Applications/MAMP/Library/bin/apxs' 
'--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library'
'--with-png-dir=/Applications/MAMP/Library' '--with-zlib' 
'--with-freetype-dir=/Applications/MAMP/Library' 
'--prefix=/Applications/MAMP/bin/php5' '--exec-prefix=/Applications/MAMP/bin/php5' 
'--sysconfdir=/Applications/MAMP/conf/php5' '--with-soap' 
'--with-config-file-path=/Applications/MAMP/conf/php5'
'--enable-track-vars' '--enable-bcmath' '--enable-ftp' '--enable-gd-native-ttf' 
'--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/Library/bin/mysql_config' 
'--with-sqlite' '--with-ttf' '--with-t1lib=/Applications/MAMP/Library' 
'--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-dbx' 
'--enable-sockets' '--enable-bcmath' '--with-imap=shared,/Applications/MAMP/Library/lib/imap-2006i' 
'--enable-soap' '--with-kerberos' '--enable-calendar' 
'--with-pgsql=shared,/Applications/MAMP/Library/pg' '--enable-dbase' 
'--enable-exif' '--with-libxml-dir=/Applications/MAMP/Library' 
'--with-gettext=shared,/Applications/MAMP/Library' '--with-xsl=/Applications/MAMP/Library' 
'--with-pdo-mysql=shared,/Applications/MAMP/Library' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg' 
'--with-mcrypt=shared,/Applications/MAMP/Library' '--with-openssl'

将整个块复制并粘贴到文本编辑器中,然后删除单引号(搜索和替换应该可以做到)。查找该标志

--with-pdo-mysql=shared,/Applications/MAMP/Library

并将其替换为:

--with-pdo-mysql=/Applications/MAMP/Library

如果不这样做,则可能会出现错误。

ld: symbol(s) not found

最后,将以下标志添加到末尾:

--without-iconv

从 PHP 源快照下载您选择的最新 PHP 版本后,

cd

将其添加到终端中的下载目录中。粘贴重新格式化的配置字符串(所有字符串,包括开头的 ./configure 命令)并运行它。

配置阶段完成后,运行:

$ make
$ sudo make install

重新启动 MAMP,就可以开始了。

I know this is an old question- but still relevant.

I'm updating my MAMP and am keeping up to date on PHP's stable releases by using a guide I found at davidgolding.net

The Guide goes as follows:

First, run the

phpinfo()

function in a PHP script on your localhost or go to PHPMyAdmin and hunt down the configuration page. You should see a large chunk of configuration markup at or near the top:

'./configure' '--with-mysql=/Applications/MAMP/Library' 
'--with-apxs2=/Applications/MAMP/Library/bin/apxs' 
'--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library'
'--with-png-dir=/Applications/MAMP/Library' '--with-zlib' 
'--with-freetype-dir=/Applications/MAMP/Library' 
'--prefix=/Applications/MAMP/bin/php5' '--exec-prefix=/Applications/MAMP/bin/php5' 
'--sysconfdir=/Applications/MAMP/conf/php5' '--with-soap' 
'--with-config-file-path=/Applications/MAMP/conf/php5'
'--enable-track-vars' '--enable-bcmath' '--enable-ftp' '--enable-gd-native-ttf' 
'--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/Library/bin/mysql_config' 
'--with-sqlite' '--with-ttf' '--with-t1lib=/Applications/MAMP/Library' 
'--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-dbx' 
'--enable-sockets' '--enable-bcmath' '--with-imap=shared,/Applications/MAMP/Library/lib/imap-2006i' 
'--enable-soap' '--with-kerberos' '--enable-calendar' 
'--with-pgsql=shared,/Applications/MAMP/Library/pg' '--enable-dbase' 
'--enable-exif' '--with-libxml-dir=/Applications/MAMP/Library' 
'--with-gettext=shared,/Applications/MAMP/Library' '--with-xsl=/Applications/MAMP/Library' 
'--with-pdo-mysql=shared,/Applications/MAMP/Library' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg' 
'--with-mcrypt=shared,/Applications/MAMP/Library' '--with-openssl'

Copy and paste this whole chunk into your text editor and remove the single quotes (search and replace should do it). Look for the flag

--with-pdo-mysql=shared,/Applications/MAMP/Library

and replace it with:

--with-pdo-mysql=/Applications/MAMP/Library

If you don’t do this, you might end up with an error.

ld: symbol(s) not found

Finally, add the following flag to the end:

--without-iconv

After you have downloaded the latest PHP release of your choosing from PHP Sources Snapshots,

cd

to the downloaded directory in Terminal. Paste your reformatted configuration string (all of it, including the beginning ./configure command) and run it.

After the configuration phase is finished, run:

$ make
$ sudo make install

Relaunch MAMP, and you’re good to go.

玩心态 2024-08-18 21:25:36

MAMP / MAMP PRO 的当前版本 (1.9) 包括 PHP 5.3,可从 MAMP 下载获取页面

The current version (1.9) of MAMP / MAMP PRO includes PHP 5.3 and is available on the MAMP download page.

同尘 2024-08-18 21:25:36

这必然会引起很多人的头痛。最简单的解决方案是导航到 mamp 网站并获取最新版本的应用程序。下载它,点击安装按钮,你会发现你的 php 版本已经更新到最新版本...

希望这有帮助,在我真正查看之前,我花了相当多的时间来升级 PHP :S

This is bound to cause a lot of headaches. The simplest solution is to navigate over to the mamp website and grab the latest version of the application. Download it, hit the install button and you will find your php version has been updated to the latest version...

Hope this helps, I spent quite a bit of time fiddling about with upgrading PHP before I actually looked :S

夏末的微笑 2024-08-18 21:25:36

我不知道 MAMP 在过去几年中是否更改了其配置,但这里的解决方案都没有帮助我。我所做的并且立即起作用的是:

  1. 从 MAMP 下载您想要的 PHP 版本
  2. 解压并将新的 PHP 文件夹移动到 MAMP/bin/php 文件夹中,您将在其中看到名称类似于 php5.3.7 的其他子文件夹。
  3. 重新启动 MAMP
  4. ”中选择新版本的 PHP
  5. 转到 MAMP 中“服务器”下的 PHP 面板,然后从下拉菜单“开始 曼普。

I don't know if MAMP has changed its configuration in the last few years but none of the solutions here helped me. What I did, and what worked right away was:

  1. Download the PHP version you want from MAMP
  2. Unzip it and move the new PHP folder into the MAMP/bin/php folder where you will see other subfolders with names like php5.3.7
  3. Restart MAMP
  4. Go to the PHP panel under Server in MAMP and choose the new verion of PHP from the drop menu
  5. Start MAMP.
哭了丶谁疼 2024-08-18 21:25:36

重新安装整个MAMP是非常安全的。您甚至不需要复制旧的 MAMP。新安装会自行完成。只需下载新的 MAMP 并单击安装即可。您唯一需要注意的是

编辑httpd.conf并打开行以包含vhosts.conf并从旧MAMP文件夹复制旧vhosts.conf。

reinstall whole MAMP is very safe. You dont even need to take a copy of old MAMP. the new install does it on its own. just feel free to download new MAMP and click install. only care u need to take is this

Edit httpd.conf and open up line to include vhosts.conf and copy old vhosts.conf from old MAMP folder.

望她远 2024-08-18 21:25:36

转到 MAMP 下载页面
然后选择
标题的更新
“MAMP PRO 2.2 的其他 PHP 版本”

Goto MAMP Download page
then choose
an update from the Heading
"Additional PHP versions for MAMP PRO 2.2"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文