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: -
$url = $SERVER['PHPSELF'];
echo "Path = " . $url . "<br />";
echo "Path fragments: -<br />";
$fragments = pathinfo($SERVER['PHPSELF']);
echo "Directory = ". $fragments['dirname']. "/<br />";
echo "File Name = " . $fragments['basename']. " <br />";
echo "File Type = ". $fragments['extension']. " <br />";
Modified 12.php by replacing
// Set the base location for this page relative to web root - MODIFY THIS!!!
// Fetch the location framement to match against menu table
$location = str_replace ($baseUrl,'',$SERVER['PHPSELF']);
// Fetch the location fragment to match against menu table
$path = pathinfo("$SERVER[PHPSELF]");
$dirname = $path['dirname'];
$location = $dirname. "/";
Modified script works OK on my Windows test box and the RH EL3 Plesk server.