php - How to get Apigility working correctly? -
i working on installing apigility on linux web server. shared hosting account inmotion hosting. using instructions @ https://apigility.org/documentation/intro/installation. easy install, running syntax error can't figure out.
parse error: syntax error, unexpected 'class' (t_class), expecting identifier (t_string) or variable (t_variable) or '{' or '$' in /home/amlcon5/public_html/websites/dev/apigility/vendor/zendframework/zend-servicemanager/src/servicemanager.php on line 281
here function servicemanager.php error is.
/** * set factory * * @param string $name * @param string|factoryinterface|callable $factory * @param bool $shared * @return servicemanager * @throws exception\invalidargumentexception * @throws exception\invalidservicenameexception */ public function setfactory($name, $factory, $shared = null) { $cname = $this->canonicalizename($name); if (!($factory instanceof factoryinterface || is_string($factory) || is_callable($factory))) { throw new exception\invalidargumentexception(sprintf( 'provided factory must class name of factory, callable or instance of "%s".', factoryinterface::class // <--- error here )); } if ($this->has([$cname, $name], false)) { if ($this->allowoverride === false) { throw new exception\invalidservicenameexception(sprintf( 'a service name or alias "%s" exists , cannot overridden, please use alternate name', $name )); } $this->unregisterservice($cname); } if ($shared === null) { $shared = $this->sharebydefault; } $this->factories[$cname] = $factory; $this->shared[$cname] = (bool) $shared; return $this; }
i have tried several things, such as: reinstalling using other methods, disabling opcache, , reviewing config files.
has experienced when setting apigility or know how fix this?
turns out wasn't date on php. updated php5.5 , worked.
Comments
Post a Comment