Minimum Server Requirements - PHP 5.2 ?

General Discussion about the commercial Enuuk Auction Platform
Post Reply
RWAP
Site Admin
Posts: 750
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

Minimum Server Requirements - PHP 5.2 ?

Post by RWAP » Mon Aug 19, 2013 7:43 am

Enuuk v3.2 introduced a change to class\Core\Controller.php in order to allow it to work properly on PHP 5.4

However, the change means that the code will no longer work on PHP v5.2

To overcome this (and a solution which suits PHP 5.2, 5.3 and 5.4 + ) find the following lines:

Code: Select all

        //get the relative url, to determine the Action to call
        $url = $server['REQUEST_URI'];
        $url = substr($url, strlen($relativePath.'/')-1);
        if(strpos($url,'?')){
            $url = strstr($url,'?',true); //removes "?xx=xx&..." part
        }
Replace them with:

Code: Select all

        //get the relative url, to determine the Action to call
        $url = $server['REQUEST_URI'];
        $url = substr($url, strlen($relativePath.'/')-1);
        if(strpos($url,'?')){
	        $tmpUrl=explode("?", $url);
    	    $url = array_shift($tmpUrl); //remove "?xx=xx&..."
        }

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest