--- a/include/common-db.inc.php +++ b/include/common-db.inc.php @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -if (php_uname('n') == "actbus-www") { +if (strstr(php_uname('n'),"actbus")) { $conn = new PDO("pgsql:dbname=transitdata;user=transitdata;password=transitdata;host=bus-main.lambdacomplex.org"); } else if (isDebugServer()) { $conn = new PDO("pgsql:dbname=transitdata;user=postgres;password=snmc;host=localhost"); @@ -27,12 +27,13 @@ } function databaseError($errMsg) { - die($errMsg); + if ($errMsg[1] != "") { + die(print_r($errMsg,true)); + } } include ('db/route-dao.inc.php'); include ('db/trip-dao.inc.php'); include ('db/stop-dao.inc.php'); include ('db/servicealert-dao.inc.php'); -?>