PHP Classes

Create Sitemap

Recommend this page to a friend!

      Create Sitemap  >  All threads  >  Create Sitemap  >  (Un) Subscribe thread alerts  
Subject:Create Sitemap
Summary:Parse error running script
Messages:5
Author:Rob Willox
Date:2005-10-11 12:05:20
Update:2005-11-21 16:04:26
 

  1. Create Sitemap   Reply   Report abuse  
Picture of Rob Willox Rob Willox - 2005-10-11 12:05:20
The following error occurs when sitemap.php is run in directory containing list of html files:-

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/engines/web/Clients/FreedomSki/sitemap.inc.php on line 10

Has this been seen before or any info how to rectify available?

regards
Rob

  2. Re: Create Sitemap   Reply   Report abuse  
Picture of Er. Rochak Chauhan Er. Rochak Chauhan - 2005-11-20 14:26:27 - In reply to message 1 from Rob Willox
Hi,

I guess this is due to the fact that you are using php 4.x .
to rectify it, just remove all "PRIVATE" , "PROTECTED" and "PUBLIC" keywords from the class.

Rochak

  3. Re: Create Sitemap   Reply   Report abuse  
Picture of Jon Mosier Jon Mosier - 2005-11-21 05:12:01 - In reply to message 1 from Rob Willox
I get the same results.

You can see what I've already tried by viewing my post.
phpclasses.org/discuss/package/2619 ...

Good luck to us both.

  4. Re: Create Sitemap   Reply   Report abuse  
Picture of Er. Rochak Chauhan Er. Rochak Chauhan - 2005-11-21 13:14:40 - In reply to message 3 from Jon Mosier
From line 10 till line 22 ... Replace "PRIVATE" by "VAR" and leave STATIC there, as PHP 4 and PHP 5 both support it. Do let me know if you still have any problem.


  5. Re: Create Sitemap   Reply   Report abuse  
Picture of Jon Mosier Jon Mosier - 2005-11-21 16:04:26 - In reply to message 4 from Er. Rochak Chauhan
That is what I did.

However, if I leave in static, I get the following error.

"Parse error: parse error, unexpected T_STATIC, expecting T_VARIABLE in /Library/WebServer/Documents/scripts/sitemap-2005-10-06/sitemap.inc.php on line 15"

You can see all of the code edits here. http://jon.webteaminc.com/scripts/sitemap-2005-10-06/sitemap.inc.phps

Thanks,
Jon