# undefined function in PHP



## thedon (Mar 13, 2009)

I'm having a problem using this function, which according to what I have seen on the web, v5.2.9 should have it. Has anyone seen this before? 

> php -f plugins/npc/perfdata.php

Fatal error: Call to undefined function spl_autoload_register() in /usr/local/share/cacti/plugins/npc/config.php on line 8

> php -r "spl_autoload_register ( ) ;"

Fatal error: Call to undefined function spl_autoload_register() in Command line code on line 1
> php -v
PHP 5.2.9 (cli) (built: Mar  9 2009 16:39:57)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


----------



## gilinko (Mar 14, 2009)

You either don't have the spl.so module loaded or compiled. Check your extensions file and the phpinfo() command to verify if you have it enabled or not.


----------

