<?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>Abdul Qabiz on Web Technologies, Flash Platform, RIA, India &#187; php</title>
	<atom:link href="http://www.abdulqabiz.com/blog/archives/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abdulqabiz.com/blog</link>
	<description>a developer and entrepreneur on web technologies, adobe flash platform (flex, flash, air), web, opensource, linux, free software, usability, startups, India...</description>
	<lastBuildDate>Fri, 14 Oct 2011 18:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<cloud domain='www.abdulqabiz.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>CalDAV and SyncML Resources</title>
		<link>http://www.abdulqabiz.com/blog/archives/2011/01/25/caldav-and-syncml-resources/</link>
		<comments>http://www.abdulqabiz.com/blog/archives/2011/01/25/caldav-and-syncml-resources/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 12:48:14 +0000</pubDate>
		<dc:creator>Abdul Qabiz</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[caldav]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[references]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[specification]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[syncml]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://www.abdulqabiz.com/blog/?p=862</guid>
		<description><![CDATA[One of our projects requires a calendar application with bi-directional synchronization with any other calendar applications/services such as Microsoft Outlook, Mozilla Thunderbird, Google Calendar, Yahoo! Calendar, iPhone, Nokia or others. We can export iCalendar file, that would be readonly i.e. client applications can not write back to source calendar I started looking at CalDAV, which [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2011%2F01%2F25%2Fcaldav-and-syncml-resources%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2011%2F01%2F25%2Fcaldav-and-syncml-resources%2F&amp;source=abdulqabiz&amp;style=compact&amp;service=bit.ly&amp;service_api=R_580aa1ef8d0667776dc27125956b7a16&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>One of our projects requires a calendar application with bi-directional synchronization with any other calendar applications/services such as Microsoft Outlook, Mozilla Thunderbird, Google Calendar, Yahoo! Calendar, iPhone, Nokia or others.</p>
<p>We can export <a title=" iCalendar" href="http://en.wikipedia.org/wiki/ICalendar">iCalendar</a> file, that would be readonly i.e. client applications can not write back to source calendar</p>
<p>I started looking at <a title="CalDAV - Wikipedia" href="http://en.wikipedia.org/wiki/CalDAV">CalDAV</a>, which is an extension to <a title="WebDAV - Web-based Distributed Authoring and Versioning" href="http://en.wikipedia.org/wiki/WebDAV">WebDAV</a>, and <a title="Synchronization Markup Language" href="http://en.wikipedia.org/wiki/SyncML">SyncML</a>, which is gaining traction because most of the mobile devices use it for synchronization of data. I yet to find where CalDAV fits when it comes to mobile devices.</p>
<p>I found out some interesting links, which I am still going through. I thought, it would be nice to share these links:</p>
<ul>
<li><a title="Synchronization Markup Language" href="http://en.wikipedia.org/wiki/SyncML">SyncML</a></li>
<li><a title="SyncML - Open Mobile Alliance" href="http://www.openmobilealliance.org/tech/affiliates/syncml/syncmlindex.html">SyncML Resources &#8211; <abbr title="Open Mobile Alliance">OMA</abbr></a></li>
<li><a title="SyncML Server written in PHP" href="http://nicolas.bougues.net/syncml/">SyncML Server in PHP</a></li>
<li><a title="Mooha: SyncML server in PHP" href="http://code.google.com/p/mooha/">Mooha &#8211; SyncML Server in PHP</a></li>
<li><a title="SyncGW: SyncML and WBXML Gateway" href="http://syncgw.com/pages/en/home.php">SyncGW &#8211; SyncML and WBXML Gateway</a></li>
<li><a title="SyncML resources on Horde" href="http://www.horde.org/sync/">SyncML Resources &#8211; Horde.org</a></li>
<li><a title="Funambol - OpenSource SyncML server, client and addons" href="https://www.forge.funambol.org/learn/">Funambol &#8211; SyncML server, client and add-ons</a></li>
<li><a title="Calendaring Extension to WebDAV" href="http://en.wikipedia.org/wiki/CalDAV">CalDAV</a></li>
<li><a title="CalDAV resources" href="http://caldav.calconnect.org/">CalDAV Resources</a></li>
<li><a title="CalDAV support in SabreDAV - a WebDAV server in PHP" href="http://code.google.com/p/sabredav/wiki/CalDAV">CalDAV support in SabreDAV &#8211; A WebDAV server in PHP</a></li>
<li><a title="DAViCal - CalDAV server in PHP" href="http://www.davical.org/index.php">DAViCal &#8211; CalDAV server in PHP</a></li>
<li><a title="Article: CalDAV on mobile devices" href="http://blogs.sun.com/chienr/entry/caldav_on_mobile_devices">State of CalDAV on mobile-devices</a></li>
<li><a title="CalDAV Resources by Google" href="http://code.google.com/apis/calendar/caldav/">CalDAV Resources by Google</a></li>
<li><a title="iCalendar - Wikipedia" href="http://en.wikipedia.org/wiki/ICalendar">iCalendar &#8211; Wikipedia</a></li>
<li><a title="iCalCreator - PHP class to manipulate iCalendar" href="http://www.kigkonsult.se/iCalcreator/">iCalCreator &#8211; PHP class to manipulate iCal(.ics) files</a></li>
<li><a title="PHPiCalendar - PHP class to parse/view iCal files" href="http://phpicalendar.net/">PHPiCalendar &#8211; PHP class to parse/view iCal(.ics) files</a></li>
<li><a title="Bennu - PHP iCalender library" href="http://bennu.sourceforge.net/">Bennu &#8211; PHP iCalendar library (inactive project?)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.abdulqabiz.com/blog/archives/2011/01/25/caldav-and-syncml-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OSX: Leopard to Snow Leopard Upgrade</title>
		<link>http://www.abdulqabiz.com/blog/archives/2010/04/19/mac-osx-leopard-to-snow-leopard-upgrade/</link>
		<comments>http://www.abdulqabiz.com/blog/archives/2010/04/19/mac-osx-leopard-to-snow-leopard-upgrade/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 06:54:14 +0000</pubDate>
		<dc:creator>Abdul Qabiz</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[64]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[libiconv]]></category>
		<category><![CDATA[libiconv.2.dylib]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rdc]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[snow]]></category>
		<category><![CDATA[snowleopard]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.abdulqabiz.com/blog/?p=716</guid>
		<description><![CDATA[Snow Leopard Installer DVD was delivered in our office on Saturday and I couldn&#8217;t wait to upgrade to Snow Leopard (10.6.x). I could have upgraded earlier, if Apple had enough stores and better reseller network in India. Anyway, upgrade was smoother  compared with Tiger(10.4.x) to Leopard (10.5.x) upgrade. Installer UI has around 4-5 steps and none [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2010%2F04%2F19%2Fmac-osx-leopard-to-snow-leopard-upgrade%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2010%2F04%2F19%2Fmac-osx-leopard-to-snow-leopard-upgrade%2F&amp;source=abdulqabiz&amp;style=compact&amp;service=bit.ly&amp;service_api=R_580aa1ef8d0667776dc27125956b7a16&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a title="Apple Mac OSX: Snow Leopard" href="http://apple.com/macosx">Snow Leopard</a> Installer DVD was delivered in our office on Saturday and I couldn&#8217;t wait to upgrade to <a href="http://apple.com/macosx">Snow Leopard</a> (10.6.x).  I could have upgraded earlier, if <a href="http://www.abdulqabiz.com/blog/archives/2010/01/09/apple-india-broken-servic-process/">Apple had enough stores and better reseller network in India</a>.</p>
<p>Anyway, upgrade was smoother  compared with Tiger(10.4.x) to Leopard (10.5.x) upgrade.  Installer UI has around 4-5 steps and none of steps mention &#8220;upgrade&#8221; word. Installer is smart enough to detect existing installations, figure out which printer drivers to keep or install. However, it chooses all languages (translation) to install even when you didn&#8217;t have those in Leopard.</p>
<p><strong>Within fourty mintues, upgrade was completed and I was back in action.</strong></p>
<p>However, In my case, I have to spend some more time to setup/fix things which were broken, such as:-</p>
<ol>
<li>Reinstalled MacPort using i<a href="http://distfiles.macports.org/MacPorts/MacPorts-1.8.2-10.6-SnowLeopard.dmg">nstaller for snow-leopard</a> and upgraded some of packages (libiconv, jpeg, libpng, libmycrypt, openssl, gettext, freetype, openssl, curl) and their dependencies for 64bit compatibilities (+universal, +variants)</li>
<li>Compiled Apache, MySQL and PHP for 64 bit</li>
<li>Reinstalled Remote Desktop Connection using <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cd9ec77e-5b07-4332-849f-046611458871&amp;displaylang=en">latest installer </a> to fix crash issue on Snow Leopard</li>
</ol>
<p>If you don&#8217;t want to use MacPorts, you can download source of these libraries separately, compile and install. These would be installed in  /usr/local unless you change the prefix.</p>
<p>Installing 64 bit version of Apache, MySQL and PHP took around two-three hours because of some issues related to libiconv.2.dylib. Apache would compile but fail to run, reporting incorrect version of libiconv. I downloaded libiconv source, compiled and installed it in /usr/lib (instead of /usr/local/lib). Apache started working but  vim, make, other unix programs (chmod, etc) failed to run using latest libiconv.2.dylib.</p>
<p>I tweaked the setting in /usr/sbin/envvars to use following:-</p>
<p><code> </code></p>
<p><code></p>
<pre>DYLD_LIBRARY_PATH="/usr/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib:/opt/local/lib:/sw/lib</pre>
<p></code></p>
<p>Basically, added a fallback path so if library is not found in /usr/lib, it would look into other directors, as specified.  After doing this, Apache (64bit) and vim, make, chmod, etc started working.</p>
<p>MySQL compilation was straight forward with following command, thanks to <a href="http://hivelogic.com/articles/compiling-mysql-on-snow-leopard link">this link</a>, I just added CFLAGS=&#8221;-arch x86_64&#8243;  while compiling to make sure mysql is compiled for 64 bit. Moved data directory back to new mysql installation directory.</p>
<p>Compiling php 5.2.13 resulted into some errors related to iconv, hash and gd. After spending sometime, I decided to compile without these extensions with following commands:</p>
<p><code> </code></p>
<p><code></p>
<pre>MACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp"
CCFLAGS="-arch x86_64 -g -Os -pipe"
CXXFLAGS="-arch x86_64 -g -Os -pipe"
LDFLAGS="-arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
./configure --prefix=/usr/local/php5 --exec-prefix=/usr/local/php5 --disable-dependency-tracking --sysconfdir=/private/etc --with-apxs2=/usr/sbin/apxs --enable-cli --with-config-file-path=/etc --with-libxml-dir=/usr --with-openssl=/usr --with-kerberos=/usr --with-zlib=/usr --enable-bcmath --with-bz2=/usr --enable-calendar --with-curl=/usr --enable-exif --enable-ftp --without-gd --with-jpeg-dir=/opt/local/lib --with-png-dir=/usr/local/lib --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --with-ldap=/usr --with-ldap-sasl=/usr --enable-mbstring --enable-mbregex --with-mysql=mysqlnd --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-iodbc=/usr --enable-shmop --with-snmp=/usr --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --without-xmlrpc --without-iconv --with-xsl=/usr

#if everything goes well
make

#if everything goes above, install php5 in /usr/local/php5
sudo make install</pre>
<p></code></p>
<p>I checked (php -m) some extensions (xdebug, etc) were not loading, so I updated those individually, specially iconv, xmlrpc and gd. Compiling an extension is generally four step process. For example, if you want to compile iconv, you can do the following:</p>
<p><code> </code></p>
<p><code></p>
<pre>$ cd /php-source/ext/iconv
$ phpize
$ ./configure --with-iconv=/usr
$ make
$ sudo make install</pre>
<p></code></p>
<p>It all worked fine, apache was loading php fine and all my websites and applications work fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abdulqabiz.com/blog/archives/2010/04/19/mac-osx-leopard-to-snow-leopard-upgrade/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex Compiler Modules</title>
		<link>http://www.abdulqabiz.com/blog/archives/2008/11/21/flex-compiler-modules/</link>
		<comments>http://www.abdulqabiz.com/blog/archives/2008/11/21/flex-compiler-modules/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 10:17:01 +0000</pubDate>
		<dc:creator>Abdul Qabiz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://www.abdulqabiz.com/wordpress/?p=417</guid>
		<description><![CDATA[In one of my projects, I was trying to use Flex Compiler Module for Apache. I was doing development on my Mac OSX and everything worked fine. As soon as, I uploaded application on server (CentOS 4.5, x86_64), it didn&#8217;t work. After some debugging, I figured out Flex Compiler Module binaries are compiled as 32bit [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2008%2F11%2F21%2Fflex-compiler-modules%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2008%2F11%2F21%2Fflex-compiler-modules%2F&amp;source=abdulqabiz&amp;style=compact&amp;service=bit.ly&amp;service_api=R_580aa1ef8d0667776dc27125956b7a16&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In one of my projects, I was trying to use <a href="http://opensource.adobe.com/wiki/display/flexsdk/downloads#Downloads-Flex3CompilerModules">Flex Compiler Module for Apache</a>. I was doing development on my Mac OSX and everything worked fine. As soon as, I uploaded application on server (CentOS 4.5, x86_64), it didn&#8217;t work.</p>
<p>After some debugging, I figured out Flex Compiler Module binaries are compiled as 32bit would not work on 64bit version of Apache. I could have used some third-party wrappers or rebuild it again for 64bit, unfortunately Adobe has not provided source-code for these modules.</p>
<p>There was another problem, it seems this apache-module has dependency on glibc,  the required version of glibc is not available for RedHat/CentOS 4.5. Now that&#8217;s weird, even if I had source code, not sure I could build against 64bit of CentOS? Not even sure about CentOS 4.5 x86?</p>
<p>BTW! glibc seems to be an important library and one can not just go ahead and update for one requirement, it might actually break many other applications. Hence, I didn&#8217;t upgrade glibc on CentOS 4.5 to the required version.</p>
<p>So as an alternative, I used Flex Compiler API by writing some wrappers in Java and then invoke API using PHP. But it seems there is weird licensing i.e. I need to have license of Adobe LCDs in order to use Flex Compiler API?</p>
<p>I have fallen back on pure PHP implementation, I need to figure out about custom logging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abdulqabiz.com/blog/archives/2008/11/21/flex-compiler-modules/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Proxy Script for cross-domain requests</title>
		<link>http://www.abdulqabiz.com/blog/archives/2007/05/31/php-proxy-script-for-cross-domain-requests/</link>
		<comments>http://www.abdulqabiz.com/blog/archives/2007/05/31/php-proxy-script-for-cross-domain-requests/#comments</comments>
		<pubDate>Thu, 31 May 2007 11:12:58 +0000</pubDate>
		<dc:creator>Abdul Qabiz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[crossdomain]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.abdulqabiz.com/wordpress/?p=310</guid>
		<description><![CDATA[I wrote this php-proxy-script and have been using for different purpose (loading cross-domain data like text, xml, swf, image, etc. or for YouTube REST API  in flash, flex applications). Often people keep asking about proxy-scripts in forums, now they can download the code and use Download the proxy.php.txt Usage:- http://yourserver.com/proxy.php?url=&#60;url_encoded_desitnation_url&#62;[&#038;mimeType=&#60;mimeType&#62;] Examples:- To load XML/Text: http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/blog/index.xml To load [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2007%2F05%2F31%2Fphp-proxy-script-for-cross-domain-requests%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.abdulqabiz.com%2Fblog%2Farchives%2F2007%2F05%2F31%2Fphp-proxy-script-for-cross-domain-requests%2F&amp;source=abdulqabiz&amp;style=compact&amp;service=bit.ly&amp;service_api=R_580aa1ef8d0667776dc27125956b7a16&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I wrote this <a href="http://www.abdulqabiz.com/files/proxy.php.txt">php-proxy-script</a> and have been using for different purpose (loading cross-domain data like text, xml, swf, image, etc. or for YouTube REST API  in flash, flex applications).</p>
<p>Often people keep asking about proxy-scripts in forums, now they can download the code and use <img src='http://www.abdulqabiz.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.abdulqabiz.com/files/proxy.php.txt">Download the proxy.php.txt</a></p>
<h6>Usage:-</h6>
<p>http://yourserver.com/proxy.php?url=&lt;url_encoded_desitnation_url&gt;[&#038;mimeType=&lt;mimeType&gt;]</p>
<h6>Examples:-</h6>
<p>To load XML/Text:</p>
<p>http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/blog/index.xml</p>
<p>To load a SWF (binary-data):</p>
<p>http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/files/some.swf&#038;mimeType=application/x-shockwave-flash</p>
<p>Technorati tags: <a rel="tag" href="http://technorati.com/tags/proxy">proxy</a>, <a rel="tag" href="http://technorati.com/tags/php">php</a>, <a rel="tag" href="http://technorati.com/tags/crossdomain">crossdomain</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.abdulqabiz.com/blog/archives/2007/05/31/php-proxy-script-for-cross-domain-requests/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
	</channel>
</rss>

