0

When i try use zend_eval_string (i make mini php extension), there are no extensions functions avaliable. There are also no errors reporting (if php code have fatal error program exit). What i must do to enable extension and show errors when it executes? I also found interesting value EG(no_extensions)=1; in zend_execute_API.c, but when i change this value to 0 problem not solving. I am newer of c++ and please, tell me how to solve this problem with example.

Sorry for my bad English.

1 Answer 1

1

Maybe help

int eval_php_code(char *code) {
    int ret = 0;

    zend_try {
        ret = zend_eval_string(code, NULL, (char *)"" TSRMLS_CC);
    } zend_catch {

    } zend_end_try();

    return ret == FAILURE;
}
Sign up to request clarification or add additional context in comments.

Comments

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.