PHP Classes

Strange Results

Recommend this page to a friend!

      Create Sitemap  >  All threads  >  Strange Results  >  (Un) Subscribe thread alerts  
Subject:Strange Results
Summary:XML contains only two lines
Author:Jon Mosier
Date:2005-11-20 13:05:29
Update:2005-11-21 04:59:12

  1. Strange Results   Reply   Report abuse  
Jon Mosier - 2005-11-20 13:05:29
I get the following error.
"Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /Library/WebServer/Documents/scripts/sitemap-2005-10-06/ on line 10"

This is the contents of the resulting file.

<?xml version="1.0"?>


  2. Re: Strange Results   Reply   Report abuse  
Er. Rochak Chauhan - 2005-11-20 14:26:31 - In reply to message 1 from Jon Mosier

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.


  3. Re: Strange Results   Reply   Report abuse  
Jon Mosier - 2005-11-21 04:59:12 - In reply to message 2 from Er. Rochak Chauhan
Thanks Rochak,

That was the first thing I did.

The same result is true regardless of the version of php I run. I have tested it on 3 servers. 2 Mac OS X and 1 LINUX.

After removing PRIVATE, PUBLIC and PROTECTED, I also had to remove "static" from line 15.

I still have the same result.