PHP_Sitemap Help! Works in Php v 5.2 but not 5.3

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

PHP_Sitemap Help! Works in Php v 5.2 but not 5.3

Post by ic31420 »

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: Select all

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://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?
Last edited by ic31420 on Fri Apr 08, 2011 1:10 am, edited 1 time in total.
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

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!
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

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.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

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

Post by Andy »

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
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

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
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

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

Post by Andy »

How are you building the menus?

From static files or with PHP?
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

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)
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

Still struggling with this if anyone has any ideas?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

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

Post by Andy »

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

It should be version 2.1
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

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
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

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

Post by Andy »

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?
ic31420
Advanced
Advanced
Posts: 17
Joined: Sun Jun 01, 2008 5:42 pm

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

Post by ic31420 »

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
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

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

Post by Andy »

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.
Post Reply