0

I tried to set up a site from my old to new server, checked over the databases and set it up exactly like it should but it keeps throwing errors such as:

Parse error: syntax error, unexpected '?> ', expecting function (T_FUNCTION) in /search/index.php on line 2536

I can fix this by adding a } at the end of the page, but that wasn't needed for when it was on the other server and even after that there were more problems that followed up after:

Notice: Use of undefined constant SUBPAGE_LEVEL_1 - assumed 'SUBPAGE_LEVEL_1' in 

would appear all over the site, I know the issue related to that is due to the constant not actually being defined on that particular page.

The main thing is I believe this is related to my php ini settings on the new server, these errors never appeared on the old server.

For reference my new server (the one with the errors) are on:

  • PHP 5.6.36-1+ubuntu18.04.1+deb.sury.org+1 (cli)

and the old server:

  • PHP 5.6.37 (cli)

I've looked up the differences between .36 to .37 but I've never noticed anything that stood out to me, is it because of this or am I overlooking something really obvious?

Update: error reporting is in a file called the config.php, it's not being loaded into the sitewide (as it did with the old server, I do know however it's being included because its the file that's required to make the site work)

Once I manually add the error report code into the header.php it fixes some but not all the issues and I feel I shouldn't have to touch any of the site code as it is.

  • Post the code where the error occurred. – Lovepreet Singh Aug 07 '18 at 11:12
  • 2
    you probably have error reporting now and you didn't have before. – Lelio Faieta Aug 07 '18 at 11:16
  • Will update post but basically error reporting is on the config.php, it's not being loaded into the sitewide (as it did with the old server) added it in elsewhere and it fixes some of the issues but not all of them – Jillian Hartwell Aug 07 '18 at 11:20
  • just suppress the notice level errors with the correct php.ini file. Personally id fix notice level issues also but as it has been working on the old server then theres no need. – Olli Tyynelä Aug 07 '18 at 11:26
  • Error reporting is clearly at a higher level and you also probably have stricter settings in the new php.ini file. – John Conde Aug 07 '18 at 11:27

0 Answers0