<?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>Binary Tides &#187; Uncategorized</title>
	<atom:link href="http://www.binarytides.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.binarytides.com/blog</link>
	<description>Socket Programming , Game Programming , PHP , Mysql , Ubuntu etc.</description>
	<lastBuildDate>Thu, 02 Feb 2012 09:31:28 +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>Web Based vs Desktop Based Softwares</title>
		<link>http://www.binarytides.com/blog/web-based-vs-desktop-based-softwares/</link>
		<comments>http://www.binarytides.com/blog/web-based-vs-desktop-based-softwares/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 08:33:41 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=320</guid>
		<description><![CDATA[A Web Based application has several significant advantages over a desktop/installable application - 1. Multi-terminal access. 2. Auto-Backups, so your data is always backed up and safe. With desktop/installable softwares you will have to manage your data, backup and make sure everything is safe which is hard work and time consuming. 3. Access from anywhere, no need to install. With a desktop software, your access point is &#8220;one&#8221; but with web based, you can access from anywhere and everywhere. 4. [...]]]></description>
			<content:encoded><![CDATA[<p>A Web Based application has several significant advantages over a desktop/installable application -</p>
<p>1. Multi-terminal access.<br />
2. Auto-Backups, so your data is always backed up and safe. With desktop/installable softwares you will have to manage your data, backup and make sure everything is safe which is hard work and time consuming.<br />
3. Access from anywhere, no need to install. With a desktop software, your access point is &#8220;one&#8221; but with web based, you can access from anywhere and everywhere.<br />
4. You will need to produce and distribute physical or digital copies of the software to each individual machine in order to run the software. So, if there is an update or a patch, you now need to update or patch &#8220;each&#8221; individual machines.<br />
5. There are some other benefits like relief from platform dependance issues, social networking, marketing and integrations, the software<br />
cannot be pirated, it can scale more with cloud based storage and architectures provided by companies like amazon and rackspace. There<br />
wont be virus or malware issues and ofcourse its easier to make your web apps mobile ready while it would be quite difficult to adapt your<br />
desktop based applications on your mobile.</p>
<p>Let us know about your thoughts in the comments :)</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=320&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/web-based-vs-desktop-based-softwares/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make a low frequency oscilloscope from PC</title>
		<link>http://www.binarytides.com/blog/make-a-low-frequency-oscilloscope-from-pc/</link>
		<comments>http://www.binarytides.com/blog/make-a-low-frequency-oscilloscope-from-pc/#comments</comments>
		<pubDate>Sat, 28 May 2011 05:46:20 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=293</guid>
		<description><![CDATA[An oscilloscope is an instrument that can be used to analyse waveforms or output from circuits. A cheap oscilloscope can be made using a PC and mic. However it is limited to low frequencies at around 25Khz (the audible range). Things needed : 1. A PC with a sound card 2. A mic wire (TRS plug) 3. A sound application &#8211; Audacity Simple plug the mic into the mic socket of the sound card. Remove [...]]]></description>
			<content:encoded><![CDATA[<p>An oscilloscope is an instrument that can be used to analyse waveforms or output from circuits. </p>
<p>A cheap oscilloscope can be made using a PC and mic. However it is limited to low frequencies at around 25Khz (the audible range).</p>
<p>Things needed :</p>
<p>1. A PC with a sound card<br />
2. A mic wire (TRS plug)<br />
3. A sound application &#8211; Audacity</p>
<p>Simple plug the mic into the mic socket of the sound card. Remove the mic from the wire and open out the inner wires. You would get 2 thin wires in it. If your circuit is on a breadboard, then put one thin wire into the Vout or output voltage and other into ground.<br />
Start the application Audacity. Recording should be done from &#8220;Line In&#8221;.</p>
<p>Start recording. You should get the output waveform of the circuit recorded into audacity. You can magnify the waveform in audacity to analyse it.</p>
<p>Note :</p>
<p>1. The supply voltage should be less than 900mV or around 775 Vrms. To reduce the voltage of the circuit output , use a voltage divider made using 2 resistances. High voltage should not be fed into the sound card.</p>
<p>2. This oscilloscope can pick frequencies in the audible range. Starting from 10-20 Hz and upto 250Khz. Anything lower or higher than that would not be picked up by the sound card.</p>
<p>3. Before feeding the circuit output into this oscilloscope , first verify that it is working. This oscilloscope should pick up noise signals when nothing is fed into it. You should see Audacity recording noise signal. And when you hold the wire in your hands , it should pick up a lot of noise signals which would look like square waves. If the wire is not picking any signals and showing a straight line in audacity then probably it needs to be fixed before using with any circuit.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=293&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/make-a-low-frequency-oscilloscope-from-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile phone radiation</title>
		<link>http://www.binarytides.com/blog/mobile-phone-radiation/</link>
		<comments>http://www.binarytides.com/blog/mobile-phone-radiation/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 05:58:19 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=270</guid>
		<description><![CDATA[Mobile phone radiation is a health hazard. With the increasing use of mobile phones and installation of Mobile phone towers its becoming a bigger health hazard. Phones with more features like Wi-Fi , Bluetooth , GPS and 3G generally have higher levels of radiation. Mobile phone radiation is measured using SAR value. It is Specific Absorption Rate More SAR information This page http://www.sarshield.com/english/radiationchart.htm gives the SAR rating for some Indian brands like Videocon , Micromax [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile phone radiation is a health hazard. With the increasing use of mobile phones and installation of Mobile phone towers its becoming a bigger health hazard. Phones with more features like Wi-Fi , Bluetooth , GPS and 3G generally have higher levels of radiation.</p>
<p>Mobile phone radiation is measured using <a target="_blank" href="http://www.sarvalues.com/what-is-sar.html" >SAR</a> value. It is Specific Absorption Rate<br />
More <a target="_blank" href="http://www.gsmarena.com/glossary.php3?term=sar" >SAR information</a></p>
<p>This page <a target="_blank" href="http://www.sarshield.com/english/radiationchart.htm" >http://www.sarshield.com/english/radiationchart.htm</a><br />
gives the SAR rating for some Indian brands like Videocon , Micromax , Lava , Karbonn etc.</p>
<p>SAR values of various mobile phones :</p>
<p>1. <a target="_blank" href="http://www.ewg.org/cellphoneradiation/Get-a-Safer-Phone?allphones=" >http://www.ewg.org/cellphoneradiation/Get-a-Safer-Phone?allphones=</a></p>
<p>2. <a target="_blank" href="http://www.mobile-phones-uk.org.uk/sar.htm" >http://www.mobile-phones-uk.org.uk/sar.htm</a></p>
<p>3. Nokia provides SAR values here <a target="_blank" href="http://sar.nokia.com/sar/index.jsp" >http://sar.nokia.com/sar/index.jsp</a></p>
<p>Sony Ericsson also provides lot of SAR information here :<br />
<a target="_blank" href="http://www.sonyericsson.com/cws/support/phones/detailed/sarinformation/" >http://www.sonyericsson.com/cws/support/phones/detailed/sarinformation/</a></p>
<p>For Samsung :<br />
<a target="_blank" href="http://www.samsungmobile.com/sar/sar_main.jsp" >http://www.samsungmobile.com/sar/sar_main.jsp</a></p>
<p>4. <a target="_blank" href="http://www.mobilemag.com/2010/03/19/the-20-most-hazardous-cellphones-on-the-market/" >http://www.mobilemag.com/2010/03/19/the-20-most-hazardous-cellphones-on-the-market/</a></p>
<p>5. <a target="_blank" href="http://www.ewg.org/cellphoneradiation/Get-a-Safer-Phone?phone_function=PDA" >http://www.ewg.org/cellphoneradiation/Get-a-Safer-Phone?phone_function=PDA</a></p>
<p>6. <a target="_blank" href="http://www.ewg.org/cellphoneradiation/Get-a-Safer-Phone" >http://www.ewg.org/cellphoneradiation/Get-a-Safer-Phone</a><br />
7. <a target="_blank" href="http://www.ewg.org/cellphoneradiation/newecellphonesin2010" >http://www.ewg.org/cellphoneradiation/newecellphonesin2010</a><br />
8. <a target="_blank" href="http://sarvalues.wordpress.com/" >http://sarvalues.wordpress.com/</a><br />
9. <a target="_blank" href="http://sarvalue.blogspot.com/" >http://sarvalue.blogspot.com/</a></p>
<p>Other international brands like Motorola , Blackberry etc are discussed in this article :<br />
<a target="_blank" href="http://blogs.techrepublic.com.com/hiner/?p=2888" >http://blogs.techrepublic.com.com/hiner/?p=2888</a></p>
<p>The SAR rating should be as low as possible. SAFE range is below 1.0. Anything above that would give problems.<br />
1.5+ is very high and should not be used.</p>
<p>0.5 or below is safe range , still best policy is to keep mobile away from body as much as possible.</p>
<p>Other links explaining SAR :</p>
<p><a target="_blank" href="http://articles.mercola.com/sites/articles/archive/2009/09/03/Brain-Damage-From-Mobile-Phone-Radiation.aspx" >http://articles.mercola.com/sites/articles/archive/2009/09/03/Brain-Damage-From-Mobile-Phone-Radiation.aspx</a></p>
<p><a target="_blank" href="http://articles.mercola.com/sites/articles/archive/2009/11/05/Top-Safe-Cell-Phones-That-Arent-Safe.aspx" >http://articles.mercola.com/sites/articles/archive/2009/11/05/Top-Safe-Cell-Phones-That-Arent-Safe.aspx</a></p>
<p>In countries like USA , the SAR rating is printed on the mobile phone cover and its illegal if its not there. However in India no such law being there , companies and bring out any SAR rating in market and consumers not being aware are purchasing them. There is a need for wider public awareness in regard to mobile phone radiation.</p>
<p>Best things to keep in mind before buying a mobile handset :</p>
<p>1. Check SAR rating of the particular model/make and also the SAR ratings of other models by a particular brand to get an idea about the average SAR.</p>
<p>2. Mobiles with more wireless features like Wi-fi , bluetooth , GPS , 3G are likely to have higher SAR rating. Avoid such features unless absolutely necessary. Look out for specific models which have the features yet with a smaller SAR value.</p>
<p>3. Do use hands free whenever possible to keep the mobile away from yourself.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=270&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/mobile-phone-radiation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Url encoded forward slash in MVC or codeignitor app urls</title>
		<link>http://www.binarytides.com/blog/url-encoded-forward-slash-mvc-or-codeignitor-app-urls/</link>
		<comments>http://www.binarytides.com/blog/url-encoded-forward-slash-mvc-or-codeignitor-app-urls/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 05:25:52 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=245</guid>
		<description><![CDATA[When using PATH_INFO , the urls of codeignitor apps or your custom MVC looks like this Now if the parameters contain a forward slash then you would urlencode it as : But opening that kind of URL would give an error : Page Not Found This happens if AllowEncodedSlashes directive of Apache is not turned on. More Here. This directive should be turned on to allow those sort of Urls. And for codeignitor $config['permitted_uri_chars'] should [...]]]></description>
			<content:encoded><![CDATA[<p>When using PATH_INFO , the urls of codeignitor apps or your custom MVC looks like this</p>
<pre class="brush: cpp; title: Code; notranslate">
index.php/controlller/method/param1/param2
or
/controlller/method/param1/param2
</pre>
<p>Now if the parameters contain a forward slash then you would urlencode it as :</p>
<pre class="brush: cpp; title: Code; notranslate">
index.php/controlller/method/par%2Fam1/param2
</pre>
<p>But opening that kind of URL would give an error : Page Not Found</p>
<p>This happens if AllowEncodedSlashes directive of Apache is not turned on. <a target="_blank" href="http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes" >More Here</a>. This directive should be turned on to allow those  sort of Urls. And for codeignitor $config['permitted_uri_chars'] should also be checked to allow forward slash in uri characters.</p>
<p>Reference :<br />
1. <a target="_blank" href="http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes" >Apache Documentation</a></p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=245&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/url-encoded-forward-slash-mvc-or-codeignitor-app-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moneybookers as a Paypal alternative for freelancers</title>
		<link>http://www.binarytides.com/blog/moneybookers-as-a-paypal-alternative-for-freelancers/</link>
		<comments>http://www.binarytides.com/blog/moneybookers-as-a-paypal-alternative-for-freelancers/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 06:39:37 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[moneybookers]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[paypal]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=228</guid>
		<description><![CDATA[Recently Paypal has faced some issues with RBI which has resulted in withdrawals being reversed etc. Moneybookers is a service similar to Paypal. Moneybookers is available as a withdrawal option in Scriptlance , Getafreelancer , Odesk. Moneybookers charges 1.9% + 0.29 EU for receiving commercial payments compared to ~ 4% in paypal. In Moneybookers the payer is also charged. Moneybookers account needs verification before it can be used fully. The first simple option is to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently Paypal has faced some issues with RBI which has resulted in withdrawals being reversed etc. Moneybookers is a service similar to Paypal. Moneybookers is available as a withdrawal option in Scriptlance , Getafreelancer , Odesk.</p>
<p>Moneybookers charges 1.9% + 0.29 EU for receiving commercial payments compared to ~ 4% in paypal. In Moneybookers the payer is also charged. Moneybookers account needs verification before it can be used fully.</p>
<p>The first simple option is to verify address by requesting a letter. In there moneybookers would send a letter with a verification code to the account holder&#8217;s address. Upon receiving the letter the account holder must type in the code back into moneybookers. By doing this the address gets verified and limits are lifted so some extent.</p>
<p>Now if transactions exceed euro 1000 in a 90 day period or something similar then moneybookers requests further verification of bank account or credit card. To verify bank account a withdrawal of &lt; $15 should be made from moneybookers to bank account. In this transaction moneybookers would send a reference number which is to be used to verify the bank account.<br />
The $15 withdrawal method of verifying bank account doesnt seem to work for all.</p>
<p>The best way to verify a bank account is :<br />
1. Contact moneybookers and send them a screenshot / scanned copy of you latest bank statement. They may verify it within 2 hours!!<br />
2. Or send them a scanned copy of a FIRC certificate that you may have received while make smaller withdrawal.</p>
<p>Either way would work and bank account would be verified quickly. This would lift the limits further and enable good volume of transactions.</p>
<p>Another good aspect of moneybookers is that it can send dollars directly to your bank account if you have dollar as your currency in moneybookers. USE dollar as your currency in moneybookers as you would save more. If you use inr as your currency in moneybookers then when you receive a dollar payment it would be converted into rupees at higher currency conversion charges. Instead if you receive dollars directly in your bank accounts then banks would charge less for the currency conversion , giving very good forex rates. Hence KEEP you currency DOLLAR in moneybookers. Paypal doesnt have the option to withdraw dollars. It forcefully converts dollars to inr at very low forex rates.</p>
<p>Moneybookers also charges 2.29$ per withdrawal. So making large withdrawals with moneybookers can save money as compared to Paypal. Also there is no issue of chargebacks with moneybookers. In paypal if someone files a chargeback , then no matter what you do , you account will be debited. Sellers have no protection in Paypal. Paypal will happily pay back the payer and seller will simply stand and stare. No such problems exist with moneybookers.</p>
<p>When receiving dollars in Indian banks there are varying charges. For e.g. HDFC bank charges Rs. 90 + s.t. when receiving dollars whereas ICICIBank charges Rs. 600 + s.t.</p>
<p>So for e.g. Scriptlance > Moneybookers > HDFCBank is really a optimum , fast and low fee  solution for freelancers.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=228&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/moneybookers-as-a-paypal-alternative-for-freelancers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PATH_INFO, ORIG_PATH_INFO, APACHE and PHP</title>
		<link>http://www.binarytides.com/blog/path_info-orig_path_info-apache-and-php/</link>
		<comments>http://www.binarytides.com/blog/path_info-orig_path_info-apache-and-php/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 06:52:01 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=199</guid>
		<description><![CDATA[A little while back I was trying to make a router for my application which I had grouped into classes. So a url could be like this : www.site.com/index.php/class_name/method?id=15 or www.site.com/index.php/controller/action?id=15 in the MVC style or localhost/project/index.php/class_name/method?id=15 PHP MVC frameworks like codeigniter use urls like that. Apache makes available a variable called PATH_INFO to PHP which stores the portion of the url between script and query string that is /class_name/method On Localhost index.php print_r($_SERVER) shows [...]]]></description>
			<content:encoded><![CDATA[<p>A little while back I was trying to make a router for my application which I had grouped into classes. So a url could be like this :</p>
<p>www.site.com/index.php/class_name/method?id=15<br />
or<br />
www.site.com/index.php/controller/action?id=15 in the MVC style<br />
or<br />
localhost/project/index.php/class_name/method?id=15 </p>
<p>PHP MVC frameworks like codeigniter use urls like that. </p>
<p>Apache makes available a variable called PATH_INFO to PHP which stores<br />
the portion of the url between script and query string that is /class_name/method</p>
<p><b>On Localhost</b></p>
<p>index.php<br />
    print_r($_SERVER) </p>
<p>shows :</p>
<pre class="brush: cpp; title: Code; notranslate">
     [SERVER_SIGNATURE] =&gt; &lt;address&gt;Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch Server at localhost Port 80&lt;/address&gt;
     [SERVER_SOFTWARE] =&gt; Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch
    [SERVER_NAME] =&gt; localhost
    [SERVER_ADDR] =&gt; 127.0.0.1
    [SERVER_PORT] =&gt; 80
    [REMOTE_ADDR] =&gt; 127.0.0.1
    [DOCUMENT_ROOT] =&gt; /var/www/
    [SCRIPT_FILENAME] =&gt; /var/www/project/index.php
    [REMOTE_PORT] =&gt; 39733
    [REQUEST_METHOD] =&gt; GET
    [QUERY_STRING] =&gt; id=15
    [REQUEST_URI] =&gt; /project/index.php/class_name/method?id=15
    [SCRIPT_NAME] =&gt; /project/index.php
    [PATH_INFO] =&gt; /class_name/method
    [PATH_TRANSLATED] =&gt; /var/www/class_name/method
    [PHP_SELF] =&gt; /project/index.php/class_name/method
</pre>
<p>Next using .htaccess to redirect localhost/project/class_name/method to localhost/project/index.php/class_name/method and again viewing the $_SERVER variable with url : localhost/project/class_name/method</p>
<p>shows :</p>
<pre class="brush: cpp; title: Code; notranslate">
     [SERVER_SIGNATURE] =&gt; &lt;address&gt;Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch Server at localhost Port 80&lt;/address&gt;
     [SERVER_SOFTWARE] =&gt; Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch
    [SERVER_NAME] =&gt; localhost
    [SERVER_ADDR] =&gt; 127.0.0.1
    [SERVER_PORT] =&gt; 80
    [REMOTE_ADDR] =&gt; 127.0.0.1
    [DOCUMENT_ROOT] =&gt; /var/www/
    [SCRIPT_FILENAME] =&gt; /var/www/project/index.php
    [REMOTE_PORT] =&gt; 39734
    [REDIRECT_QUERY_STRING] =&gt; id=15
    [REDIRECT_URL] =&gt; /project/class_name/method
    [REQUEST_METHOD] =&gt; GET
    [QUERY_STRING] =&gt; id=15
    [REQUEST_URI] =&gt; /project/class_name/method?id=15
    [SCRIPT_NAME] =&gt; /project/index.php
    [PATH_INFO] =&gt; /class_name/method
    [PATH_TRANSLATED] =&gt; /var/www/class_name/method
    [PHP_SELF] =&gt; /project/index.php/class_name/method
</pre>
<p>In both the above PATH_INFO is identical results , REQUEST_URI is different.</p>
<p><b>On Webserver</b><br />
Now when the same code was put up on the webserver ::::</p>
<p>without .htaccess redirect , url like domain.com/project/index.php/class_name/method?id=15</p>
<p>shows :</p>
<pre class="brush: cpp; title: Code; notranslate">
    [SERVER_SOFTWARE] =&gt; Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
    [PATH_INFO] =&gt; /class_name/method
    [PATH_TRANSLATED] =&gt; /home/celcscom/public_html/project/index.php
    [QUERY_STRING] =&gt; id=15
    [REDIRECT_STATUS] =&gt; 200
    [REMOTE_ADDR] =&gt; 59.93.245.243
    [REMOTE_PORT] =&gt; 60157
    [REQUEST_METHOD] =&gt; GET
    [REQUEST_URI] =&gt; /project/index.php/class_name/method?id=15
    [SCRIPT_FILENAME] =&gt; /home/celcscom/public_html/project/index.php
    [SCRIPT_NAME] =&gt; /project/index.php
    [SERVER_ADDR] =&gt; 216.67.245.98
    [SERVER_PORT] =&gt; 80
    [PHP_SELF] =&gt; /project/index.php/class_name/method
</pre>
<p>PATH_INFO is same as localhost.</p>
<p>The difference came when using .htaccess redirect , the output</p>
<p>shows :</p>
<pre class="brush: cpp; title: Code; notranslate">
    [SERVER_SOFTWARE] =&gt; Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
    [QUERY_STRING] =&gt; id=15
    [REDIRECT_QUERY_STRING] =&gt; id=15
    [REDIRECT_STATUS] =&gt; 200
    [REDIRECT_UNIQUE_ID] =&gt; SsI359hD9WIAAHMWpgEAAAAD
    [REDIRECT_URL] =&gt; /project/class_name/method
    [REQUEST_METHOD] =&gt; GET
    [REQUEST_URI] =&gt; /project/class_name/method?id=15
    [SCRIPT_FILENAME] =&gt; /home/celcscom/public_html/project/index.php
    [SCRIPT_NAME] =&gt; /project/index.php
    [SERVER_ADDR] =&gt; 216.67.245.98
    [ORIG_PATH_INFO] =&gt; /class_name/method
    [ORIG_PATH_TRANSLATED] =&gt; /home/celcscom/public_html/project/index.php
    [PHP_SELF] =&gt; /project/index.php
</pre>
<p>PATH_INFO is missing but ORIG_PATH_INFO is there with the information PATH_INFO was supposed to have. </p>
<p>So the php code had to be changed to check for $_SERVER['ORIG_PATH_INFO'] when $_SERVER['PATH_INFO'] is absent</p>
<p>PATH_INFO relies on the Apache <a target="_blank" href="http://httpd.apache.org/docs/2.0/mod/core.html#acceptpathinfo" >AcceptPathInfo Directive</a></p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=199&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/path_info-orig_path_info-apache-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Apache mod_rewrite on Windows</title>
		<link>http://www.binarytides.com/blog/enable-apache-mod_rewrite-on-windows/</link>
		<comments>http://www.binarytides.com/blog/enable-apache-mod_rewrite-on-windows/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 10:34:56 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=207</guid>
		<description><![CDATA[In httpd.conf file the following line should be uncommented : LoadModule rewrite_module modules/mod_rewrite.so by removing the # sign before it. Then comes a section which looks like this : The line : AllowOverride None should be made : AllowOverride All Restart Apache. Create a .htaccess file somewhere in htdocs and write some garbage text in it like akjsnajknda and save. Create a index.php along with the .htaccess file. Now open the index.php file in browser [...]]]></description>
			<content:encoded><![CDATA[<p>In httpd.conf file the following line should be uncommented :</p>
<p>LoadModule rewrite_module modules/mod_rewrite.so</p>
<p>by removing the # sign before it.</p>
<p>Then comes a section which looks like this :</p>
<pre class="brush: cpp; title: Code; notranslate">
&lt;Directory &quot;C:/Apache2.2/htdocs&quot;&gt;
    #
    # Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

&lt;/Directory&gt;
</pre>
<p>The line :<br />
AllowOverride None</p>
<p>should be made :<br />
AllowOverride All</p>
<p>Restart Apache. Create a .htaccess file somewhere in htdocs and write some garbage text in it like akjsnajknda and save. Create a index.php along with the .htaccess file. Now open the index.php file in browser and you should get an Internal Server Error. This indicates that .htaccess file is wrong , which means that mod_rewrite is now active.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=207&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/enable-apache-mod_rewrite-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List foreign keys in mysql</title>
		<link>http://www.binarytides.com/blog/list-foreign-keys-in-mysql/</link>
		<comments>http://www.binarytides.com/blog/list-foreign-keys-in-mysql/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 16:00:46 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=195</guid>
		<description><![CDATA[One interesting way of listing foreign keys is like this : which is found here and gives an output like this : Another way would be to : which displays the sql query to create the table and has the foreign key constraints too. Apart from this phpmyadmin too shows the foreign keys on the top of a table structure. References : 1. Mysql Docs]]></description>
			<content:encoded><![CDATA[<p>One interesting way of listing foreign keys is like this :</p>
<pre class="brush: sql; title: Code; notranslate">
select
    concat(table_name, '.', column_name) as 'foreign key',
    concat(referenced_table_name, '.', referenced_column_name) as 'references'
from
    information_schema.key_column_usage
where
    referenced_table_name is not null;
</pre>
<p>which is found <a target="_blank" href="http://www.conandalton.net/2008/09/list-foreign-key-constraints-in-oracle.html" >here</a></p>
<p>and gives an output like this :</p>
<pre class="brush: cpp; title: Code; notranslate">
+-----------------------+-------------+
| foreign key           | references  |
+-----------------------+-------------+
| orders.client_id      | clients.id  |
| line_items.order_id   | orders.id   |
| line_items.product_id | products.id |
+-----------------------+-------------+
</pre>
<p>Another way would be to :</p>
<pre class="brush: sql; title: Code; notranslate">
SHOW CREATE TABLE tablename;
</pre>
<p>which displays the sql query to create the table and has the foreign key constraints too.</p>
<p>Apart from this phpmyadmin too shows the foreign keys on the top of a table structure.</p>
<p>References :<br />
1. <a target="_blank" href="http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html" >Mysql Docs</a></p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=195&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/list-foreign-keys-in-mysql/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mysql View DEFINER and SQL Security</title>
		<link>http://www.binarytides.com/blog/mysql-view-definer-and-sql-security/</link>
		<comments>http://www.binarytides.com/blog/mysql-view-definer-and-sql-security/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 11:08:58 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=187</guid>
		<description><![CDATA[A little back I tried to backup a database from my webhost and restored it on my localhost mysql. It had a few views. On accessing the views in phpmyadmin mysql gave the error : #1449 &#8211; There is no &#8216;projects&#8217;@'localhost&#8217; registered #1449 &#8211; There is no &#8216;projects&#8217;@'localhost&#8217; registered So I opened the dump file and found that the error was being caused by a line which looks like this : /*!50013 DEFINER=`projects`@`localhost` SQL SECURITY [...]]]></description>
			<content:encoded><![CDATA[<p>A little back I tried to backup a database from my webhost and restored it on my localhost mysql. It had a few views. On accessing the views in phpmyadmin mysql gave the error :</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#1449 &#8211; There is no &#8216;projects&#8217;@'localhost&#8217; registered</div>
<p>#1449 &#8211; There is no &#8216;projects&#8217;@'localhost&#8217; registered</p>
<p>So I opened the dump file and found that the error was being caused by a line which looks like this :</p>
<p>/*!50013 DEFINER=`projects`@`localhost` SQL SECURITY DEFINER */</p>
<p>This line appeared in every view definition. So the simple reason was that projects@localhost was the user which had created the view (on the server) and when importing the database on local system there was no user named &#8216;projects&#8217; in mysql.</p>
<p>There appeared to be no way by which this line could be prevented from coming up in the dump file. So a possible solution was to erase it from the dump file.</p>
<p>On ubuntu like this :</p>
<p>sed &#8216;/^\/\*\!50013/d&#8217; backup.sql &gt; backup_without_50013.sql</p>
<p>in PHP I tried this :</p>
<pre class="brush: php; title: Code; notranslate">
$contents = file_get_contents('backups/backup.sql');
$contents = preg_replace('@\/\*\!50013 DEFINER.*?\*\/@' , '' , $contents);
file_put_contents('backups/backup.sql' , $contents);
</pre>
<p>The above solutions worked.<br />
But I was still looking for a technique where I didnt have to modify the dump file.</p>
<p>The solution is to create a view with sql security invoker like this :</p>
<p>CREATE SQL SECURITY invoker VIEW my_view as select &#8230;&#8230;.</p>
<p>The above statement allows this view to be viewed by any user who invokes the view.By default the SQL SECURITY is DEFINER which means the definer user can only view it.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=187&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/mysql-view-definer-and-sql-security/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Email Hacking Facts and Fictions</title>
		<link>http://www.binarytides.com/blog/email-hacking-facts-and-fictions/</link>
		<comments>http://www.binarytides.com/blog/email-hacking-facts-and-fictions/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 15:29:39 +0000</pubDate>
		<dc:creator>Binary Tides</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=31</guid>
		<description><![CDATA[Lots of newbies keep asking or search for techniques to hack someones email password like yahoo gmail msn etc. First of all it should be noted that getting someone&#8217;s password out of a server is something impossible for the very simple reason that in most cases the password is stored no-where. Newbies think and make attempts to get the some one&#8217;s password from the target server. But yes this is not possible. Passwords are not [...]]]></description>
			<content:encoded><![CDATA[<p>Lots of newbies keep asking or search for techniques to hack someones email password like yahoo gmail msn etc.</p>
<p>First of all it should be noted that getting someone&#8217;s password out of a server is something impossible for the very simple reason that in most cases the password is stored no-where. Newbies think and make attempts to get the some one&#8217;s password from the target server. But yes this is not possible. Passwords are not stored directly, but as hashes (if you are a web developer then you must be knowing this). Hashing is basically a one way algorithm to turn a string of any size into a fixed sized string. For more on hashing get to wikipedia. Hashes cant be reverted to get back the original string. Now when a user logs into a system, he provides his username and password. Now the password is hashed again and compared with the hash that was stored during registration. If both match then access is granted.</p>
<p>But yes there are techniques to get some one&#8217;s password or rather &#8220;steal&#8221; them from the original user. Thats the only way to get the password.</p>
<p>Some common techniques are :</p>
<p>1. Phishing : Now &#8220;phishing&#8221; it basically &#8220;tricking&#8221; , to trick a user into providing his login details to you. The most popular way to do this is by creating a fake login page which looks like the login page of the original system and make the user login through this fake login page. When the user attempts this then the login details he provides go to the hacker rather than the actual system. Phishing issue arise in a lot of situations e.g. email logins , bank logins etc.</p>
<p>2. Social Engineering : This technique involves collecting some information about the user which can provide access to his system. The best possible extent of doing this would be to get the password itself from the user but in most cases this is not possible. Most email systems for example provide a password recovery mechanism which involves answering certain questions like Your birthdate , phone number , pet name etc. Now a hacker clever at social engineering would talk with the user directly and during the conversation would try to make the user speak out the information that is useful to get access to the user&#8217;s mail. For e.g. a hacker could ask the birthdate some where in the conversation and if the user tells it, then the user can use it. Social engineering aims at collecting as much information as possible from the user which can be useful to get the login or access to his mailbox.</p>
<p>3. Trojans/Keyloggers/Spyware : This is a software based technique. It involves installing a piece of software on the victim&#8217;s computer so that the activity on the target computer can be recorded and read by the hacker. For e.g. logging all keyboard activity and then searching them for usernames and passwords.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=31&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/email-hacking-facts-and-fictions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

