linux下php扩展curl的安装
【参考资料】http://blog.csdn.net/qingflyer/article/details/6546071
方法一
安装cURL
wget http://curl.haxx.se/download/curl-7.17.1.tar.gz
tar -zxf curl-7.17.1.tar.gz
./configure --prefix=/usr/local/curl
make & make install
安装php
只要打开开关 --with-curl=/usr/local/curl
就可以了。
这个扩展库还是非常棒,是fsockopen等等相关的有效的替代品。
方法二
进入安装原php的源码目录,
cd ext
cd curl
phpize
./configure --with-curl=DIR
make & make install
就会在PHPDIR/ext/curl/moudles/下生成curl.so的文件。
复制curl.so文件到extensions的配置目录,修改php.ini就好了
extension=curl.so
第一种方法试了N遍一直在失败中,于是放弃。
使用第二种方法安装,
phpize提示找不到,其实命令在/usr/local/php/bin/目标下:
# /usr/local/php/bin/phpize
./configure --with-curl=DIR需要指定php的配置路径,应该如下:
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=DIR
注:上面的资料中错把--with-php-config写成了--with-php-php-config
然后就是编译安装:
# make
# make install
到这里会提示生成文件curl.so的路径: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
进入到这个路径下,复制curl到extension_dir目录下(本目录路径可以看phpinfo可是直接看php.int),
修改php.ini
extension=curl.so
# /usr/local/php/bin/php -m
如果看到有curl项表示成功。
重启apache
# /usr/local/apache2/bin/apachectl stop
# /usr/local/apache2/bin/apachectl start
到此成功了,在phpinfo中可以看到CURL的项。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Python is an ideal programming introduction language for beginners through its ease of learning and powerful features. Its basics include: Variables: used to store data (numbers, strings, lists, etc.). Data type: Defines the type of data in the variable (integer, floating point, etc.). Operators: used for mathematical operations and comparisons. Control flow: Control the flow of code execution (conditional statements, loops).

Java Made Simple: A Beginner's Guide to Programming Power Introduction Java is a powerful programming language used in everything from mobile applications to enterprise-level systems. For beginners, Java's syntax is simple and easy to understand, making it an ideal choice for learning programming. Basic Syntax Java uses a class-based object-oriented programming paradigm. Classes are templates that organize related data and behavior together. Here is a simple Java class example: publicclassPerson{privateStringname;privateintage;

Java is a popular programming language that can be learned by both beginners and experienced developers. This tutorial starts with basic concepts and progresses through advanced topics. After installing the Java Development Kit, you can practice programming by creating a simple "Hello, World!" program. After you understand the code, use the command prompt to compile and run the program, and "Hello, World!" will be output on the console. Learning Java starts your programming journey, and as your mastery deepens, you can create more complex applications.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Pythonempowersbeginnersinproblem-solving.Itsuser-friendlysyntax,extensivelibrary,andfeaturessuchasvariables,conditionalstatements,andloopsenableefficientcodedevelopment.Frommanagingdatatocontrollingprogramflowandperformingrepetitivetasks,Pythonprovid
