Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4621922
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:46:16+00:00 2026-05-22T02:46:16+00:00

How can I pass script execution errors to the XMLRPC response so I don’t

  • 0

How can I pass script execution errors to the XMLRPC response so I don’t get a Fault Exception?

Maybe I’m not setting this up right:

In the XMLRPC server I’m adding Zend_XmlRpc_Server_Fault::attachFaultException('Exception'); like this:

Zend_XmlRpc_Server_Fault::attachFaultException('Exception');
$server = new Zend_XmlRpc_Server();

But I still get a Fault Exception:

Fault Exception:\n651Failed to parse response

How can I pass the script execution errors to the response?

I’ve also tried to set this with no luck:

error_reporting(E_ALL); 
ini_set("display_errors",1);
ini_set("xmlrpc_errors",1);

Docs: http://php.net/manual/en/errorfunc.configuration.php

Example XMLRPC error when script has errors:

Fault Exception:\n651Failed to parse response

Example of when script has errors:

Fatal error: Call to undefined method

Both are from the same script error, but I need the XMLRPC to display the Fatal error message in the response instead of giving the failed to parse response.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:46:16+00:00Added an answer on May 22, 2026 at 2:46 am

    You can use the set_error_handler() function to intercept a script error and instead throw an ErrorException:

    function exception_error_handler($errno, $errstr, $errfile, $errline ) {
        throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
    }
    

    So when you call Zend_XmlRpc_Server::handle():

    set_error_handler('exception_error_handler');
    $server->handle();
    restore_error_handler();
    

    Edit: Example #1 from the ErrorException page is wrong. Use the version in this answer instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can pass back output of the executed script, but I get no error
I'm working on a Perl script. How can I pass command line parameters to
Can anyone spot why the following script is not printing the passed arguments? import
I'm trying to understand how my PHP script can pass an array to my
Does anyone know if I can pass data from flash (action script) to java
How can I pass a variable to a php function inside a Bash Script?
You can pass a function pointer, function object (or boost lambda) to std::sort to
Using logparser you can pass on parameters to the query you'd like to run
I was wondering how I can pass either an ArrayList, List <int > or
In a vxWorks Real-Time process, you can pass environment variables as one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.