Jump to content

Archived

This topic is now archived and is closed to further replies.

Jahren

xajax weird error.

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

 

 

Share this post


Link to post
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..

Share this post


Link to post
Share on other sites

I'm using the unedited files from xajax. I dont change anything, I just try to use their own test files and it doesn't let me.

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×
×
  • 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.