You are here:  » Server move


Server move

Submitted by Actual on Mon, 2017-08-07 13:24 in

Hi.
My price tapestry sites have both been sat on a CentOS 7.3-1611 (64bits) dedicated server running PHP Version 5.4.16 and MySQL Version 5.5.52-MariaDB.

I have tried moving this across to an Ubuntu 16.04 LTS dedicated server running PHP 7 but it doesn't seem to want to run. I can get as far as running setup.php (it says no tables installed, click to install them but when I click the hyperlink to install the tables I just get a blank screen).

It's probably server config - would it be possible to have a few pointers about what should be installed/config'd with the server (its a fresh Ubuntu 16.04LTS install with PHP 7 and MySQL installed).

Because its a few years old, the PT version I am trying to move is 13/03A. Any ideas would help before I start delving through error logs.

Submitted by support on Mon, 2017-08-07 13:33

Hi,

From 13/03A distribution to PHP 7 you'll need the forward compatibility patch, please see this thread for more info / download...

Cheers,
David.
--
PriceTapestry.com

Submitted by Actual on Mon, 2017-08-07 15:30

Thanks! I'll give it a try :-)

Submitted by Actual on Mon, 2017-08-07 16:13

So, I've got a bit further. I now receive the following error messages:

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in {code saved}/includes/database.php on line 36

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in {code saved}/includes/database.php on line 41

Any ideas?

Submitted by Actual on Mon, 2017-08-07 16:53

With errors on, I also get the following warning:

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in {code saved}/includes/tapestry.php on line 27

Submitted by support on Tue, 2017-08-08 07:20

Hi,

It looks like you're up and running now but let me know if you're still having database errors and i'll check that out further with you.

I have updated the 12/10B and 13/03A forward compatibility patches to include updated includes/tapestry.php with the deprecated /e modifier removed - to apply manually look for the following code at line 27:

    $text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/e','',$text);

...and REPLACE with:

    $text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/','',$text);

And then the following code at line 54:

    $price = preg_replace('/[^0-9\.]/e','',$price);

...and REPLACE with:

    $price = preg_replace('/[^0-9\.]/','',$price);

Cheers,
David.
--
PriceTapestry.com

Submitted by Actual on Tue, 2017-08-08 21:53

Hi David,

Thanks for the help thus far. I've installed a brand new version of PT16/10A at {link saved} and it all works fine (I can see products), so I know the server is configured properly.

I have moved over {link saved} but this does not show any products on the front page (I can search for them and see them inside the admin utility and place them on 'featured products' inside the admin panel, but they do not appear at the user front end).

I haven't moved over my main site yet {link saved} so that remains working on the old server, which I will be losing pretty soon.

Hope you can help.

Steve.

Submitted by support on Wed, 2017-08-09 07:43

Hi Steve,

As it's a brand new server / latest MySQL / MariaDB it is possible that it is the sql_mode issue mentioned in this thread. This is now included in 16/10A, but to apply to the forward compatiblilty patch version of includes/database.php, look for the following code at line 16:

      $database_link = @mysqli_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword,$config_databaseName);

...and REPLACE with:

      $database_link = @mysqli_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword,$config_databaseName);
      mysqli_query($database_link,"SET SESSION sql_mode=''");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Actual on Wed, 2017-08-09 17:34

Yep, that worked - that did the trick. Thanks so much David. Really appreciate the help.