I have installed latest version of wamp server in my local,
I have the following version for
Apache - 2.2.17
PHP - 5.3.5
mysql - 5.5.8

I am recursively calling a function inside a class, It has end point after 1300 iterations. But I don't know in my new wamp server installation I am getting the following error

Fatal error: Maximum function nesting level of '100' reached, aborting! in D:\wamp\www\

Did any faced this kind of issue, please give me solution...

can you please post code!

can you please post code!

$cf = new CommonFunctions();
        $newQids = $this->testAlgo(-0.67, $test_id, $qArray, $emptyArray, $userResponses,$cf,0,$tsvArray,$prevQArray,$skippedQArray);

//The following function resides in the same class
function testAlgo($ts_value,$testid,$testQuestion,$emptyArray,$responses,$cf,$counter,&$tsvArray,$prevQArray,$skippedQArray)
    {
        set_time_limit(0);
		if(empty($testQuestion))
        {
            if(empty($skippedQArray))
            {
                return $emptyArray;
            }
            else
            {
                $testQuestion = $skippedQArray;
                $skippedQArray = array();
            }                
        }
        
        $newArr = array_keys($testQuestion);        
        
        $diff = abs($testQuestion[$newArr[0]]["b"] - $ts_value);
        $nxtQuestId = $testQuestion[$newArr[0]]["question_id"];
        $idid = $testQuestion[$newArr[0]]["question_id"];

        $cf->tsLoop($testQuestion,$diff,$ts_value, $nxtQuestId);
        $newTSVal = 0;
        
        //if(!in_array($nxtQuestId, $emptyArray))
        //{
            // Creating array of prev questionS.
            $prevQArray[] = array("q_id"=>$nxtQuestId,"q_resp"=>$responses[$counter],"a"=>$testQuestion[$nxtQuestId]['a'],"b"=>$testQuestion[$nxtQuestId]['b']);
            $newTSVal = $cf->calculateTSvalue_Chapter($responses[$counter],$nxtQuestId,'0',$ts_value,$testid,'1',$testQuestion[$nxtQuestId]['a'],$testQuestion[$nxtQuestId]['b'],$flag='test',(sizeof($prevQArray) - 1),$prevQArray);
            $tsvArray[] = $newTSVal;

            array_push ($emptyArray, $nxtQuestId);
            
            if($responses[$counter] == 0)
            {
               $skippedQArray[$nxtQuestId] = $testQuestion[$nxtQuestId];
            }            
            
            unset($testQuestion[$nxtQuestId]);
            $counter++;
        //}
       
        return $this->testAlgo($newTSVal,$testid,$testQuestion,$emptyArray,$responses,$cf,$counter,$tsvArray,$prevQArray,$skippedQArray);
    }



//// The following function residing in CommonFunctions
 function tsLoop(&$testQuestion,&$diff,&$ts_value, &$nxtQuestId)
    {
        foreach($testQuestion as $tq)
        {
            if($diff > abs($tq["b"] - $ts_value))
            {
                $diff = abs($tq["b"] - $ts_value);
                $nxtQuestId = $tq["question_id"];
            }
        }
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.