<?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>TechnoBlogy &#187; Tools/Tech</title>
	<atom:link href="http://technoblogy.net/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://technoblogy.net</link>
	<description>Technology with a Big difference</description>
	<lastBuildDate>Mon, 05 Dec 2011 17:29:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Team Viewer now available for Android</title>
		<link>http://technoblogy.net/team-viewer-now-available-for-android/</link>
		<comments>http://technoblogy.net/team-viewer-now-available-for-android/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 09:08:48 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Tools/Tech]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[file sharing]]></category>
		<category><![CDATA[remote access]]></category>
		<category><![CDATA[TeamViewer]]></category>

		<guid isPermaLink="false">http://technoblogy.net/?p=652</guid>
		<description><![CDATA[Team Viewer is an excellent screen sharing and file transfer application that can be used to facilitate business collaborations and remote desktops sharing.

]]></description>
			<content:encoded><![CDATA[<p>Team Viewer is an excellent screen sharing and file transfer application that can be used to facilitate business collaborations and remote desktops sharing.</p>
<p>Team Viewer has launched a new version “Team Viewer 6” in which they have also included it Android application as well. It was great tool for accessing computers remotely, and now it mobile variations gives more quick access. Previously it  has been developed for IPhone and IPads, and now its Android beta version is in market.</p>
<p><a href="http://technoblogy.net/wp-content/uploads/2010/11/teamviewer.jpg"><img class="alignnone size-medium wp-image-653" title="teamviewer" src="http://technoblogy.net/wp-content/uploads/2010/11/teamviewer-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>Here are some of the features:</p>
<ul>
<li>Support your clients and colleagues spontaneously.</li>
<li>Access your office desktop with all of its documents and installed applications.</li>
<li>Remotely administer unattended computers (e.g. servers).</li>
<p>People get this great tool for free before January 2011.</ul>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/team-viewer-now-available-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traversing DOM using JavaScript</title>
		<link>http://technoblogy.net/traversing-dom-using-javascript-3/</link>
		<comments>http://technoblogy.net/traversing-dom-using-javascript-3/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 07:20:52 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[insertion]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://technoblogy.net/?p=342</guid>
		<description><![CDATA[The HTML DOM defines a standard way for accessing and manipulating HTML documents. The DOM presents an HTML document as a tree-structure expressed as an XML document. DOM is a language independent API, as it can be used in Java, .NET, JavaScript and many more. I will use it with JavaScript to for my sample [...]]]></description>
			<content:encoded><![CDATA[<p>The HTML DOM defines a standard way for accessing and manipulating HTML documents.</p>
<p>The DOM presents an HTML document as a tree-structure expressed as an XML document.</p>
<p>DOM is a language independent API, as it can be used in Java, .NET, JavaScript and many more. I will use it with JavaScript to for my sample code provided below.</p>
<p>When talking about DOM trees , you are really talking about a hierarchy of nodes. These are some objects  Inside XML(XHTML,HTML) document :</p>
<p>document -  is very top level node wich contains all other nodes</p>
<p>element  -  represents the contents of a start tag and end tag</p>
<p>Attr —  Represents an attribute name-value pair</p>
<p>Text — Represents plain text in an XML document contained within start and end tags  or inside of a CData Section</p>
<p>CDataSection — The object representation of &lt;![CDATA[ ]]&gt;. This node type may contain any symbols including quotes.</p>
<p>To manipulate this obects i.e makes changes in XML(XHTML, HTML) we have some properties and methods:</p>
<p>nodeName    -  The name of the node</p>
<p>nodeValue     -  The value of the node</p>
<p>nodeType     -  One of the node type constant values</p>
<p>ownerDocument  – Pointer to the document that this node belongs to</p>
<p>firstChild  -  Pointer to the first node in the childNodes list</p>
<p>lastChild  – Pointer to the last node in the childNodes list</p>
<p>childNodes – A list of all child nodes</p>
<p>previousSibling – Pointer to the previous sibling; null if this is the first sibling</p>
<p>nextSibling   – Pointer to the next sibling; null if this is the last  sibling</p>
<p>hasChildNodes()   – Returns true when childNodes contains one or more nodes</p>
<p>attributes  – Contains Attr objects representing an element’s attributes; only used for Element nodes</p>
<p>appendChild(node) -  Adds node to the end of childNodes</p>
<p>removeChild(node) -  Removes node from childNodes</p>
<p>replaceChild (newnode, oldnode)  –  Replaces oldnode in childNodes with  newnode</p>
<p>insertBefore (newnode, refnode)  — Inserts newnode before refnode in childnodes</p>
<p>Let’s do some example to demonstrate functions and properties mentioned before.</p>
<p>Adding nodes  using DOM:</p>
<p>In idex.html  we have form tag with textarea and submit button inside</p>
<blockquote><p>&lt;body&gt;</p>
<p>&lt;form action=”#”&gt;</p>
<p>&lt;p&gt;</p>
<p>&lt;textarea rows=”5″ cols=”30″&gt;</p>
<p>&lt;/textarea&gt;</p>
<p>&lt;br/&gt;</p>
<p>&lt;input value=”Add Text” /&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;/body&gt;</p></blockquote>
<p>In script.js addNode()  function is triggered on form submit it gets value of textarea, creates text node then paragraph tag and appends all these</p>
<p>as child of body tag.</p>
<blockquote><p>window.onload=initAll;</p>
<p>function initAll()</p>
<p>{</p>
<p>document.getElementById(“form1″).onsubmit=addNode;</p>
<p>}</p>
<p>function addNode()</p>
<p>{</p>
<p>var inText=document.getElementById(“textarea”).value;</p>
<p>var newText=document.createTextNode(inText);</p>
<p>var newGraf=document.createElement(“p”);</p>
<p>newGraf.appendChild(newText);</p>
<p>var docBody=document.getElementsByTagName(“body”)[0];</p>
<p>docBody.appendChild(newGraf);</p>
<p>return false;</p>
<p>}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/traversing-dom-using-javascript-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Debugging Techniques &#8211; Part III</title>
		<link>http://technoblogy.net/php-debugging-techniques-part-iii/</link>
		<comments>http://technoblogy.net/php-debugging-techniques-part-iii/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 05:00:03 +0000</pubDate>
		<dc:creator>aabi</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Debug]]></category>

		<guid isPermaLink="false">http://technoblogy.net/?p=291</guid>
		<description><![CDATA[Use an IDE and Debugger Most developers use some Integrated Development Environment (IDE) for the majority of their development, and I highly recommend that you do the same. Many PHP developer use Zend Studio and you only have to look at the feature list to see why they find it completely indispensible, especially for debugging. If you have [...]]]></description>
			<content:encoded><![CDATA[<h2>Use an IDE and Debugger</h2>
<p>Most developers use some Integrated Development Environment (IDE) for the majority of their development, and I highly recommend that you do the same. Many PHP developer use Zend Studio and you only have to look at the feature list to see why they find it completely indispensible, especially for debugging. If you have not used an IDE before I recommend you have a look at one of the applications listed at the end of this section.</p>
<p>Also a remote debugger (e.g. ZendDebugger) is used, which ties into the IDE. The remote debugger is a PHP module that allows you to debug code on your server using the IDE on your local machine. You can set breakpoints, inspect variables, examine stack traces, profile code and all the other benefits you would expect from a debugger.</p>
<p>I use Netbeans IDE for my PHP development. Here is an article on <a href="http://netbeans.org/kb/docs/php/debugging.html" target="_blank">Debugging PHP Source Code in the NetBeans IDE</a></p>
<p>See also:</p>
<ul>
<li><a href="http://go2.wordpress.com/?id=725X1342&amp;site=porteightyeight.wordpress.com&amp;url=http%3A%2F%2Fwww.zend.com%2Fen%2Fproducts%2Fstudio%2Ffeatures" target="_blank">Zend Studio</a></li>
<li><a href="http://downloads.zend.com/pdt/server-debugger/" target="_blank">ZendDebugger</a> (<a href="http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger" target="_blank">installing ZendDebugger for PDT</a>)</li>
<li><a href="http://go2.wordpress.com/?id=725X1342&amp;site=porteightyeight.wordpress.com&amp;url=http%3A%2F%2Fxdebug.org%2F" target="_blank">Xdebug</a> (Alternative to ZendDebugger)</li>
<li><a href="http://www.eclipse.org/pdt/" target="_blank">PHP Development Tools, PDT</a> (eclipse plugin)</li>
<li><a href="http://www.waterproof.fr/products/PHPEdit/" target="_blank">PHP Edit</a></li>
<li><a href="http://www.activestate.com/Products/komodo_ide/index.mhtml" target="_blank">Komodo IDE</a></li>
</ul>
<h2>Unit Testing</h2>
<p>Testing is an essential aspect of developing in any programming language. If you don&#8217;t test your source code then how can you verify it works as expected? Manual testing can only be performed irregularly and usually only in limited ways. The answer to testing source code regularly, and in depth, is to write automated tests which can be frequently executed.</p>
<p><a href="http://en.wikipedia.org/wiki/Unit_test" target="_blank">Unit Testing</a> may not be everyone’s idea of fun, but it can be very effective for developing larger projects. It can give you confidence when you have to make significant changes to the code base, as well as point out problems before your code goes into production.</p>
<p>There are two catches with unit tests, the biggest of which is that you have to actually write the Unit tests themselves. Although this should save time in the long run (or at least lead to a more robust product), it is hard to avoid thinking that you could be spending the time developing functionality.</p>
<p>The second catch is that it often forces you to refactor your code into more test-friendly chunks. This is probably a good thing but it will take more time. The best approach would be to write unit tests from the very start of the project or, for an existing project, you can write a unit test for every bug that is fixed.</p>
<p>If you are using unit tests you should also be aware of the concept of <a href="http://en.wikipedia.org/wiki/Code_coverage" target="_blank">code coverage</a>. This is a metric which shows what percentage of your code is run during the testing process. The higher value for this indicates a more robust set of unit tests. You can calculate your code coverage using a debugger, as was discussed in the previous section.</p>
<p>Unit Testing in PHP can be performed using one of three methods. The two common options are Marcus Baker&#8217;s SimpleTest and Sebastian Bergmann&#8217;s PHPUnit. To add some confusion there&#8217;s also the old reliable: phpt. All three allow you to unit test code, and the two Framework libraries also offer numerous extensions.</p>
<p style="padding-left: 30px;"><strong><span style="text-decoration: underline;">PHPUnit</span></strong><br />
PHPUnit is a Unit Testing Suite. It allows for easy creation of regression tests that can be used to determine whether potions of the code meet various operational parameters.</p>
<p style="padding-left: 30px;">Here is a presentation on <a href="http://www.slideshare.net/DragonBe/introduction-to-unit-testing-with-phpunit-presentation-705447" target="_blank">Introduction to Unit Testing with PHPUnit</a></p>
<p>See also:</p>
<ul>
<li><a href="http://go2.wordpress.com/?id=725X1342&amp;site=porteightyeight.wordpress.com&amp;url=http%3A%2F%2Fxdebug.org%2F" target="_blank">XDebug</a> ( <a href="Introducing xdebug" target="_blank">Introducing XDebug</a> )</li>
<li><a href="http://www.phpunit.de/" target="_blank">PHP Unit</a></li>
<li><a href="http://phpt.info" target="_blank">PHPT</a></li>
</ul>
<h2>Keep Things Simple</h2>
<p>I think this rule probably exists for every profession out there, so it should be no surprise that it applies to software development.<br />
It is good practice to write software using a clear structure and using standard design patterns, but this is only a high level approach to keeping things simple. We also need to keep your individual algorithms as simple as possible as this will make your code easier to understand in six months when it needs fixing, and will also make it easier to fix.</p>
<p>Here are some ways you can achieve this:</p>
<ol>
<li><strong>Keep an eye on functions that are growing:</strong> You may find that you can split the code into several smaller functions.</li>
<li><strong>Functions that are only called in one place may be too specific</strong>: You can either bring the code inline, or generalise using several smaller functions. You can always keep the specific function and just use that to call and aggregate the new, smaller, functions.</li>
<li><strong>Watch out for functions with very long names or lots of arguments: </strong>This can be a sign that the function could be split into several smaller functions, or it could even be replaced with a class.</li>
<li><strong>Use built in functions where possible</strong>: This will help avoid spurious amounts of PHP code and there is a good chance the internal function will be faster as it is written in C (and by the pros!) Some of the most underappreciated internal functions are the array functions.</li>
<li>If you really must have long and complex sections of code, then make sure you add some documentation. You and your fellow developers will be thankful of this when it comes to debugging.</li>
</ol>
<p>Most of these points are about splitting large functions into smaller ones. It is also important to ensure you do not end up with lots of tiny functions, but I feel this is a much more unusual problem.</p>
<h2>Conclusion</h2>
<p>The series of three posts was just to give you an overview on debugging techniques in PHP. Hopefully you will have a basic idea now.</p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/php-debugging-techniques-part-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Debugging Techniques &#8211; Part II</title>
		<link>http://technoblogy.net/php-debugging-techniques-part-ii/</link>
		<comments>http://technoblogy.net/php-debugging-techniques-part-ii/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 04:33:12 +0000</pubDate>
		<dc:creator>aabi</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Debug]]></category>

		<guid isPermaLink="false">http://technoblogy.net/?p=290</guid>
		<description><![CDATA[ 2. Error Logging Despite out best efforts, errors can (and do) occur in production environments. When these hiccups do arise we have to ensure that they are dealt with quickly, otherwise users (or even, gasp, clients) get angry. A logging system can be very useful in tracking down bugs, especially when they happen in a [...]]]></description>
			<content:encoded><![CDATA[<h2> 2. Error Logging</h2>
<p>Despite out best efforts, errors can (and do) occur in production environments. When these hiccups do arise we have to ensure that they are dealt with quickly, otherwise users (or even, gasp, clients) get angry.</p>
<p>A logging system can be very useful in tracking down bugs, especially when they happen in a production environment. Such a system can also be useful in debugging during development but lt is found much easier to use an IDE to debug development environment.</p>
<p>Some types of errors we cannot do anything about (think parse errors) and we just have to ensure that we have a close eye on our error logs so we notice when they occur. Fortunately, it is these types of bugs that are normally caught very quickly during development and testing.</p>
<p>As for all the other errors, we need to make sure that they are caught and dealt with properly. Make sure the user is shown a nice error page (with a suitably cute ‘oops-back-soon’ picture) and then log, log<br />
everything in sight! following are strong recommendations:</p>
<ul>
<li>The stack current trace (see debug_backtrace() and debug_print_backtrace()).</li>
<li>The output of get_defined_vars(). However, this is only useful if you call it at the point the error occurs, not at the point the error is logged. This includes global variables.</li>
<li>Any and all information about the remote user (IP address, user agent, session data)</li>
<li>All global variable data (which includes the contents of $_COOKIES, $_SERVER etc.)</li>
<li>Any other status data which is specific to your application</li>
</ul>
<p>This information will be invaluable when you come to tracking down errors in production code.</p>
<h3 style="padding-left: 30px;"><span style="text-decoration: underline;">PHP&#8217;s Error Logging Facility</span></h3>
<p style="padding-left: 60px;"><strong> # Inside PHP.ini<br />
<span style="color: #000080;">error_log = /home/vhost/logs/php_error_log<br />
display_errors = Off<br />
log_errors_max_len = 0</span></strong></p>
<ul>
<li><strong></strong>Since the errors are being logged there is no need to display them on screen.</li>
<li>Do not limit the error length so the error message is never cutoff.</li>
</ul>
<h3 style="PADDING-LEFT: 30px"><span style="text-decoration: underline;">SysLog</span></h3>
<p style="PADDING-LEFT: 30px">Some errors/bugs are more critical then others and may require immidiate attention. Or you may want to have all your error messages (php, system, etc.) in one place for ease of monitoring.<br />
In these cases instead of using error_log or custom error_handler you may want to use a system logger, syslog.</p>
<p>How you choose to actually capture your errors is your own choice. You can use trigger_error and a custom error handler.</p>
<h2>3. Use Manual Redirects When Debugging</h2>
<p>Many developers (including myself) will make use of redirects when developing web applications. To refresh your memory, here is how you do a redirect in PHP:</p>
<p>This technique can be very useful for sending the user to the correct page, but it can also be very problematic for debugging. For example, do you keep getting sent off to a bizarre area of your application? Do you know if it is just one redirect sending you there or many? What do you do when you get trapped in an infinite redirect loop?</p>
<p>One answer to these problems is to introduce the concept of manual redirects which would only be used for debugging. Rather than sending a header to the client, a link would be send to the target page as well as a stack trace. This would allow you to monitor the redirects that were happening in my application and clearly see what was happening if the application went wrong.</p>
<p>The code used looks something like this:</p>
<p style="padding-left: 30px;"><!--p<br--><strong><span style="color: #000080;">function redirect($url, $debug = false)</span></strong><br />
<strong><span style="color: #000080;"> {<br />
<span style="color: #000000;">      //If manual page redirects have been enabled then print some html<br />
</span>       if ($debug)<br />
      {<br />
           echo &#8220;Redirect: You are being redirected to: &lt;a href=&#8217;$url&#8217;&gt; $url &lt;/a&gt;\n&#8221;;<br />
           echo &#8220;Backtrace: \n&#8221;;<br />
           debug_print_backtrace ();<br />
      }<br />
     else<br />
    {<br />
           header ( &#8220;Location: $url&#8221; );<br />
    }<br />
exit (0);<br />
}<br />
?&gt;<br />
</span></strong><br />
You may find it useful to pull the $debug value from your configuration system of choice rather than having to pass it for each function call, but it works in this example.</p>
<h2>4. Avoid Side Effects</h2>
<p>A side effect can be described as a non-obvious effect that was caused by performing an action . For example.<br />
You can see that we start with a $radius and $area variable which we use to show the area of the circle. We then want to display the area of a square with the same dimensions, so we call getSquareArea. Although this function does what its name implies, it also alters the $radius variable (intentionally or not). This is defiantly non-obvious in the rest of our code and can cause severe headaches when it comes to debugging, especially in more complex applications. Of course, you should also avoid global variables for similar reasons.</p>
<p>This also applies to modifying function parameters (which were passed by reference). If you find yourself doing this then you should probably refactor your code. To do this you can either return the parameter rather than modifying it, or you can split the function into several smaller functions. Also, don’t forget that objects are always passed by reference in PHP 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/php-debugging-techniques-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Debugging Techniques &#8211; Part I</title>
		<link>http://technoblogy.net/php-debugging-techniques-part-i/</link>
		<comments>http://technoblogy.net/php-debugging-techniques-part-i/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 08:06:20 +0000</pubDate>
		<dc:creator>aabi</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Debug]]></category>

		<guid isPermaLink="false">http://technoblogy.net/?p=271</guid>
		<description><![CDATA[There are many PHP debugging techniques that can save you countless hours when coding as error reporting, using print statements etc. Let&#8217;s go through a little detail of these techniques. Error Messages Error messages are your first line of defense as a developer. You don&#8217;t want to be developing code in PHP on a server [...]]]></description>
			<content:encoded><![CDATA[<p>There are many PHP debugging techniques that can save you countless hours when coding as error reporting, using print statements etc. Let&#8217;s go through a little detail of these techniques.</p>
<p><strong>Error Messages</strong></p>
<p>Error messages are your first line of defense as a developer. You don&#8217;t want to be developing code in PHP on a server that is not configured to display error messages. However, keep in mind that when your code is debugged and ready to go live, you want to make sure error reporting is turned off because you don&#8217;t want visitors to your site seeing error messages that may give them enough knowledge to exploit a weakness and hack your site.<br />
You can also use error messages to your advantage because they display the exact line of code that threw or generated an error. This makes debugging a matter of looking at the line number shown on the browser by the generated error and checking that line number in your code.</p>
<h2><strong>1. </strong><strong>Error Reporting</strong></h2>
<p>An effective but basic debugging technique is to simply turn on error reporting.</p>
<h3 style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Error Reporting in PHP:</strong></span></h3>
<p style="padding-left: 30px;">There are many configuration settings in the php.ini file. You should already have set up up your php.ini file and placed it in the appropriate directory. There are a couple configuration variables you should know about when debugging your PHP applications. Here they are with their default values (You can discover the current default values of these variables by searching for  them in the php.ini file.) :</p>
<p style="padding-left: 60px;"><strong><span style="color: #000080;">display_errors = Off<br />
error_reporting = E_ALL</span></strong></p>
<p style="padding-left: 30px;"><strong>display_errors:</strong> The purpose of this variable is self-evident &#8212; it tells PHP whether or not to display errors.The  default value is <code>Off</code>. To make your life easier in the development  process, however, set this value to <code>On</code> by replacing  <code>Off</code>:</p>
<p style="padding-left: 60px;"><strong><span style="color: #000080;">display_errors = On</span></strong></p>
<p style="padding-left: 30px;"><strong></strong><strong>error_reporting</strong> This variable has a default value of E_ALL. This displays everything from bad coding practices to harmless notices to errors. E_ALL is a little too picky for my liking in the development process because it clutters the browser output by displaying notices on the screen for small things like uninitialized variables. I prefer to see the errors, any bad coding practices, but not the harmless notices.Therefore, replace the default value of <code>error_reporting</code> as follows:</p>
<p style="padding-left: 60px;"><strong><span style="color: #000080;"><span style="color: navy;">error_reporting = E_ALL &amp; ~E_NOTICE</span></span></strong></p>
<p style="padding-left: 30px;"><strong>Why Enable E_NOTICE?</strong><br />
• Warns about un-initialized variables.<br />
• Various non-critical issues that could potentially cause problems.</p>
<h3 style="padding-left: 30px;"><strong></strong><span style="text-decoration: underline;"><strong>Error Reporting in Server:</strong></span></h3>
<p style="padding-left: 30px;">Depending on what Apache is doing, turning error reporting on in PHP may not work because you may have multiple PHP versions on your computer. It&#8217;s sometimes hard to tell which PHP version Apache is pointing to because Apache can only look at one php.ini file. Not knowing which php.ini file Apache is using to configure itself is a security problem. However, there is a way to configure PHP variables in Apache to guarantee the setting of the correct error levels.<br />
Also, it&#8217;s good to know how to set these configuration variables on the server side to veto or pre-empt the php.ini file, providing a greater level of security.<br />
You should already have toyed with basic configurations in the http.conf file at /conf/httpd.conf when you configured Apache.<br />
To do the same as you just did in the php.ini file, add the following lines to your httpd.conf to override any and all php.ini files:</p>
<p style="padding-left: 60px;"><strong><span style="color: #000080;">php_flag  display_errors        on<br />
php_value error_reporting       2039</span></strong></p>
<p style="padding-left: 30px;">This overrides the flag you have set for display_errors in the php.ini file, as well as the value of error_reporting. The value 2039 stands for E_ALL &amp; ~E_NOTICE. If you prefer E_ALL, set the value to 2047, instead. Again, make sure you restart Apache.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>As a Summary:</strong></span></p>
<p style="padding-left: 30px;"><strong><span style="color: #000080;"><span style="color: #000000;"># Inside PHP.ini</span><br />
error_reporting = E_ALL<br />
<span style="color: #000000;"># Inside httpd.conf or .htacess</span><br />
php_value error_reporting 2047<br />
<span style="color: #000000;"># Inside a script</span></span></strong><span style="color: #000000;"> </span><br />
<strong> <span style="color: #000080;">&lt;?php<br />
ini_set(&#8220;error_reporting&#8221;, E_ALL | E_STRICT);<br />
/* or */<br />
error_reporting(E_ALL | E_STRICT);<br />
?&gt;</span></strong></p>
<p style="padding-left: 30px;">Next, we&#8217;ll test error reporting on your server.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Testing Error Reporting</strong></span></p>
<p style="padding-left: 30px;">You will save a great deal of time if you leave error reporting enabled. Errors in PHP point you right to the error in your code. Create a simple PHP file, test.php, and define it as shown below.</p>
<p style="margin: 0in 0in 0.0001pt; padding-left: 60px;"><strong><span style="color: #000080;">&lt;?php</span></strong></p>
<p style="margin: 0in 0in 0.0001pt; padding-left: 60px;"><strong><span style="color: #000080;">print(&#8220;The next line generates an error.&#8221;);</span></strong></p>
<p style="margin: 0in 0in 0.0001pt; padding-left: 60px;"><strong><span style="color: #000080;">printaline(&#8220;PLEASE?&#8221;);</span></strong></p>
<p style="margin: 0in 0in 0.0001pt; padding-left: 60px;"><strong><span style="color: #000080;">print(&#8220;This will not be displayed due to the above error.&#8221;);<br />
?&gt;</span></strong></p>
<p style="padding-left: 30px;">The first print() statement should display its contents to the Web browser. However, the second statement generates and displays an error to the Web page. This results in the last print() statement do nothing, as shown in Figure 1</p>
<p style="padding-left: 30px;"><strong>Figure  1 : Generating an Error</strong><br />
<img class="aligncenter size-full wp-image-272" title="Figure 1 " src="http://technoblogy.net/wp-content/uploads/2009/11/1.bmp" alt="Figure 1 Generating an Error" /></p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/php-debugging-techniques-part-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Crystal report tutorial &#8211; VS 2005</title>
		<link>http://technoblogy.net/crystal-report-tutorial-vs-2005/</link>
		<comments>http://technoblogy.net/crystal-report-tutorial-vs-2005/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 09:20:48 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vs 2005]]></category>

		<guid isPermaLink="false">http://technoblogy.net/?p=130</guid>
		<description><![CDATA[A very good book on using Crystal reports in Visual Studio 2005. many small and minute things are discussed in this book. VS2005 Walkthroughs Crystal Reports]]></description>
			<content:encoded><![CDATA[<p>A very good book on using Crystal reports in Visual Studio 2005. many small and minute things are discussed in this book.</p>
<p><a href="http://technoblogy.net/wp-content/uploads/2009/11/VS2005_Walkthroughs_CrystalReports.pdf">VS2005 Walkthroughs Crystal Reports</a></p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/crystal-report-tutorial-vs-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crystal Report Viewer width &#8211; Visual Studio</title>
		<link>http://technoblogy.net/crystal-report-viewer-width-visual-studio/</link>
		<comments>http://technoblogy.net/crystal-report-viewer-width-visual-studio/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:43:17 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[bestfitpage]]></category>
		<category><![CDATA[crystal viewer]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[width]]></category>

		<guid isPermaLink="false">http://technoblogy.net/crystal-report-viewer-width-visual-studio/</guid>
		<description><![CDATA[By default Crystal report viewer width is fixed according to it toolbar, but changes due to amount of data present in the report. And the width is not editable (as it is seen). Because of this reason if a crystal report has good amount of data then it goes past page width and disturbs the [...]]]></description>
			<content:encoded><![CDATA[<p>By default Crystal report viewer width is fixed according to it toolbar, but changes due to amount of data present in the report. And the width is not editable (as it is seen). Because of this reason if a crystal report has good amount of data then it goes past page width and disturbs the UI of that webpage.</p>
<p>One method to overcome this problem is hidden in the Crystal Report viewer itself, Viewer has a property named: &quot;Best Fit page&quot;. Its value is true by default, change this value to false and then set the width of the report. Now you can change the width of the report to anything.</p>
<p>One drawback/functionality of turning this feature off is the horizontal and vertical scroll bar appears. Now this thing is good or bad, it depends on report scenarios.</p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/crystal-report-viewer-width-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The maximum report processing jobs limit configured by your system administrator has been reached.</title>
		<link>http://technoblogy.net/the-maximum-report-processing-jobs-limit-configured-by-your-system-administrator-has-been-reached/</link>
		<comments>http://technoblogy.net/the-maximum-report-processing-jobs-limit-configured-by-your-system-administrator-has-been-reached/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:42:11 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[print jobs]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[session]]></category>

		<guid isPermaLink="false">http://technoblogy.net/the-maximum-report-processing-jobs-limit-configured-by-your-system-administrator-has-been-reached/</guid>
		<description><![CDATA[call Close or Dispose method at the end so the reporting engine remove the report entry from its queue.]]></description>
			<content:encoded><![CDATA[<p>call Close or Dispose method at the end so the reporting engine remove the report entry from its queue.</p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/the-maximum-report-processing-jobs-limit-configured-by-your-system-administrator-has-been-reached/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Opening hyperlink in a new window &#8211; Crystal Reports</title>
		<link>http://technoblogy.net/opening-hyperlink-in-a-new-window-crystal-reports/</link>
		<comments>http://technoblogy.net/opening-hyperlink-in-a-new-window-crystal-reports/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:41:59 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[hyperlink]]></category>
		<category><![CDATA[new window]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://technoblogy.net/opening-hyperlink-in-a-new-window-crystal-reports/</guid>
		<description><![CDATA[what to do when we want a hyperlink to open in a new window. This seems quite easy in any programming lanuage, but what to do when we want the same functionality in a crystal report. It is almost the same as with webpages. create formula field for and at the end just add &#34;target=new;&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>what to do when we want a hyperlink to open in a new window. This seems quite easy in any programming lanuage, but what to do when we want the same functionality in a crystal report.</p>
<p>It is almost the same as with webpages. create formula field for and at the end just add </p>
<blockquote><p>&quot;target=new;&quot; e.g {report field} + &quot;target = new;&quot;</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/opening-hyperlink-in-a-new-window-crystal-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get open Windows in MFC</title>
		<link>http://technoblogy.net/how-to-get-open-windows-in-mfc/</link>
		<comments>http://technoblogy.net/how-to-get-open-windows-in-mfc/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:41:45 +0000</pubDate>
		<dc:creator>saim</dc:creator>
				<category><![CDATA[MFC]]></category>
		<category><![CDATA[getdesktopwindow]]></category>
		<category><![CDATA[getnextwindow]]></category>
		<category><![CDATA[getwindow]]></category>
		<category><![CDATA[getwindowtext]]></category>

		<guid isPermaLink="false">http://technoblogy.net/how-to-get-open-windows-in-mfc/</guid>
		<description><![CDATA[Hi, i have very little experience in MFC and VC++. I was developing a small project, during development i need to view the list of all opened windows in my explorer. i read somewhere and like to post the solution of this only for you It is very simple. here is the example by which [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, i have very little experience in MFC and VC++. I was developing a small project, during development i need to view the list of all opened windows in my explorer. i read somewhere and like to post the solution of this only for you <img src='http://technoblogy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>It is very simple. here is the example by which you can display titles of each window opened. try this and enjoy.    <br />In your OnInitDialog() write this…</p>
<blockquote><p>HWND hnd = ::GetWindow(::GetDesktopWindow(), GW_CHILD);      <br />CWnd *pWnd;       <br />CString csTitle = &quot;&quot;;</p>
<p>while( (hnd != NULL) )      <br />{       <br />pWnd = CWnd::FromHandle(hnd);       <br />pWnd-&gt;GetWindowText(csTitle);</p>
<p>MessageBox(csTitle, &quot;Title&quot;, NULL);      <br />hnd = *pWnd-&gt;GetNextWindow(GW_HWNDNEXT);       <br />}</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/how-to-get-open-windows-in-mfc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

