0

After migrate a webpage to a new server (with more updated php-server), I have problems in some pages. These pages uses some different php blocks:

<?
$result = 1;
?>
some html code...
<?php
$result2 = $result;
?>

This works before the migration, but now the $result in the second part is reported as undefined variable in the apache2 error log.

How can I make that variables still are defined in second part?

togarha
  • 163
  • 3
  • 12

1 Answers1

3

Make sure to use long tags for php: <? needs to be: <?php

Either that, or enable short_open_tag in php.ini

Alex Tartan
  • 6,736
  • 10
  • 34
  • 45