<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: PHP Extensions &#8211; How and Why?</title>
	<atom:link href="http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/feed/" rel="self" type="application/rss+xml" />
	<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/</link>
	<description>PHP, Memcached, XMPP and Web Development</description>
	<lastBuildDate>Wed, 08 Feb 2012 08:03:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Learning to write PHP Extensions &#124; Huazai</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-101314</link>
		<dc:creator>Learning to write PHP Extensions &#124; Huazai</dc:creator>
		<pubDate>Wed, 01 Feb 2012 11:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-101314</guid>
		<description>[...] PHP Extensions – How and Why?     This entry was posted in PHP. Bookmark the permalink.    &#8592; Article: APC vs [...]</description>
		<content:encoded><![CDATA[<p>[...] PHP Extensions – How and Why?     This entry was posted in PHP. Bookmark the permalink.    &larr; Article: APC vs [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay K.</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-97714</link>
		<dc:creator>Jay K.</dc:creator>
		<pubDate>Fri, 13 Jan 2012 20:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-97714</guid>
		<description>There is a pretty good book for developing PHP extensions.  It&#039;s &quot;Extending and Embedding PHP&quot; by Sara Golemon.

It walks you through the primary data structures and functions for interfacing with the PHP engine.  It&#039;s a little out-of-date, but it&#039;s really the only starting point that I&#039;ve seen on the subject.

Of course, there&#039;s nothing like following by example.  Find an extension that does something similar to what you want, and use it as a template.</description>
		<content:encoded><![CDATA[<p>There is a pretty good book for developing PHP extensions.  It&#8217;s &#8220;Extending and Embedding PHP&#8221; by Sara Golemon.</p>
<p>It walks you through the primary data structures and functions for interfacing with the PHP engine.  It&#8217;s a little out-of-date, but it&#8217;s really the only starting point that I&#8217;ve seen on the subject.</p>
<p>Of course, there&#8217;s nothing like following by example.  Find an extension that does something similar to what you want, and use it as a template.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: error: php.h no such file or directory &#124; SeekPHP.com</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-62321</link>
		<dc:creator>error: php.h no such file or directory &#124; SeekPHP.com</dc:creator>
		<pubDate>Thu, 01 Sep 2011 09:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-62321</guid>
		<description>[...] I am working with the following tutorial: http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/ [...]</description>
		<content:encoded><![CDATA[<p>[...] I am working with the following tutorial: <a href="http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/" rel="nofollow">http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-58515</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Tue, 09 Aug 2011 21:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-58515</guid>
		<description>Hi,

Thanks for the tutorial. This was very helpful and I&#039;ve got it working. Now, I am trying to call a C function from a c source file without converting the C file into an extension. Basically, I guess I would like to wrap C functions in a PHP extension. 

Could you please show some examples on that?

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for the tutorial. This was very helpful and I&#8217;ve got it working. Now, I am trying to call a C function from a c source file without converting the C file into an extension. Basically, I guess I would like to wrap C functions in a PHP extension. </p>
<p>Could you please show some examples on that?</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge Arreaza</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-46320</link>
		<dc:creator>Jorge Arreaza</dc:creator>
		<pubDate>Sun, 22 May 2011 13:43:38 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-46320</guid>
		<description>OK. I compiled it and finally got the .so file. Now I found a wall my problem is that php 5.2.17 at godaddy expects me to place the .so extensions only in the extensions directory and I do not have access to it, I can only edit the php5.ini and place the files in my html directory. And this is the question: Is there a trick to make it work given the conditions mentioned?

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>OK. I compiled it and finally got the .so file. Now I found a wall my problem is that php 5.2.17 at godaddy expects me to place the .so extensions only in the extensions directory and I do not have access to it, I can only edit the php5.ini and place the files in my html directory. And this is the question: Is there a trick to make it work given the conditions mentioned?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge Arreaza</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-46195</link>
		<dc:creator>Jorge Arreaza</dc:creator>
		<pubDate>Sat, 21 May 2011 06:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-46195</guid>
		<description>I hope you can help me. 
I have linux mint 9.
Downloaded php source version 5.2.17 (this is the one used at godaddy)
I changed api no. to 20090626
I was asked to apt-get phpize5
What follows is the result of a compilation intent with no luck
Please guide me on what could be missing.
Thank you.

copy from the terminal follows
=====
/ext/sample $ phpize5
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
jorgearr@compusis5 ~/Downloads/php-5.2.17/ext/sample $ ./configure --enable-sample
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
checking for PHP extension directory... /usr/lib/php5/20090626+lfs
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
./configure: line 3953: 1.: command not found
checking 2.         Whether to enable the sample extension... yes, shared
./configure: line 4003: syntax error near unexpected token `then&#039;
./configure: line 4003: `   4. if test &quot;$PHP_SAMPLE&quot; != &quot;no&quot;; then&#039;
jorgearr@compusis5 ~/Downloads/php-5.2.17/ext/sample $ make
make: *** No targets specified and no makefile found.  Stop.
jorgearr@compusis5 ~/Downloads/php-5.2.17/ext/sample $</description>
		<content:encoded><![CDATA[<p>I hope you can help me.<br />
I have linux mint 9.<br />
Downloaded php source version 5.2.17 (this is the one used at godaddy)<br />
I changed api no. to 20090626<br />
I was asked to apt-get phpize5<br />
What follows is the result of a compilation intent with no luck<br />
Please guide me on what could be missing.<br />
Thank you.</p>
<p>copy from the terminal follows<br />
=====<br />
/ext/sample $ phpize5<br />
Configuring for:<br />
PHP Api Version:         20090626<br />
Zend Module Api No:      20090626<br />
Zend Extension Api No:   220090626<br />
jorgearr@compusis5 ~/Downloads/php-5.2.17/ext/sample $ ./configure &#8211;enable-sample<br />
checking for grep that handles long lines and -e&#8230; /bin/grep<br />
checking for egrep&#8230; /bin/grep -E<br />
checking for a sed that does not truncate output&#8230; /bin/sed<br />
checking for cc&#8230; cc<br />
checking whether the C compiler works&#8230; yes<br />
checking for C compiler default output file name&#8230; a.out<br />
checking for suffix of executables&#8230;<br />
checking whether we are cross compiling&#8230; no<br />
checking for suffix of object files&#8230; o<br />
checking whether we are using the GNU C compiler&#8230; yes<br />
checking whether cc accepts -g&#8230; yes<br />
checking for cc option to accept ISO C89&#8230; none needed<br />
checking how to run the C preprocessor&#8230; cc -E<br />
checking for icc&#8230; no<br />
checking for suncc&#8230; no<br />
checking whether cc understands -c and -o together&#8230; yes<br />
checking for system library directory&#8230; lib<br />
checking if compiler supports -R&#8230; no<br />
checking if compiler supports -Wl,-rpath,&#8230; yes<br />
checking build system type&#8230; i686-pc-linux-gnu<br />
checking host system type&#8230; i686-pc-linux-gnu<br />
checking target system type&#8230; i686-pc-linux-gnu<br />
checking for PHP prefix&#8230; /usr<br />
checking for PHP includes&#8230; -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64<br />
checking for PHP extension directory&#8230; /usr/lib/php5/20090626+lfs<br />
checking for PHP installed headers prefix&#8230; /usr/include/php5<br />
checking if debug is enabled&#8230; no<br />
checking if zts is enabled&#8230; no<br />
checking for re2c&#8230; no<br />
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.<br />
checking for gawk&#8230; gawk<br />
./configure: line 3953: 1.: command not found<br />
checking 2.         Whether to enable the sample extension&#8230; yes, shared<br />
./configure: line 4003: syntax error near unexpected token `then&#8217;<br />
./configure: line 4003: `   4. if test &#8220;$PHP_SAMPLE&#8221; != &#8220;no&#8221;; then&#8217;<br />
jorgearr@compusis5 ~/Downloads/php-5.2.17/ext/sample $ make<br />
make: *** No targets specified and no makefile found.  Stop.<br />
jorgearr@compusis5 ~/Downloads/php-5.2.17/ext/sample $</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhinav Singh</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-46179</link>
		<dc:creator>Abhinav Singh</dc:creator>
		<pubDate>Sat, 21 May 2011 00:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-46179</guid>
		<description>you may try your hand with http://php.net/manual/en/function.dl.php if default godaddy php.ini allows this on your web server</description>
		<content:encoded><![CDATA[<p>you may try your hand with <a href="http://php.net/manual/en/function.dl.php" rel="nofollow">http://php.net/manual/en/function.dl.php</a> if default godaddy php.ini allows this on your web server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge Arreaza</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-46178</link>
		<dc:creator>Jorge Arreaza</dc:creator>
		<pubDate>Fri, 20 May 2011 23:58:23 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-46178</guid>
		<description>I need to place the .so extension on godaddy web server where I cannot edit php.ini how do I call the extension to work?

$tnx=&#039;Thank you very much&#039;;
echo $tnx;</description>
		<content:encoded><![CDATA[<p>I need to place the .so extension on godaddy web server where I cannot edit php.ini how do I call the extension to work?</p>
<p>$tnx=&#8217;Thank you very much&#8217;;<br />
echo $tnx;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruben Zevallos Jr.</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-23492</link>
		<dc:creator>Ruben Zevallos Jr.</dc:creator>
		<pubDate>Sat, 01 Jan 2011 15:03:08 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-23492</guid>
		<description>Very nice to know it... I want in a near future to transfer my zTag project to a extension... the idea is to reduce the execution time.</description>
		<content:encoded><![CDATA[<p>Very nice to know it&#8230; I want in a near future to transfer my zTag project to a extension&#8230; the idea is to reduce the execution time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhinav Singh</title>
		<link>http://abhinavsingh.com/blog/2008/12/php-extensions-how-and-why/comment-page-1/#comment-11090</link>
		<dc:creator>Abhinav Singh</dc:creator>
		<pubDate>Sat, 04 Sep 2010 07:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=68#comment-11090</guid>
		<description>Hi Hamza,

Do you want to include a PHP file inside your extension and then return it&#039;s instance?</description>
		<content:encoded><![CDATA[<p>Hi Hamza,</p>
<p>Do you want to include a PHP file inside your extension and then return it&#8217;s instance?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

