fsgale Posted April 11, 2011 Share Posted April 11, 2011 Here is the code: <?php if (!defined('INCLUDE_GUARD')) { header("Location: /errors/forbidden"); return; } include_once("incs/cls/DatabaseManager.class.php"); include_once("incs/cls/VariantTemplate.class.php"); class Core { private $_logger; private $_self_test_results; private $_config; private $_dbmgr; private $_vtemp; public __construct() // this is line 19 { $this->setupLogger(); $this->_self_test_results = array(); $this->_self_test_results['missing'] = array(); $this->_self_test_results['failed'] = array(); $this->_config = array(); $this->_dbmgr = null; $this->_vtemp = null; $this->selfTest(); } Here is the error I've been receiving. Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /home/ditecha1/public_html/slick/incs/cls/SlickCMSCore.class.php on line 19 I am finding this error extremely weird, my host uses PHP 5.2.14. I was setting the private variables directly (without the assistance of the constructor), but I removed this and had the constructor set basic values to start with to see if this was the issue, but it wasn't. I've tried commenting out the include_once lines, since they are also in development I thought maybe an error was being carried over in to this file as the includes were happening, but still no change in the error message at all. Any help would be greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/233368-php-error-i-just-cant-figure-out-deals-with-classes/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 11, 2011 Share Posted April 11, 2011 You are missing the function keyword - public function __construct() Quote Link to comment https://forums.phpfreaks.com/topic/233368-php-error-i-just-cant-figure-out-deals-with-classes/#findComment-1200079 Share on other sites More sharing options...
fsgale Posted April 11, 2011 Author Share Posted April 11, 2011 REALLY?!?! Here I was thinking the constructor/destructor of a PHP class didn't require that keyword. If this solves my problems I might just have to find a brick wall to beat myself with, thanks though if it does! lol Quote Link to comment https://forums.phpfreaks.com/topic/233368-php-error-i-just-cant-figure-out-deals-with-classes/#findComment-1200081 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.