Strange error updating PHP code in a node I have a 'Basic Page' node that contains PHP code which returns the following error, when I edit and save it:


  Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.


I believe it is not the real error; if I edit anything but the code, I don't get any error.  

What I do is changing &lt;?php if (user_is_logged_in()): ?&gt; to &lt;?php if (user_is_logged_in() &amp;&amp; (inarray('approved user', $GLOBALS['user']-&gt;roles)))): ?&gt;.  

I'm pretty positive the code is right; the PHP filter is enabled, and the administrator user is the only user who can use it. I'm not really sure what else could be the issue.
inarray() isn't a PHP function, you're probably looking for in_array() :)

The error you're getting is probably masking the internal Call to undefined function inarray() exception that would be thrown.

EDIT

You also have one too many closing parentheses at the moment, I'd recommend separating out your code to make it cleaner:

&lt;?php

$has_required_role = in_array('approved user', $GLOBALS['user']-&gt;roles);
if (user_is_logged_in() &amp;&amp; $has_required_role):
  // Do something
endif;

?&gt;