What can make a php file stop its execution?
Posted: Fri Jul 01, 2011 3:47 pm
Hello
I am new to php, I have been debugging a php code and I am facing a problem that it making me crazy
.
The program runs fine, until it enters to the _instantiateController method. Once inside this method, the parameters that the method receives are printed, then I print the message Factory.php 2.18, so far everything is running as expected, then given the parameters values, It doesn't enter to the first and second IFs (this is fine, that is what I am expecting ), but then I am expecting the message Factory.php 2.20-01, but I don get it. the last thing that I get is the message Factory.php 2.18.
How can this be possible????? Why is it stopping there? Could this be a problem in my code, or a bad php server installation?
Thanks in advance
I am new to php, I have been debugging a php code and I am facing a problem that it making me crazy
The program runs fine, until it enters to the _instantiateController method. Once inside this method, the parameters that the method receives are printed, then I print the message Factory.php 2.18, so far everything is running as expected, then given the parameters values, It doesn't enter to the first and second IFs (this is fine, that is what I am expecting ), but then I am expecting the message Factory.php 2.20-01, but I don get it. the last thing that I get is the message Factory.php 2.18.
How can this be possible????? Why is it stopping there? Could this be a problem in my code, or a bad php server installation?
Code: Select all
function _instantiateController($file, $class, $aParams = null)
{
print("$file <br />");
print(" $class <br />");
print("$aParams <br />");
print("Factory.php 2.18 <br />");
if (!@include_once $file)
{
print("Factory.php 2.18-01 <br />");
$errMsg = "OA_Admin_Statistics_Factory::_instantiateController() Unable to locate " . basename($file);
print("Factory.php 2.19 <br />");
return MAX::raiseError($errMsg, MAX_ERROR_INVALIDARGS);
}
if (!class_exists($class))
{
print("Factory.php 2.19-01 <br />");
$errMsg = "OA_Admin_Statistics_Factory::_instantiateController() Class {$class} doesn't exist";
print("Factory.php 2.20 <br />");
return MAX::raiseError($errMsg, MAX_ERROR_INVALIDARGS);
}
print("Factory.php 2.20-01 <br />");
$oController = new $class($aParams);
print("Factory.php 2.21 <br />");
print(" $oController <br />");
return $oController;
}
Thanks in advance