0

I am working on a local dev environment for a Drupal site we are building. I am having trouble at one last step, and that is getting PHP in Drupal to execute properly. As you see below, when I view source on the localhost page being executed in PHP the HTML markup contains PHP code that should be executed server side first. I have confirmed the DB is connected fine, and this site runs fine on our production server. How can I fix this issue?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?= $language->language; ?>" lang="<?= $language->language; ?>">
<head profile="<?= $grddl_profile; ?>">
    <?= $head; ?>
    <title><?= $head_title; ?></title>
    <?= $styles; ?>
</head>
<body class="<?= $classes; ?>" <?= $attributes;?>>

<?= $page_top; ?>
<?= $page; ?>
<?= $page_bottom; ?>

<?= $scripts; ?>
</body>
</html>

2 Answers2

1

Have you enabled PHP input filter? Have you enabled short open tag in php.ini?

1

You need in php.ini file edit this line from

short_open_tag = Off

to

short_open_tag = On

NormundsP
  • 445
  • 2
  • 7
  • 16