Yeah, turning on error reporting helps tremendously -- I hate to develop in an environment with error reporting off.<br><br>Also, there is always the old &quot;print &#39;got here&#39;; exit;&quot; trick which can help when trying to isolate the bad line.<br>
<br><div class="gmail_quote">On Wed, Apr 14, 2010 at 4:01 PM, Earnie Boyd <span dir="ltr">&lt;<a href="mailto:earnie@users.sourceforge.net">earnie@users.sourceforge.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">John Mitchell wrote:<br>
&gt; I wrote my first php code within a newly created drupal module and I<br>
&gt; got it to work.<br>
&gt;<br>
<br>
</div>Firsts are always good.<br>
<div class="im"><br>
&gt; Initially it was not working (Drupal would not come up) and I did not<br>
&gt; know what was wrong so started to take out lines until Drupal finally<br>
&gt; came up and that is how I discovered which line had the syntax error.<br>
&gt; Once I knew which line it was I fixed the problem and put it back in<br>
&gt; the code and drupal came up.<br>
&gt;<br>
<br>
</div>The hard way to debug it. :)<br>
<div class="im"><br>
&gt; My question is in the future if I have this problem again where Drupal<br>
&gt; does not come up because of some php code within a custom module<br>
&gt; erroring off what is a more efficient way for me to detect and fix any<br>
&gt; php syntax errors?<br>
&gt;<br>
<br>
</div>Any number of ways.  If you&#39;re using apache the error would be in the<br>
error.log file.  And if you set the php.ini file with a log file or<br>
syslog then it would be there.  And then there is the PHP display_errors<br>
setting that can be set in .htaccess or settings.php file.<br>
<br>
.htaccess you would add<br>
php_value display_errors 1<br>
<font color="#888888"><br>
--<br>
Earnie<br>
-- <a href="http://progw.com" target="_blank">http://progw.com</a><br>
-- <a href="http://www.for-my-kids.com" target="_blank">http://www.for-my-kids.com</a><br>
</font><div><div></div><div class="h5">--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br>