[QUOTE]
Originally Posted by soteros
Did you solve this one?
I’m having the same problem but can’t find any solutions posted in the forums!
After THINKING this one over I realised that you get the “Menu Location not found” error unless you modify the contents of the menu table supplied with the code archive!
Added the locations of my /PHPAnthologyCode/WebPAgeElements/12.php to the menu table and the script worked perfectly on my Windows test box but still failed on my Redhat EL3 production server with Plesk 7.0.2! This might be a problem with str_replace() on my Plesk server’s version of PHP (4.3.2)?
Tried using pathinfo() to break down the URL fragments: -
// Set the base location for this page relative to web root - MODIFY THIS!!!
$baseUrl=‘/PHPAnthologyCode/WebPageElements/12.php’;
// Fetch the location framement to match against menu table
$location = str_replace ($baseUrl,‘’,$_SERVER[‘PHP_SELF’]);
with
// Fetch the location fragment to match against menu table
$path = pathinfo(“$_SERVER[PHP_SELF]”);
$dirname = $path[‘dirname’];
$location = $dirname. “/”;
Modified script works OK on my Windows test box and the RH EL3 Plesk server.[/QUOTE]