I am migrating a site from a PHP 4.3.11 to a PHP 4.3.9 server. When I run the script on the PHP 4.3.9 server nothing comes up. I added a line that says echo "test"; to the script right before where I create the XTemplate object and the line echo's. But if I put the echo line after the line where the object is created it does not echo.
I also tried commenting out the line where the object is created and then running the script and I do not get any error messages. I should be getting errors when I do that because later in the script I call the object. I also tried commenting out some of the include files which contain functions that I either call from the main script or within a function in one of the include files. When I commented out these includes I still did not get any errors.
I am hosting this on a GoDaddy virtual dedicated server with a plesk control panel.
Why am I not getting error messages?
Why does the script seem to die right when I try to create the object?
I am using the XTemplate Class which is an XML templating engine which parses my html templates and populates information from the database into XML tags and blocks within the templates.
I am using version 1.7. I also tried using the newest version 0.4.0 and I have the same problem. Version 0.4.0 is compatible wth both PHP 4 and PHP 5.
The class can be found at http://www.phpxtemplate.org
Here is the main script.
<?php
// initialize a session
session_start();
// use for testing
error_reporting(E_ALL);
set_error_handler("errorHandler");
// include files
include 'include/include.inc';
echo "test";
// create a new x template object
$xtpl = new XTemplate ("templates/search.html");
// declare variables
if (isset($_GET['search'])){
$case = $_GET['search'];
$searchURL = "vehicleSearch.php?display=allVehicles";
}
//
// main loop
//
if ((isset($_GET['display'])) || isset($_GET['vid']))
// call the general display function to display the search
generalDisplay($connection, &$xtpl);
else if (isset($_GET['search'])){
// create the search form
createForms(&$xtpl, $case, $searchURL, $connection);
echo "test 2";
}
$xtpl->parse("main");
$xtpl->out("main");
?>