Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:03

PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Wednesday April 6 2011 - 23:59:37 BST

Hi All

I have recently changed hosts and having sorted out the niggles the only problem i am left to resolve is my site map...

With the previous hosts it worked fine and i wasn't expecting a problem on the new host, however it resolutely refuses to work....

I have tried updating everything to the newest versions to no avail....

As you can see by clicking the link below, the servers seems to get part way through processing the page then seemingly stops and outputs the code as text....

http://www.tugtracker.co.uk/menu/extras ... /index.php

I have run this past the hosts and they have assured me that everything is well severside as indicated by....

http://www.tugtracker.co.uk/menu/extras ... hpinfo.php
&
http://www.tugtracker.co.uk/menu/extras ... simple.php


It is almost as if the server gets as far as the <PRE> and stops!!!! Looking at the outputed page through firefox's source view everything code wise upto the pre is pink!

Code:
html>   
<body>

This file needs to be executed under PHP from a webserver and will take the <br>
contents of any Milonic menu data file and output the results as either a <br>
NoScript menu or as a Sitemap


<?

//$menuDataFile[]="http://www.milonic.com/menu_data.php"; // Can execute a WWW File

$menuDataFile[]="http://www.tugtracker.co.uk/menu/embedded_main_menu.js"; // Or can execute a local file

//$menuDataFile[]="/main_menu_data.php"; // You can also add more than one file
//$menuDataFile[]="/menu_data.php";      // For main and sub menus if you need to


$useMenuStyles=false;
include("http://www.tugtracker.co.uk/menu/extras/php_sitemap/mm_dataminer.php");
echo "<Pre>".outputAsSiteMap($menuDataFile)."</Pre>"; // Can output as a Sitemap
//echo "<PRE>".outputAsNoScript($menuDataFile)."</PRE>"; // Or output as a NoScript Sitemap

?>

</body>
</html>


Could any one give any pointers as to why this seems to occur?

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Friday April 8 2011 - 1:09:09 BST

Right i have no ascertained where the problem may lie

I have on another site installed this php_sitemap

On this server i can switch between php 5.2 and php 5.3

The sitemap runs fine when set to php 5.2 but outputs the same error with 5.3....

does this assist with rectification? my php knowledge is poor at best..


- unfortunatly i cannot switch versions on the first site i mention!

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Saturday April 9 2011 - 11:13:11 BST

Much help re this problem here

http://www.phpfreaks.com/forums/index.p ... c=329754.0

The main thing seems to replacing <? with <?php in both files, now the script runs, but doesnt output anything other than six bullets.

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: Andy
Dated: Saturday April 9 2011 - 11:19:03 BST

Hi,

Have you tried the latest version of the menu.

I'm pretty sure there's a fix for 5.3 in there.

if not, let me know which modules you are using and I'll take a look.

-- Andy

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Sunday April 10 2011 - 11:05:18 BST

Andy wrote:
Hi,

Have you tried the latest version of the menu.

I'm pretty sure there's a fix for 5.3 in there.

if not, let me know which modules you are using and I'll take a look.

-- Andy


Dopey here isnt using the latest version and my license has expired.... I have applied for renewals and will let you know when updated.

Currently i have got it working now as far as outputting some bullet points...

http://www.tugtracker.co.uk/menu/extras ... index4.php

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: Andy
Dated: Monday April 11 2011 - 15:39:55 BST

How are you building the menus?

From static files or with PHP?

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Tuesday April 12 2011 - 14:46:19 BST

Hi again;

Menu version updated to 5.9, no change (incidentally the files for php_menu folder show last updated 2009.

I had again to go into both files and change the <? to <?php to get the code to run,

It runs to the same point of again outputting 6 bullets (it is clearly fetching these from the menu as if i insert a new top level on the menu file it will output 7 bullets).



My menu is built using the Subs_menu.js and embedded_main_menu.js these files are usually brought into htm aspx or for the sitemap only php files. I have tried using the default menu_data.js but i still get the same problem...

The menu itself works fine in all pages in which i insert it, i am only having problems with the sitemap.

I also note that the ereg_replace funtion which is used extensively in the dataminer is depreciated in php v5.3..

http://php.net/manual/en/function.ereg-replace.php

Though i havent the php knowledge to replace it other than like for like with preg_replace using find and replace (this makes no difference)

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Sunday April 24 2011 - 22:39:50 BST

Still struggling with this if anyone has any ideas?

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: Andy
Dated: Tuesday April 26 2011 - 13:27:54 BST

Can you please confirm the version of mm_dataminer.php you are using?

It should be version 2.1

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Tuesday April 26 2011 - 18:20:25 BST

Andy wrote:
Can you please confirm the version of mm_dataminer.php you are using?

It should be version 2.1




Milonic DHTML/PHP Menu Sitemap builder version 2.1 - November 16 2009
mm_dataminer.php


HTH

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: Andy
Dated: Tuesday April 26 2011 - 18:35:59 BST

2.1 of mm_dataminer.php doesn't contain any reference to ereg_replace so not sure what's going on here.

is there another file that PHP complains about?

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: ic31420
Dated: Tuesday April 26 2011 - 19:24:59 BST

Andy wrote:
2.1 of mm_dataminer.php doesn't contain any reference to ereg_replace so not sure what's going on here.

is there another file that PHP complains about?


I rechecked the files on my sever and they deffo was 2.1 with ereg_

I have just re downloaded and manually copied and pasted the code from the zip file to the file on the webserver and guess what!

It works - just to make me look an idiot.... Im going to blame some sort of versioning issue!

http://www.tugtracker.co.uk/menu/extras ... /index.php


Im going to print out the two codes and go through them line by line and find out why....... Don't wait up, i may be some time!


Cheers for your help

Re: PHP_Sitemap Help! Works in Php v 5.2 but not 5.3


Poster: Andy
Dated: Tuesday April 26 2011 - 19:27:32 BST

Whoa!! don't do that - you got a computer that can do that for you :D

Download a demo copy of Ultraedit and use its file compare feature it will save you hours of tedious work.