diff us/index.php @ 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 226f00d9f6f5
children
line wrap: on
line diff
--- 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