• I have a website built about 8 years ago that was never updated. I was unable to find a migration plugin that old so I am trying to manually migrate the site to a local xampp server for updating and modification. However, when I completed the migration and tried to open the site, I received a “Parse error: syntax error, unexpected ‘new’ (T_NEW)…”

    So, I created a completely fresh install of v2.9.2 on the xampp server which I called test292. When I attempted to open localhost/test292/ to complete the setup, I initially get the message:

    Parse error: syntax error, unexpected ‘new’ (T_NEW) in C:\xampp\htdocs\test292\wp-settings.php on line 646

    Line 646 is:
    $wp_the_query =& new WP_Query();

    I read that the & sign is depricated in the latest versions of php, so I found five instances of the “=& new” in settings.php and removed the &. I then got the following fatal error:

    Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in C:\xampp\htdocs\test292\wp-settings.php:18 Stack trace: #0 C:\xampp\htdocs\test292\wp-config.php(76): require_once() #1 C:\xampp\htdocs\test292\wp-load.php(30): require_once(‘C:\\xampp\\htdocs…’) #2 C:\xampp\htdocs\test292\wp-blog-header.php(12): require_once(‘C:\\xampp\\htdocs…’) #3 C:\xampp\htdocs\test292\index.php(17): require(‘C:\\xampp\\htdocs…’) #4 {main} thrown in C:\xampp\htdocs\test292\wp-settings.php on line 18

    I am running a fairly new install of xampp with + Apache 2.4.26 + MariaDB 10.1.25 + PHP 7.1.7.

    Stumped.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    So if it were me presented with this task, I’d take a different path. I’d export the site using the XML export tool and build a new, up to date site into which to import that file. There’s just too much between 2.9.2 and 4.8.2, plus plugins and themes, to make the “fix it in place” approach seem like it will be fruitful.

    Also, 2.9.2 was not written for PHP 7.1.

    Thread Starter Michael1950

    (@michael1950)

    Yes, that’s very sensible. I already have the images and other uploads on my local machine from my attempt at migrating. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘2.9.2 on xampp: syntax error, unexpected new’ is closed to new replies.