One of our servers started throwing the following stacktrace:
uncaught exception: Class String could not be loaded
in file: /path/to/haxe-php-lib/lib/php/Boot.class.php line 751<br />#0 [internal function]: spl_autoload('String')
/path/to/haxe-php-lib/lib/php/Boot.class.php(751): property_exists('String', '__meta__')
/path/to/haxe-php-lib/lib/php/Boot.class.php(857): _hx_type->__construct('String', 'String')
/path/to/NativePHPUtil.php(334): require_once('/path/to/haxe-php-lib/include.php') //include.php is basically `require_once dirname(__FILE__).'/lib/php/Boot.class.php'; restore_exception_handler();`
[internal function]: NativePHPUtil->addRecord('record-name', 'record-type', Object(stdClass))
/path/to/NativePHPController.php(244): call_user_func_array(Array, Array)
/path/index.php(89): NativePHPController->handle()
{main}
Function from Boot.class.php line 751 [1]:
public function __construct($cn, $qn, $path = null) {
$this->__tname__ = $cn;
$this->__qname__ = $qn;
$this->__path__ = $path;
if(property_exists($cn, '__meta__'))
$this->__meta__ = eval($cn.'::$__meta__');
}
This just started happening on my testing server (PHP 5.3 on Debian) a few days ago but everything runs fine on my production server and both servers are running the exact same code! There were no obvious changes to prompt the issue and I've tried pulling down a fresh copy from Git, copying it over manually, fiddling with permissions, and turning off code removal for the PHP build.
Simply commenting out the if statement appears to fix everything, but that's a crappy hack. Any guesses as to what might be causing the problem?