Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

parse error on phpws 1.6.3

Millie
2009-12-23
2013-05-20
  • Millie
    Millie
    2009-12-23

    I did the auto install from my webhosting provider and I am getting the following error:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/thetires/public_html/php/core/class/Core.php on line 28

    I have looked at the code, but I can't find anything wrong.  Here is the code around that line:

    class PHPWS_Core {

        /**
         * Loads each module's /inc/init.php file
         */
        public function initializeModules()           <-this is line 28
        {
            if (!$moduleList = PHPWS_Core::getModules()) {
                PHPWS_Error::log(PHPWS_NO_MODULES, 'core', 'initializeModules');
                PHPWS_Core::errorPage();
            }

            if (PEAR::isError($moduleList)) {
                PHPWS_Error::log($moduleList);
                PHPWS_Core::errorPage();
            }

            foreach ($moduleList as $mod) {
                PHPWS_Core::setCurrentModule($mod);
                /* Using include instead of require to prevent broken mods from hosing the site */
                $includeFile = PHPWS_SOURCE_DIR . 'mod/' . $mod . '/inc/init.php';

                if (is_file($includeFile)) {
                    include($includeFile);
                }

                $GLOBALS[$mod] = $mod;
            }
        }

    Can anyone help with this?

    PHP version 5.2.6
    PHPwebsite 1.6.3

     
  • I would bet the error is above that line, however I don't know how a parse error got in there.

     
  • nfdavenport
    nfdavenport
    2010-08-18

    I've got the same issue and given that this was asked 8 months ago without a response tells me everything I want to know about whether to use this CMS.  Whatever the problem is, the basic fantastico install doesn't work at Lunarpages.  Probably a php setting, but not worth the hassle to find the issue.

     
  • nfdavenport
    nfdavenport
    2010-08-18

    This is a version issue.  It parses fine in 5.2 which is required for later versions of phpWS.  I was thrown off by the OP who said they had 5.2.6.  I bet that wasn't the case.