Skip Navigation
Expand
Include paths for custom process object event handler scripts
Answer ID 6707   |   Last Review Date 07/08/2019

Why is my include not working in a custom process script?

Environment:

Process Designer, Custom Process Model (CPM) / Service Process Model (SPM)
November 2012 version and newer

Resolution:

Long include paths can be problematic. The include path is in the .cfg directory and this can cause problems with all sorts of external includes. Including other PHP files may result in a 'not found' error in init.phph or mod_info.phph.

You can fix this problem by altering the include path in this manner:

$path = "/cgi-bin/" . $intf_name . ".cfg/scripts/custom";
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

NOTE: The $intf_name should be set to the name of the current interface.

For further information on this topic see Answer ID 10377: Asynchronous CPM customizations triggered on one interface can run on any enabled interface