[User Error] Uncaught ReflectionException: Class {Classname} does not exist

Silverstripe Version: 3.7.3

I’m having issues with a instance of Silverstripe on a PLESK server, I believe it is a configuration issue as a few pages work, however some classes are throwing exceptions as shown below.

The same code works on a dev server, and I’ve had to work on a few items to allow the site to work as it does currently, open_base_dir, is there an obvious configuration option missing to ensure the classes work, they do exist, and run 100% on a dev server. I’ve checked all the PHP modules and everything appears to be as it should from that perspective. Is there a location
/dev/build?flush=1 runs successfully and displays the classes shown in the exception.

[User Error] Uncaught ReflectionException: Class {Classname} does not exist

5 /**
6  * A class for creating new objects by the injector.
7  *
8  * @package framework
9  * @subpackage injector
10  */
11 class InjectionCreator implements Factory {
13 	public function create($class, array $params = array()) {
14 		$reflector = new ReflectionClass($class);
16 		if (count($params)) {
17 			return $reflector->newInstanceArgs($params);
18 		}
20 		return $reflector->newInstance();

The issue here was PHP had short tags disabled on the new install and some classes required to allow the above to function properly. Enabled the option and everything worked as expected.

If it’s your code, it’s probably worth change the short tags to the full version (<?php) just to ensure portability. Fewer servers seem to have short open tags enabled, so you don’t want to have to go through it all again if you need to move.

If it’s module code, a kind word to the module author would probably be good for the same reasons.