I just tried it with this code and it all worked as it should:
<?php if ( is_home() ) : ?>
<meta name="description" content="Your home page meta description" />
<?php else : ?>
<meta name="description" content="Your non-homepage meta description" />
<?php endif; ?>
You want to be sure there’s not a space between <?
and php
(<?php
).