0

I have a TYPO3 extension providing a scheduler task (extension scheduler 6.2.0). In this task I have following strage problem:

private $svm;
...
$this->svm = new \SVM();

When this line is executed during task execution (started from cron job) program hangs up and does nothing. No exception, no error. It is just waiting for something.
If this line is executed within extension - an object is created.
If I start scheduler task manually in TYPO3 back-end - an object is also created.

It looks like during CLI execution class SVM is unknown. But then there should be an error...

1 Answer 1

1

If the class SVMis unknown, an error would occur and nothing would wait. I propose that you debug that and check, e.g. with class_exists($this->svm) if this class exists.

Without knowing more it is hard to help more.

Sign up to request clarification or add additional context in comments.

6 Comments

OK. Function call class_exists(\SVM::class) gives TRUE back if called within extension. It gives FALSE back if called within scheduler task. To tell you the truth I don't know what info could be useful at this point.
How does the require_once looks?
The same thing occurs for extension_loaded('svm') - within extension it is TRUE, called from task - FALSE. require_once needs a path and svm is php extension. What path should I enter for extension?
In php.ini I have found extension=svm.so, so it should be loaded...
YEAH!!!!!!!!!!! That was it!!!!!!!!!! In /etc/php5/cli/php.ini svm.so was not activated. Since it is only in root access, I've used php -dextension=svm.so ... to load extension dynamically.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.