Site icon Hip-Hop Website Design and Development

Utilizing plugin performance in exterior php script not working

I’m encountering an odd drawback which I could not resolve up to now.

I am calling a .php script by way of cronjob (Debian/GNU Linux).
To make use of wordpress functionailty I added:

outline('WP_USE_THEMES', false);
require( '/full/path/to/wp-blog-header.php' );

Now database queries and default wordpress performance all works high-quality, however I additionally name some features supplied by a plugin (particularly superior customized fields, the issue nevertheless impacts different plugins in addition to I examined) the next php error is returned:

PHP Deadly error:  Name to undefined perform update_field() in executed.php on line 24

Which tells me that the perform of that plugin has not been included.
So it appears to me that require wp-blog-header.php dies not embody plugin performance (which it did after I began to develop the talked about script, however now after I examined it, it produced an php error that).

Might or not it’s, that the three.5 improve of wordpress modified one thing right here? Or does anybody of you has some piece of recommendation for me as to why this drawback occures?
Thanks!

edit

I made additional exams. The issue appears to be, that I’m executing the php within the shell utilizing following command:

/usr/bin/php5 -q -d memory_limit=256M /path/to/executed.php

Thus sure variables will not be set like $_SERVER['REQUEST_METHOD']
Wordpress would subsequently give me warnings in debug-mode. So what I did is, I definied the DOCUMENT_ROOT variable, and included my perform.php (which was alos not loaded) manualy:

$_SERVER['DOCUMENT_ROOT'] = '/full/path/to/my/doc/root/';
outline('WP_USE_THEMES', false);
require( '/full/path/to/wp-blog-header.php' );
require_once( '/full/path/to/themes/mytheme/features.php' );

Now it’s working. But it appears to me as a mere unhealthy walkaround …