<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DBAlife &#187; curl</title>
	<atom:link href="http://www.dbalife.com/archives/tag/curl/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dbalife.com</link>
	<description>网站系统架构实践</description>
	<lastBuildDate>Wed, 27 Jul 2011 09:57:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>linux php 扩展库编译——添加cURL模块</title>
		<link>http://www.dbalife.com/archives/109.html</link>
		<comments>http://www.dbalife.com/archives/109.html#comments</comments>
		<pubDate>Mon, 28 Apr 2008 06:39:50 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/archives/109</guid>
		<description><![CDATA[在Wordpress中启用插件Flickr Photo Album for WordPress时，需要系统支持cURL。 大多数资料里都是比较简单的方法，即在编译php时加上cURL支持 但由于我的系统里已经安装有php，并且有一些其他配置，重新安装太麻烦 于是找到了这篇《linux php 扩展库编译》，验证通过，转载以记录一下 以php curl 扩展库编译为例。 假如原先编译的php目录在/oracle/php4目录下;apache在/oracle/apache2目录下；php源代码在/home/wugw目录下。如果实际目录与假定的目录不一致，则在下面的命令中做调整。 1. 找到当前运行的php版本的源代码目录，如 php-4.4.7。进入curl扩展库目录。 $cd /home/wugw/php-4.4.7/ext/curl 2. 调用phpize程序生成编译配置文件。 $/oracle/php4/bin/phpize 3. 编译扩展库，分别执行下面的configure和make命令。 $./configure –with-php-config=/oracle/php4/bin/php-config ##configure这一步执行通过后，再执行make命令，如果configure执行不通过，则查找错误原因。 $make ##make成功执行后，生成的扩展库文件在当前目录的 modules 子目录下，如 /home/wugw/php-4.4.7/ext/curl/modules/curl.so 4. 配置php.ini文件 ##将编译好的扩展库文件复制到apache2 modules目录下。 $cp /home/wugw/php-4.4.7/ext/curl/modules/curl.so /oracle/apache2/modules/. ##找到php.ini文件所在目录位置，然后编辑。可以通过查看phpinfo信息来确定php.ini文件位置。 ##在php.ini文件中找到设置扩展目录的位置，然后将扩展路径设置到apache2 modules目录下 extension_dir = “/oracle/apache2/modules/” ##在php.ini的设置扩展库位置，设置要添加的扩展库。 extension=curl.so ##以后如果还要添加别的扩展库的话，则只需先将php扩展库编译好，然后copy到apache2 modules目录下， ##然后再在这个位置，另取一行将编译后的扩展库文件名加上即可 5. 重启apache，查看phpinfo信息，即可看到刚才添加进去的curl扩展库。 Blogged with the [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/135.html' rel='bookmark' title='PIX Logging Architecture 2 安装教程'>PIX Logging Architecture 2 安装教程</a></li>
<li><a href='http://www.dbalife.com/archives/91.html' rel='bookmark' title='Opera for Linux 不能使用中文输入法的解决方法'>Opera for Linux 不能使用中文输入法的解决方法</a></li>
<li><a href='http://www.dbalife.com/archives/82.html' rel='bookmark' title='ubuntu7.10 JDK手动安装'>ubuntu7.10 JDK手动安装</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>在Wordpress中启用插件<a title="Permanent Link to Flickr Photo Album for WordPress" rel="bookmark" href="http://tantannoodles.com/toolkit/photo-album/">Flickr Photo Album for WordPress</a>时，需要系统支持cURL。<br />
大多数资料里都是比较简单的方法，即在编译php时加上cURL支持<br />
但由于我的系统里已经安装有php，并且有一些其他配置，重新安装太麻烦<br />
于是找到了这篇《<a title="linux php 扩展库编译" rel="bookmark" href="http://www.goodluck4u.com/?p=72">linux php 扩展库编译</a>》，验证通过，转载以记录一下</p>
<hr style="width: 100%; height: 2px;" />以php curl 扩展库编译为例。</p>
<p>假如原先编译的php目录在/oracle/php4目录下;apache在/oracle/apache2目录下；php源代码在/home/wugw目录下。如果实际目录与假定的目录不一致，则在下面的命令中做调整。</p>
<p>1. 找到当前运行的php版本的源代码目录，如 php-4.4.7。进入curl扩展库目录。<br />
$cd /home/wugw/php-4.4.7/ext/curl</p>
<p>2. 调用phpize程序生成编译配置文件。<br />
$/oracle/php4/bin/phpize</p>
<p>3. 编译扩展库，分别执行下面的configure和make命令。<br />
$./configure –with-php-config=/oracle/php4/bin/php-config</p>
<p>##configure这一步执行通过后，再执行make命令，如果configure执行不通过，则查找错误原因。<br />
$make</p>
<p>##make成功执行后，生成的扩展库文件在当前目录的 modules 子目录下，如 /home/wugw/php-4.4.7/ext/curl/modules/curl.so</p>
<p>4. 配置php.ini文件<br />
##将编译好的扩展库文件复制到apache2 modules目录下。<br />
$cp /home/wugw/php-4.4.7/ext/curl/modules/curl.so /oracle/apache2/modules/.</p>
<p>##找到php.ini文件所在目录位置，然后编辑。可以通过查看phpinfo信息来确定php.ini文件位置。<br />
##在php.ini文件中找到设置扩展目录的位置，然后将扩展路径设置到apache2 modules目录下<br />
extension_dir = “/oracle/apache2/modules/”</p>
<p>##在php.ini的设置扩展库位置，设置要添加的扩展库。<br />
extension=curl.so</p>
<p>##以后如果还要添加别的扩展库的话，则只需先将php扩展库编译好，然后copy到apache2 modules目录下，<br />
##然后再在这个位置，另取一行将编译后的扩展库文件名加上即可</p>
<p>5. 重启apache，查看phpinfo信息，即可看到刚才添加进去的curl扩展库。</p>
<div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;">Blogged with the <a style="color: #999; font-weight: bold;" title="Flock Browser" href="http://www.flock.com/blogged-with-flock" target="_new">Flock Browser</a></div>
<p><!-- technorati tags begin --></p>
<p style="font-size:10px;text-align:right;">Tags: <a rel="tag" href="http://technorati.com/tag/php">php</a>, <a rel="tag" href="http://technorati.com/tag/linux">linux</a>, <a rel="tag" href="http://technorati.com/tag/curl">curl</a>, <a rel="tag" href="http://technorati.com/tag/Flickr">Flickr</a>, <a rel="tag" href="http://technorati.com/tag/PhotoAlbum">PhotoAlbum</a>, <a rel="tag" href="http://technorati.com/tag/WordPress">WordPress</a></p>
<p><!-- technorati tags end --></p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/135.html' rel='bookmark' title='PIX Logging Architecture 2 安装教程'>PIX Logging Architecture 2 安装教程</a></li>
<li><a href='http://www.dbalife.com/archives/91.html' rel='bookmark' title='Opera for Linux 不能使用中文输入法的解决方法'>Opera for Linux 不能使用中文输入法的解决方法</a></li>
<li><a href='http://www.dbalife.com/archives/82.html' rel='bookmark' title='ubuntu7.10 JDK手动安装'>ubuntu7.10 JDK手动安装</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/109.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

