Click to See Complete Forum and Search --> : Hosting problem


homer.j.simpson
07-03-2006, 10:47 AM
I'm quite new to hosting and facing a problem in hosting php script. I don't get it why a simple testing script which is working fine on my computer running IIS 5.1, getting parse error messge.
I'm using free service from www.freehostia.com

Test Script

<?php
class abc{
private $gen;
private $den;
}

print "hello";
?>


ERROR

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/www/jacbri.freehostia.com/index.php on line 3

NogDog
07-03-2006, 11:12 AM
I suspect your host is running PHP 4, thus it does not support the "private" declaration. You'll have to just use the "var" declaration, instead.

homer.j.simpson
07-03-2006, 11:22 AM
u r right! thanx nogdog.