<?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>Thu, 29 Jul 2010 14:53:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='www.abdulqabiz.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<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 [...]]]></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" 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>1</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 would [...]]]></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" 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;[&#38;mimeType=&#60;mimeType&#62;]
Examples:-
To load XML/Text:
http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/blog/index.xml
To load a SWF (binary-data):
http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/files/some.swf&#38;mimeType=application/x-shockwave-flash
Technorati tags: proxy, php, [...]]]></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" 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;[&amp;mimeType=&lt;mimeType&gt;]</p>
<h6>Examples:-</h6>
<p>To load XML/Text:<br />
http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/blog/index.xml</p>
<p>To load a SWF (binary-data):<br />
http://yourserver.com/proxy.php?url=http%3A//abdulqabiz.com/files/some.swf&amp;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>43</slash:comments>
		</item>
	</channel>
</rss>
