Jump to content

Recommended Posts

hi!

I'm trying to use xajax on my server but I get a weird error :

Fatal error: Call to undefined function phpdebug_print_backtrace() in /home/client/public_html/Bidup/admin/xajax/xajax_core/plugin_layer/xajaxEventPlugin.inc.php on line 1

 

for some reason it believes the <?php tag is part of the debug+print call.

 

code :

<?php

debug_print_backtrace();

 

The exact same files works perfectly on my local webserver.

I don't know what to do, please help xD

 

 

Link to comment
https://forums.phpfreaks.com/topic/231619-xajax-weird-error/
Share on other sites

for starters local and live/productions servers specially those you get from companies like media temple, host gator, godaddy (though they take the cake).. the settings on your local machine vs them are far different. Anyway.. looking at your code above the error make sense, if thats all the code there is, that to me at least says, that your calling to a function, that hasnt been rendered yet.

 

In otherwords an example:

<?php
$myVar = call_to_some_functionName();


include('all_myFunctions.php'); //this is the file that actually has the above function in it
?>

 

So your local dev might except that as most do as they run regardless in most cases depending on your servers config settings from php or otherwise.

But in the production/live dev. its more likely looking for this scenairo

 

 

<?php
include('all_myFunctions.php');

$myVar = call_to_some_functionName();
?>

 

 

hopefully this is the case, hopefully this helps ya out. this is only one of common errors, but most likely there of. Another is case sensitivity.. if the function name is all lower, all upper, or a mix of the 2 and you have it all lower in your code on your local dev. it may run there but wont on the hosting server..

Link to comment
https://forums.phpfreaks.com/topic/231619-xajax-weird-error/#findComment-1191882
Share on other sites

xajax is availlable here : http://www.xajax-project.org/en/download/

 

I use their test files.

 

so i use :

<?php
include './xajax/xajax_core/xajax.inc.php';

$xajax = new xajax();

$rqstAdd =& $xajax->register(XAJAX_FUNCTION, 'doAdd');
$rqstReset =& $xajax->register(XAJAX_FUNCTION, 'doReset');

// set the parameters
$rqstAdd->setParameter(0, XAJAX_JS_VALUE, 39);
$rqstAdd->setParameter(1, XAJAX_JS_VALUE, 571);

$xajax->processRequest();

function doAdd($a, $b)
{
    $response = new xajaxResponse();
    $response->assign('answer', 'innerHTML', $a + $b);
    $response->assign('reset', 'style.display', 'block');
    return $response;
}

function doReset()
{
    $response = new xajaxResponse();
    $response->clear('answer', 'innerHTML');
    $response->assign('reset', 'style.display', 'none');
    return $response;
}

 

I cant even create the Ajax object. gives me the weird error. I tried their support forums but its kinda dead :S

thanks for your time

Link to comment
https://forums.phpfreaks.com/topic/231619-xajax-weird-error/#findComment-1192326
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.