启用/安装curl扩展(OSX服务器/ PHP 5.3.3 / Apache 2.2的) [英] Enabling/Installing Curl Extension (OSX Server/PHP 5.3.3/Apache 2.2)

查看:184
本文介绍了启用/安装curl扩展(OSX服务器/ PHP 5.3.3 / Apache 2.2的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有一些麻烦卷曲用PHP我继承了服务器上工作。

I've been having some trouble getting CURL working with PHP on a server I inherited.

到目前为止,我已经通过取消注释扩展= p​​hp_curl.dll 行,并重新启动Apache的启用在我的php.ini的扩展。

So far I have enabled the extension in my php.ini by uncommenting the extension=php_curl.dll line, and restarting apache.

不过,我现在开始PHP时收到以下错误:

However, I now receive the following error when starting PHP:

PHP的警告:PHP启动:无法加载动态库'/opt/local/lib/php/extensions/php_curl.dll

该php_curl.dll文件未在上述目录中,我找不到任何地方合法从下载它(似乎并没有被包含在PHP或卷曲)。

The php_curl.dll file doesn't exist in the aforementioned directory, and I can't find anywhere legitimate to download it from(doesn't seem to be included in PHP, or Curl).

更新

以下在应答<一个提供的步骤href=\"http://stackoverflow.com/questions/6523504/php-warning-unable-to-load-dynamic-library\">here,我能够编译新php_curl.so文件,并将其安装到扩展目录。

UPDATE
Following the steps provided in the answer here, I was able to compile a new php_curl.so file and install it to the extensions directory.

CUDOS去弗朗索瓦Deschenes

要从头开始编译curl.so(php_curl.dll)模块:

To compile a curl.so (php_curl.dll) module from scratch:


  1. 下载并提取您的PHP版本的新副本。

  2. 打开一个终端窗口,然后转到卷曲目录(类型 CD的php-5.3.3 / EXT /卷曲/ )。

  3. 键入运行phpize

  4. 键入 ./配置

  5. 键入制作

  6. 键入须藤使安装

  7. 取消注释扩展= curl.so 在php.ini。

  1. Download and extract a new copy of your version of PHP.
  2. Open a terminal window and go to the curl directory (Type cd php-5.3.3/ext/curl/).
  3. Type phpize.
  4. Type ./configure.
  5. Type make.
  6. Type sudo make install.
  7. Uncomment extension=curl.so in your php.ini.

您还应该确保在启动过程之前扩展被注释掉,否则你可能会收到关于该模块已经存在的错误。

You should also make sure the extension is commented out before you start the processes, otherwise you may receive an error about the module already existing.


推荐答案

继答案提供的步骤<一个href=\"http://stackoverflow.com/questions/6523504/php-warning-unable-to-load-dynamic-library\">here,我能够编译新php_curl.so文件,并将其安装到扩展目录。

Following the steps provided in the answer here, I was able to compile a new php_curl.so file and install it to the extensions directory.

CUDOS去弗朗索瓦Deschenes

要从头开始编译curl.so(php_curl.dll)模块:

To compile a curl.so (php_curl.dll) module from scratch:


  1. 下载并提取您的PHP版本的新副本。

  2. 打开一个终端窗口,然后转到卷曲目录(类型 CD的php-5.3.3 / EXT /卷曲/ )。

  3. 键入运行phpize

  4. 键入 ./配置

  5. 键入制作

  6. 键入须藤使安装

  7. 取消注释扩展= curl.so 在php.ini。

  1. Download and extract a new copy of your version of PHP.
  2. Open a terminal window and go to the curl directory (Type cd php-5.3.3/ext/curl/).
  3. Type phpize.
  4. Type ./configure.
  5. Type make.
  6. Type sudo make install.
  7. Uncomment extension=curl.so in your php.ini.

您还应该确保在启动过程之前扩展被注释掉,否则你可能会收到关于该模块已经存在的错误。

You should also make sure the extension is commented out before you start the processes, otherwise you may receive an error about the module already existing.

这篇关于启用/安装curl扩展(OSX服务器/ PHP 5.3.3 / Apache 2.2的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