changeset 15:385ddd7c4b55 testing

use test_db.php to get mysqld_test instance
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sun, 19 Feb 2017 16:17:53 +0000
parents 1477b5e6dd16
children
files ca/index.php de/index.php facebook/facebookLogin.php facebook/invite.php fr/index.php goodreads/addToGRShelf.php goodreads/bkp/callback.php goodreads/bkp/getGoodReadsShelves.php goodreads/bkp/syncGoodreadsShelves.php goodreads/bkp/working/getGoodreadsShelves.php goodreads/bkp/working/syncGoodreadsShelves.php goodreads/callback.php goodreads/getGoodreadsShelves.php goodreads/getGoodreadsShelves2.php goodreads/syncGoodreadsShelves.php newsletter/newsletter_110120.php newsletter/newsletter_110301.php newsletter/newsletter_110418.php php/read/addListToMyMap.php php/read/deleteSavedList.php php/read/getAllSavedBooks.php php/read/getBookDetails.php php/read/getBrowseNodes.php php/read/getLeaderboard.php php/read/getLinkedBooks.php php/read/map/getMapISBNCirclePaths.php php/read/map/getMapRecommPaths.php php/read/map/getMapRecommendations.php php/read/map/getMapSavedBooks.php php/read/map/regenerateMyMap.php php/read/removeBookFromUserList.php php/read/saveUserList.php php/read/sendToFriend.php php/read/setThumbState.php php/read/similar.php php/read/updateLink.php php/read/updateTierLink.php twitter/twitterLogin.php uk/index.php us/index.php user/checkLogin.php user/confirmation.php user/getFBSession.php user/newLogin.php user/resetEmail.php user/resetPassword.php user/uk/checkLogin.php user/uk/confirmation.php user/uk/newLogin.php user/uk/resetEmail.php user/uk/resetPassword.php user/unsubscribe.php xml/getAmazonInfo.php
diffstat 53 files changed, 94 insertions(+), 94 deletions(-) [+]
line wrap: on
line diff
--- a/ca/index.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/ca/index.php	Sun Feb 19 16:17:53 2017 +0000
@@ -124,7 +124,7 @@
 				$ret = 1;
 				$countryCode = 2;
 				
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				$query = "CALL b_getBookInfo('$isbn', $countryCode)";
 				//echo $query;
 				$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
