glennn.php Posted January 27, 2010 Share Posted January 27, 2010 i'm using an older script which seems to be causing problems in PHP5... class tpl_Magic { private $directory; private $config; private $templates = array(); private $variables = array(); public function __construct($directory) { $this->directory = $directory; $this->templates['variables'] = array(); $this->templates['tplfiles'] = array(); $this->variables['names'] = array(); $this->variables['values'] = array(); } causing "unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' " at line 27... [ $this->directory = $directory; ] is there anything i can do with this to make it work? thanks Quote Link to comment https://forums.phpfreaks.com/topic/189999-__construct-in-php5/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 27, 2010 Share Posted January 27, 2010 What does a phpinfo(); statement show for the php version? It appears you are using a script that has php5 OOP syntax on a php4 system. Quote Link to comment https://forums.phpfreaks.com/topic/189999-__construct-in-php5/#findComment-1002406 Share on other sites More sharing options...
glennn.php Posted January 27, 2010 Author Share Posted January 27, 2010 oh - heck... ok. let me go check what version PHP i'm running. the site is hosted on godaddy, and i just assumed they're running 5... brb Quote Link to comment https://forums.phpfreaks.com/topic/189999-__construct-in-php5/#findComment-1002413 Share on other sites More sharing options...
glennn.php Posted January 27, 2010 Author Share Posted January 27, 2010 you're right. damn PHP Version 4.4.9 anything i can do? Quote Link to comment https://forums.phpfreaks.com/topic/189999-__construct-in-php5/#findComment-1002415 Share on other sites More sharing options...
PFMaBiSmAd Posted January 27, 2010 Share Posted January 27, 2010 ASSUME = To make an ASS out of U and ME In programming, if you are not 100% sure what something is you must confirm it. anything i can do? They likely have a method in place (check the FAQ section) to switch to php5. Quote Link to comment https://forums.phpfreaks.com/topic/189999-__construct-in-php5/#findComment-1002418 Share on other sites More sharing options...
SchweppesAle Posted January 27, 2010 Share Posted January 27, 2010 you're right. damn PHP Version 4.4.9 anything i can do? http://koduleht.eu/phptest/taketest.php?2 I'd recommend getting Godaddy on the phone though. There's no reason why you shouldn't at least have version 5 installed. Quote Link to comment https://forums.phpfreaks.com/topic/189999-__construct-in-php5/#findComment-1002466 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.