@@ -151,7 +151,7 @@
 				$linkedRecommended = "";
 				for($i=0;$i<sizeof($xml->isbn);$i++){
 					$linkedISBN = $xml->isbn[$i];
-					include "../../private/db.php"; 
+					include "../../../private/db_test.php"; 
 					$query = "CALL b_getBookInfo('$linkedISBN', $countryCode)";
 					//echo $query;
 					$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
--- a/de/index.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/de/index.php	Sun Feb 19 16:17:53 2017 +0000
@@ -124,7 +124,7 @@
 				$ret = 1;
 				$countryCode = 3;
 				
-								include "../../private/db.php"; 
+								include "../../../private/db_test.php"; 
 				$query = "CALL b_getBookInfo('$isbn', $countryCode)";
 				//echo $query;
 				$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
@@ -151,7 +151,7 @@
 				$linkedRecommended = "";
 				for($i=0;$i<sizeof($xml->isbn);$i++){
 					$linkedISBN = $xml->isbn[$i];
-					include "../../private/db.php"; 
+					include "../../../private/db_test.php"; 
 					$query = "CALL b_getBookInfo('$linkedISBN', $countryCode)";
 					//echo $query;
 					$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
--- a/facebook/facebookLogin.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/facebook/facebookLogin.php	Sun Feb 19 16:17:53 2017 +0000
@@ -23,7 +23,7 @@
 		$uid = $facebook->getUser();
 		$me = $facebook->api('/me');
 		
-		include "../../private/db.php"; 
+		include "../../../private/db_test.php"; 
 		$Email = $me['email'];
 		$FirstName = $me['first_name'];
 		$Surname = $me['last_name'];
@@ -43,7 +43,7 @@
 				
 				//reset connection
 				mysqli_close($link);
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				
 				$sql3="SELECT FirstName, Surname, DisplayName, UserID from user WHERE Email ='$Email'";
 				//echo $sql3;
--- a/facebook/invite.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/facebook/invite.php	Sun Feb 19 16:17:53 2017 +0000
@@ -35,7 +35,7 @@
 				$uid = $facebook->getUser();
 				$me = $facebook->api('/me');
 				
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				$Email = $me['email'];
 				$FirstName = $me['first_name'];
 				$Surname = $me['last_name'];
@@ -55,7 +55,7 @@
 						
 						//reset connection
 						mysqli_close($link);
-						include "../../private/db.php"; 
+						include "../../../private/db_test.php"; 
 						
 						$sql3="SELECT FirstName, Surname, DisplayName, UserID from user WHERE Email ='$User'";
 						//echo $sql3;
--- a/fr/index.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/fr/index.php	Sun Feb 19 16:17:53 2017 +0000
@@ -124,7 +124,7 @@
 				$ret = 1;
 				$countryCode = 4;
 				
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				$query = "CALL b_getBookInfo('$isbn', $countryCode)";
 				//echo $query;
 				$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
@@ -151,7 +151,7 @@
 				$linkedRecommended = "";
 				for($i=0;$i<sizeof($xml->isbn);$i++){
 					$linkedISBN = $xml->isbn[$i];
-					include "../../private/db.php"; 
+					include "../../../private/db_test.php"; 
 					$query = "CALL b_getBookInfo('$linkedISBN', $countryCode)";
 					//echo $query;
 					$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
--- a/goodreads/addToGRShelf.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/addToGRShelf.php	Sun Feb 19 16:17:53 2017 +0000
@@ -6,7 +6,7 @@
 //echo $userID;
 //echo $listName;
 
-include "../../private/db.php";
+include "../../../private/db_test.php";
 $ynrList = "CALL b_getUserSavedList($userID,\"$listName\")";
 //echo $ynrList;
 //echo $add;
--- a/goodreads/bkp/callback.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/bkp/callback.php	Sun Feb 19 16:17:53 2017 +0000
@@ -30,7 +30,7 @@
 $userID = $_SESSION['UserID'];
 //echo $userID;
 
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 $add = "CALL addGoodreadsID($userID,$grID)"; 
 $run = mysqli_query($link, $add); 
 
--- a/goodreads/bkp/getGoodReadsShelves.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/bkp/getGoodReadsShelves.php	Sun Feb 19 16:17:53 2017 +0000
@@ -16,7 +16,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	//echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	
 	$xml = new SimpleXMLElement(convert_utf8($ret));
 	for($i=0;$i<sizeof($xml->shelves->user_shelf);$i++){
--- a/goodreads/bkp/syncGoodreadsShelves.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/bkp/syncGoodreadsShelves.php	Sun Feb 19 16:17:53 2017 +0000
@@ -16,7 +16,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	//echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	
 	$shelves = array();
 	
--- a/goodreads/bkp/working/getGoodreadsShelves.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/bkp/working/getGoodreadsShelves.php	Sun Feb 19 16:17:53 2017 +0000
@@ -36,7 +36,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	//echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	
 	$xml = new SimpleXMLElement(convert_utf8($ret));
 	for($i=0;$i<sizeof($xml->shelves->user_shelf);$i++){
--- a/goodreads/bkp/working/syncGoodreadsShelves.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/bkp/working/syncGoodreadsShelves.php	Sun Feb 19 16:17:53 2017 +0000
@@ -37,7 +37,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	//echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	
 	$shelves = array();
 	
--- a/goodreads/callback.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/callback.php	Sun Feb 19 16:17:53 2017 +0000
@@ -31,7 +31,7 @@
 $userID = $_SESSION['UserID'];
 $backLoc = "http://www.yournextread.com/" . urldecode($_SESSION['backLocation']);
 
-include "../../private/db.php";
+include "../../../private/db_test.php";
 $add = "CALL addGoodreadsID($userID,$grID)"; 
 //echo $add;
 $run = mysqli_query($link, $add); //add the book to the list in usersave
--- a/goodreads/getGoodreadsShelves.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/getGoodreadsShelves.php	Sun Feb 19 16:17:53 2017 +0000
@@ -36,7 +36,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	//echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	require_once('GoodreadsAPI.php');
 	session_start();
 	$access_token = $_SESSION['access_token'];
--- a/goodreads/getGoodreadsShelves2.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/getGoodreadsShelves2.php	Sun Feb 19 16:17:53 2017 +0000
@@ -45,7 +45,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	
 	$xml = new SimpleXMLElement(convert_utf8($ret));
 	for($i=0;$i<sizeof($xml->shelves->user_shelf);$i++){
--- a/goodreads/syncGoodreadsShelves.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/goodreads/syncGoodreadsShelves.php	Sun Feb 19 16:17:53 2017 +0000
@@ -37,7 +37,7 @@
 	$ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret);
 	//echo $ret;		
 	
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	
 	$shelves = array();
 	
--- a/newsletter/newsletter_110120.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/newsletter/newsletter_110120.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?PHP
 
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 $myFile = "newsletterOutput";
 $fh = fopen($myFile, 'w') or die("can't open file");
--- a/newsletter/newsletter_110301.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/newsletter/newsletter_110301.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?PHP
 
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 $myFile = "newsletterOutput";
 $fh = fopen($myFile, 'w') or die("can't open file");
--- a/newsletter/newsletter_110418.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/newsletter/newsletter_110418.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?PHP
 
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 $myFile = "newsletterOutput";
 $fh = fopen($myFile, 'w') or die("can't open file");
--- a/php/read/addListToMyMap.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/addListToMyMap.php	Sun Feb 19 16:17:53 2017 +0000
@@ -5,7 +5,7 @@
 //echo $userID;
 //echo $listName;
 
-include "../../../private/db.php";
+include "../../../../private/db_test.php";
 $ynrList = "CALL b_setMap_ChangeListName($userID,\"$listName\", \"MyMap\")";
 echo $ynrList;
 $results = mysqli_query($link, $ynrList) or exit( mysqli_error( $link ));
--- a/php/read/deleteSavedList.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/deleteSavedList.php	Sun Feb 19 16:17:53 2017 +0000
@@ -3,7 +3,7 @@
 $user = $_GET['User'];
 $list = $_GET['list'];
 
-include "../../../private/db.php";
+include "../../../../private/db_test.php";
 
 $query = "CALL b_deleteSavedList($user, \"$list\")";
 echo $query;
--- a/php/read/getAllSavedBooks.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/getAllSavedBooks.php	Sun Feb 19 16:17:53 2017 +0000
@@ -2,11 +2,11 @@
 
 if(isset($ret))
 {
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 }
 else
 {
-	include "../../../private/db.php";
+	include "../../../../private/db_test.php";
 }
 
 $savedBooks = 0;
--- a/php/read/getBookDetails.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/getBookDetails.php	Sun Feb 19 16:17:53 2017 +0000
@@ -59,7 +59,7 @@
 	$output .=  "<BookDetails>";
 	
 	$proceed = true;
-	include "../../../private/db.php";
+	include "../../../../private/db_test.php";
 
 	$query = "CALL b_getBookInfo('$isbn', $loc)";
 	//select Timestamp,Title,Author,Binding,DeweyDecimal,ImageURL,SalesRank,PublicationDate,Publisher,Genre1,Genre2,Genre3 from books where ISBN = '$isbn'";
@@ -98,7 +98,7 @@
 		}
 	}
 	mysqli_close($link);	//do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
-	include "../../../private/db.php";
+	include "../../../../private/db_test.php";
 	
 	if($proceed == true)
 	{
@@ -214,16 +214,16 @@
 		  $xml = new SimpleXMLElement($out);	
 		  $resName=$xml->getName();
 		  $code=$xml->Error->Code;
-		  file_put_contents('/var/ywww/debug/phpDebug',"Losing gBD: $resName, $code\n",FILE_APPEND);
+		  file_put_contents('/var/test/ywww/debug/testDebug',"Losing gBD: $resName, $code\n",FILE_APPEND);
 		  if ($code=='RequestThrottled') {
 		    usleep(200000); // Try to reduce throttling until we get a 
 		    // principled solution in place
 		  }
 		  else {
-		    file_put_contents('/var/ywww/debug/phpDebug',"parms bd: ".
+		    file_put_contents('/var/test/ywww/debug/testDebug',"parms bd: ".
 				      print_r($parameters,TRUE)."\n",FILE_APPEND);
 		    if ($code=="") {
-		      file_put_contents('/var/ywww/debug/phpDebug',"error elt:\n$out\n",FILE_APPEND);
+		      file_put_contents('/var/test/ywww/debug/testDebug',"error elt:\n$out\n",FILE_APPEND);
 		    }
 		  }
 		}
@@ -232,10 +232,10 @@
 		  //use this xml to pull out the necessary information and save it
 		  set_error_handler(function () {
 		      global $out,$isbn;
-		      file_put_contents('/var/ywww/debug/phpDebug',
+		      file_put_contents('/var/test/ywww/debug/testDebug',
 					"Caught one bd: ".$isbn,
 					FILE_APPEND);
-		      file_put_contents('/var/ywww/debug/phpDebug',
+		      file_put_contents('/var/test/ywww/debug/testDebug',
 					print_r($out, TRUE)."\n",
 					FILE_APPEND);
 		    } );
@@ -322,7 +322,7 @@
 		    $salesRank = "null";
 		
 		  mysqli_close($link);	//do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
-		  include "../../../private/db.php";
+		  include "../../../../private/db_test.php";
 		
 		  $title = strtr($title, '"', "'");	
 		  $queryInsert = "CALL b_addNewBook(\"$isbn\",\"$title\", \"$author\",\"$binding\",\"$imageURL\", $dewey, $salesRank,\"$pubDate\",\"$publisher\",$g1,$g2,$g3,$loc)";	
--- a/php/read/getBrowseNodes.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/getBrowseNodes.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?PHP
 
-include "../../../private/db.php";
+include "../../../../private/db_test.php";
 
 $query = "CALL b_getBrowseNodes()";
 $results = mysqli_query($link, $query) or exit( mysqli_error( $link ));
--- a/php/read/getLeaderboard.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/getLeaderboard.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?PHP
 
-include "../../../private/db.php";
+include "../../../../private/db_test.php";
 
 $query = "CALL b_getLeaderboard()";
 $results = mysqli_query($link, $query) or exit( mysqli_error( $link ));
--- a/php/read/getLinkedBooks.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/getLinkedBooks.php	Sun Feb 19 16:17:53 2017 +0000
@@ -25,12 +25,12 @@
 
 if(isset($ret))
 {
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 	$loc = $countryCode; //passed from index.php when googlebot is crawling
 }
 else
 {
-	include "../../../private/db.php";
+	include "../../../../private/db_test.php";
 	$ret = 0;
 }	
 
--- a/php/read/map/getMapISBNCirclePaths.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/map/getMapISBNCirclePaths.php	Sun Feb 19 16:17:53 2017 +0000
@@ -26,7 +26,7 @@
 	$listName = "MyMap";	//default location is 1
 } 
 
-include "../../../../private/db.php";
+include "../../../../../private/db_test.php";
 $query = "CALL b_getMapUserList('$UserID',$loc, \"$listName\")"; // this generates fixed points - 
 //echo $query;
 $results = mysqli_query($link, $query) or exit( mysqli_error( $link ));
@@ -71,7 +71,7 @@
 //$output .= "</BookList>";
 
 mysqli_close($link);
-include "../../../../private/db.php";
+include "../../../../../private/db_test.php";
 
 $query = "CALL b_getMap_isbnPaths('$UserID', $loc, \"$listName\")"; // this generates fixed points - 
 //echo $query;
--- a/php/read/map/getMapRecommPaths.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/map/getMapRecommPaths.php	Sun Feb 19 16:17:53 2017 +0000
@@ -25,7 +25,7 @@
 	$listName = "MyMap";	//default map
 } 
 
-include "../../../../private/db.php";
+include "../../../../../private/db_test.php";
 //need to have an if statement to catch the first time it is run and call - CALL b_setMapAuthorXYcoord
 
 //Can swicth to this call if the map is having problems
@@ -45,12 +45,12 @@
 {
 	//populate the data
 	mysqli_close($link);
-	include "../../../../private/db.php";
+	include "../../../../../private/db_test.php";
 	$query1 = "CALL b_setupUserMap($UserID, $loc,\"$listName\")"; 
 	$results1 = mysqli_query($link, $query1) or exit( mysqli_error( $link ));
 	
 	mysqli_close($link);
-	include "../../../../private/db.php";
+	include "../../../../../private/db_test.php";
 //	$query = "CALL b_getMap_relatedBooksNPath($UserID, $loc,\"$listName\")"; 
 	$query = "CALL b_getMap_topRelatedBNP($UserID, $loc,\"$listName\")"; 
 
--- a/php/read/map/getMapRecommendations.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/map/getMapRecommendations.php	Sun Feb 19 16:17:53 2017 +0000
@@ -28,7 +28,7 @@
 	$loc = 1;	//default location is 1
 } 
 
-include "../../../../private/db.php";
+include "../../../../../private/db_test.php";
 
 $query = "CALL b_getMap_relatedBooks($user,$loc,\"$listName\")";
 //echo $query;
--- a/php/read/map/getMapSavedBooks.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/map/getMapSavedBooks.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?PHP
 
-include "../../../../private/db.php";
+include "../../../../../private/db_test.php";
 
 $savedBooks = 0;
 
--- a/php/read/map/regenerateMyMap.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/map/regenerateMyMap.php	Sun Feb 19 16:17:53 2017 +0000
@@ -14,11 +14,11 @@
 	$listName = "MyMap";	//default map
 } 
  
-	include "../../../../private/db.php";
+	include "../../../../../private/db_test.php";
 	$queryDel = "CALL b_deleteUserMap($UserID, $loc,\"$listName\")"; 
 	$results1 = mysqli_query($link, $queryDel) or exit( mysqli_error( $link ));
  
-	include "../../../../private/db.php";
+	include "../../../../../private/db_test.php";
 	$query1 = "CALL b_setupUserMap($UserID, $loc,\"$listName\")"; 
 	$results1 = mysqli_query($link, $query1) or exit( mysqli_error( $link ));
 	
--- a/php/read/removeBookFromUserList.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/removeBookFromUserList.php	Sun Feb 19 16:17:53 2017 +0000
@@ -2,7 +2,7 @@
 
 $ID = $_GET['SaveID'];
 
-include "../../../private/db.php";
+include "../../../../private/db_test.php";
 
 $query = "CALL b_deleteBookFromList($ID)";
 echo $query;
--- a/php/read/saveUserList.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/saveUserList.php	Sun Feb 19 16:17:53 2017 +0000
@@ -2,7 +2,7 @@
 
 if( !empty($_POST) ){
 
-	include "../../../private/db.php"; 
+	include "../../../../private/db_test.php"; 
 
 	//echo $_POST["xml"];
 	//echo print_r($_POST);
--- a/php/read/sendToFriend.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/sendToFriend.php	Sun Feb 19 16:17:53 2017 +0000
@@ -2,7 +2,7 @@
 
 if( !empty($_POST) ){
 
-	include "../../../private/db.php";  
+	include "../../../../private/db_test.php";  
 
 	//echo $_POST["xml"];
 	//echo print_r($_POST);
--- a/php/read/setThumbState.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/setThumbState.php	Sun Feb 19 16:17:53 2017 +0000
@@ -5,7 +5,7 @@
 //echo $linkList;
 
 
-include "../../../private/db.php";  
+include "../../../../private/db_test.php";  
 
 $query1 = "select * from b_thumbstate where UserID= $userID and LinkID in ($linkList) and state <> 0"; //CALL b_setThumbState($userID, $linkList)"; 
 //echo $query1;
--- a/php/read/similar.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/similar.php	Sun Feb 19 16:17:53 2017 +0000
@@ -4,11 +4,11 @@
 {
 	if($go == 1)
 	{
-		return "../../private/db.php"; 
+		return "../../../private/db_test.php"; 
 	}
 	else
 	{
-		return "../../../private/db.php"; 
+		return "../../../../private/db_test.php"; 
 	}
 }
 
--- a/php/read/updateLink.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/updateLink.php	Sun Feb 19 16:17:53 2017 +0000
@@ -9,7 +9,7 @@
 $userID = strval($_GET['userID']);
 echo $userID;
 
-include "../../../private/db.php";  
+include "../../../../private/db_test.php";  
 
 $pos = 0;
 $neg = 0;
@@ -65,7 +65,7 @@
 	echo $stateQuery;
 	
 	mysqli_close($link);	//do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
-	include "../../../private/db.php"; 
+	include "../../../../private/db_test.php"; 
 	$stateFinal = mysqli_query($link, $stateQuery) or exit( mysqli_error( $link ));
 }
 
--- a/php/read/updateTierLink.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/php/read/updateTierLink.php	Sun Feb 19 16:17:53 2017 +0000
@@ -12,14 +12,14 @@
 $loc = strval($_GET['loc']);
 echo $loc;
 
-include "../../../private/db.php";  
+include "../../../../private/db_test.php";  
 //$addState = 0;
 
 $query1 = "CALL b_getLinkID('$isbn1', '$isbn2', $loc)";  // "select LinkID from scoretable where BookID1 = '$isbn1' and BookID2 = '$isbn2' and LocID = $loc";
 //echo $query1;
 $data1 = mysqli_query($link, $query1) or exit( mysqli_error( $link ));
 mysqli_close($link);	//do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
-include "../../../private/db.php"; 
+include "../../../../private/db_test.php"; 
 
 if ( mysqli_num_rows( $data1 ) < 1 )		//does the link exist
 {
@@ -35,7 +35,7 @@
 	
 	//reset connection
 	mysqli_close($link);	//do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
-	include "../../../private/db.php"; 
+	include "../../../../private/db_test.php"; 
 			
 	
 	//if(isset($userID))
@@ -53,7 +53,7 @@
 	
 	//reset connection
 	mysqli_close($link);	//do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
-	include "../../../private/db.php"; 
+	include "../../../../private/db_test.php"; 
 	
 while($line = mysqli_fetch_assoc($data))
 {
--- a/twitter/twitterLogin.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/twitter/twitterLogin.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,5 +1,5 @@
 <?PHP
-	include "../../private/db.php"; 
+	include "../../../private/db_test.php"; 
 
 	include 'EpiCurl.php';
 	include 'EpiOAuth.php';
@@ -40,7 +40,7 @@
 			
 			//reset connection
 			mysqli_close($link);
-			include "../../private/db.php"; 
+			include "../../../private/db_test.php"; 
 			
 			$sql3="SELECT FirstName, Surname, DisplayName, UserID from user WHERE Email ='$User'";
 			//echo $sql3;
--- a/uk/index.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/uk/index.php	Sun Feb 19 16:17:53 2017 +0000
@@ -124,7 +124,7 @@
 				$ret = 1;
 				$countryCode = 1;
 				
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				$query = "CALL b_getBookInfo('$isbn', $countryCode)";
 				//echo $query;
 				$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
@@ -151,7 +151,7 @@
 				$linkedRecommended = "";
 				for($i=0;$i<sizeof($xml->isbn);$i++){
 					$linkedISBN = $xml->isbn[$i];
-					include "../../private/db.php"; 
+					include "../../../private/db_test.php"; 
 					$query = "CALL b_getBookInfo('$linkedISBN', $countryCode)";
 					//echo $query;
 					$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
--- a/us/index.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/us/index.php	Sun Feb 19 16:17:53 2017 +0000
@@ -124,7 +124,7 @@
 				$ret = 1;
 				$countryCode = 0;
 				
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				$query = "CALL b_getBookInfo('$isbn', $countryCode)";
 				//echo $query;
 				$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
@@ -144,7 +144,7 @@
 					if (preg_match("<Error>",$bookDetails)) {
 					  $resName=$bookXML->getName();
 					  $code=$bookXML->Error->Code;
-					  file_put_contents('/var/ywww/debug/phpDebug',"Losing 3: $resName, ".
+					  file_put_contents('/var/test/ywww/debug/testDebug',"Losing 3: $resName, ".
 							    $code."\n",FILE_APPEND);
 					  if ($code=='RequestThrottled') {
 					    usleep(200000); // Try to reduce throttling until we get a 
@@ -165,16 +165,16 @@
 				$linkedRecommended = "";
 				for($i=0;$i<sizeof($xml->isbn);$i++){
 				  $linkedISBN = $xml->isbn[$i];
-				  include "../../private/db.php"; 
+				  include "../../../private/db_test.php"; 
 				  $query = "CALL b_getBookInfo('$linkedISBN', $countryCode)";
 				  //echo $query;
 				  $res = mysqli_query($link, $query) or exit( mysqli_error( $link ));
 				  set_error_handler(function () {
 				      global $bookLDetails, $linkedISBN;
-				      file_put_contents('/var/ywww/debug/phpDebug',
+				      file_put_contents('/var/test/ywww/debug/testDebug',
 							"Caught other one?: ".$linkedISBN,
 							FILE_APPEND);
-				      //file_put_contents('/var/ywww/debug/phpDebug',
+				      //file_put_contents('/var/test/ywww/debug/testDebug',
 				      //		print_r($bookLDetails, TRUE)."\n",
 				      //		FILE_APPEND);
 				    } );
@@ -193,7 +193,7 @@
 				      if (preg_match("<Error>",$bookLDetails)) {
 					$resName=$bookLXML->getName();
 					$code=$bookLXML->Error->Code;
-					file_put_contents('/var/ywww/debug/phpDebug',"Losing 2: $resName, ".
+					file_put_contents('/var/test/ywww/debug/testDebug',"Losing 2: $resName, ".
 							  $code."\n",FILE_APPEND);
 					if ($code=='RequestThrottled') {
 					  usleep(200000); // Try to reduce throttling until we get a 
--- a/user/checkLogin.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/checkLogin.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,7 +1,7 @@
 <?php
 require "PasswordHash.php";
 
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 // emailname and password sent from form
 $email=$_GET['email'];
--- a/user/confirmation.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/confirmation.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,5 +1,5 @@
 <?PHP
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 
 // Passkey that got from link
@@ -59,7 +59,7 @@
 	mysqli_close($link);
 	$sql3="DELETE FROM $tbl_name1 WHERE confirm_code = '$passkey'";
 	//echo $sql3;
-	include "../../private/db.php"; 	//need to reinclude otherwise an error is thrown
+	include "../../../private/db_test.php"; 	//need to reinclude otherwise an error is thrown
 	$result3=mysqli_query($link,$sql3);
 	mysqli_close($link);
 
--- a/user/getFBSession.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/getFBSession.php	Sun Feb 19 16:17:53 2017 +0000
@@ -18,7 +18,7 @@
 		$uid = $facebook->getUser();
 		$me = $facebook->api('/me');
 		
-		include "../../private/db.php"; 
+		include "../../../private/db_test.php"; 
 		$Email = $me['email'];
 		$FirstName = $me['first_name'];
 		$Surname = $me['last_name'];
@@ -41,7 +41,7 @@
 				
 				//reset connection
 				mysqli_close($link);
-				include "../../private/db.php"; 
+				include "../../../private/db_test.php"; 
 				
 				$sql3="SELECT FirstName, Surname, DisplayName, u.UserID, ReceiveEmail, GoodreadsState, LocID
 						from user u, userpref p 
--- a/user/newLogin.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/newLogin.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,7 +1,7 @@
 <?php
 require "PasswordHash.php";
 
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 // emailname and password sent from form
 $email=$_GET['email'];
--- a/user/resetEmail.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/resetEmail.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?php
 require "PasswordHash.php";
-include "../../private/db.php"; 
+include "../../../private/db_test.php"; 
 
 // emailname and password sent from form
 $userID=$_GET['userID'];
--- a/user/resetPassword.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/resetPassword.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,7 +1,7 @@
 <?php
 require "PasswordHash.php";
 
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 include "passGen.php";
 
 // emailname and password sent from form
--- a/user/uk/checkLogin.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/uk/checkLogin.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,7 +1,7 @@
 <?php
 require "PasswordHash.php";
 
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 
 // emailname and password sent from form
 $email=$_GET['email'];
--- a/user/uk/confirmation.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/uk/confirmation.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,5 +1,5 @@
 <?PHP
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 
 
 // Passkey that got from link
--- a/user/uk/newLogin.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/uk/newLogin.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,7 +1,7 @@
 <?php
 require "PasswordHash.php";
 
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 
 // emailname and password sent from form
 $email=$_GET['email'];
--- a/user/uk/resetEmail.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/uk/resetEmail.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,6 +1,6 @@
 <?php
 require "PasswordHash.php";
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 
 // emailname and password sent from form
 $userID=$_GET['userID'];
--- a/user/uk/resetPassword.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/uk/resetPassword.php	Sun Feb 19 16:17:53 2017 +0000
@@ -1,7 +1,7 @@
 <?php
 require "PasswordHash.php";
 
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 include "passGen.php";
 
 // emailname and password sent from form
--- a/user/unsubscribe.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/user/unsubscribe.php	Sun Feb 19 16:17:53 2017 +0000
@@ -2,7 +2,7 @@
 
 $email = strval($_GET['email']);
 
-include "../../private/db.php";  
+include "../../../private/db_test.php";  
 
 $query = "update userpref set ReceiveEmail = 0 where UserID in (select UserID from user where Email = '$email') ";
 $results = mysqli_query($link, $query);
--- a/xml/getAmazonInfo.php	Sun Feb 19 16:17:25 2017 +0000
+++ b/xml/getAmazonInfo.php	Sun Feb 19 16:17:53 2017 +0000
@@ -115,16 +115,16 @@
 	  $xml = new SimpleXMLElement($output);	
 	  $resName=$xml->getName();
 	  $code=$xml->Error->Code;
-	  file_put_contents('/var/ywww/debug/phpDebug',"Losing: $resName, $code\n",FILE_APPEND);
+	  file_put_contents('/var/test/ywww/debug/testDebug',"Losing: $resName, $code\n",FILE_APPEND);
 	  if ($code=='RequestThrottled') {
 	    usleep(200000); // Try to reduce throttling until we get a 
 	    // principled solution in place
 	  }
 	  else {
-	     file_put_contents('/var/ywww/debug/phpDebug',"parms: $go\n".
+	     file_put_contents('/var/test/ywww/debug/testDebug',"parms: $go\n".
 		   print_r($parameters,TRUE)."\n",FILE_APPEND);
 	     if ($code=="") {
-	       file_put_contents('/var/ywww/debug/phpDebug',"error elt:\n$output\n",FILE_APPEND);
+	       file_put_contents('/var/test/ywww/debug/testDebug',"error elt:\n$output\n",FILE_APPEND);
 	     }
 	  }
 	}
@@ -132,17 +132,17 @@
 	  $xml = new SimpleXMLElement($output);	
 	  set_error_handler(function () {
 	      global $output;
-	      file_put_contents('/var/ywww/debug/phpDebug',
+	      file_put_contents('/var/test/ywww/debug/testDebug',
 				"Caught one?: ".$searchparameterdata,
 				FILE_APPEND);
-	      file_put_contents('/var/ywww/debug/phpDebug',
+	      file_put_contents('/var/test/ywww/debug/testDebug',
 				print_r($output, TRUE)."\n",
 				FILE_APPEND);
 	    } );
 	  $review = $xml->Items->Item->CustomerReviews->IFrameURL;
 	  // The above is failing repeatedly -- 
 	  //PHP Notice: Trying to get property of non-object in
-	  // /var/ywww/xml/getAmazonInfo.php on line [109]
+	  // /var/test/ywww/xml/getAmazonInfo.php on line [109]
 	  // See the dumped structure at the end of this file for the
 	  // cause
 	  restore_error_handler();
@@ -262,7 +262,7 @@
 	if($errorCode != "AccountLimitExceeded")
 	{
 	  if($go == 1) {
-	    file_put_contents('/var/ywww/debug/phpDebug',"win: ".
+	    file_put_contents('/var/test/ywww/debug/testDebug',"win: ".
 			    $xml->Items->Item->ItemAttributes->Title."\n",
 			      FILE_APPEND);
 			return $output;
@@ -308,7 +308,7 @@
 				//echo "$key => $value";
 				$queryG = "CALL b_addBrowseNode($key,\"$value\")";	//add the name value pair for genre to new table	
 				//echo $queryG;
-				include "../../private/db.php";
+				include "../../../private/db_test.php";
 				$resG = mysqli_query($link, $queryG);
 				mysqli_close($link);
 				
@@ -331,7 +331,7 @@
 				$salesRank = "null";
 			
 			$title = strtr($title, '"', "'");
-			include "../../private/db.php";
+			include "../../../private/db_test.php";
 			$review1 = mysqli_real_escape_string($link,$review1);
 			$review2 = mysqli_real_escape_string($link,$review2);
 			$review3 = mysqli_real_escape_string($link,$review3);
@@ -355,7 +355,7 @@
 	else
 	{
 		//look up info from db	
-		include "../../private/db.php"; 
+		include "../../../private/db_test.php"; 
 		$query = "CALL b_getBookInfo('$searchparameterdata', $loc)";
 		//echo $query;
 		$res = mysqli_query($link, $query) or exit( mysqli_error( $link ));