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

  • SEARCH
  • Home
  • 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 8327919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:16:28+00:00 2026-06-09T01:16:28+00:00

I have to move a system from one server to another, and I’m coming

  • 0

I have to move a system from one server to another, and I’m coming across an error when trying to access this page. The code is exactly the same as the live, working system, yet it doesn’t work now for some reason.

JS Code that pulls up the error:

var loadData = function(data) {
if(data)
    data += '&offset=' + offset;
else
    data = 'offset=' + offset;

var callback = {
    success: function(o) {
        try {
            var data = YAHOO.lang.JSON.parse(o.responseText);
        } catch(e) { alert('e: ' + e + '\no: ' + o + '\ndata: ' + data + '\noffset: ' + offset + '\n Response Text:' + o.responseText); }

        // removed a lot of pointless code (no error here)
}

YAHOO.util.Connect.asyncRequest('POST', 'json/dmrlist.php', callback, data);
}

This is printed out from the alert:

enter image description here

This is the (start of) the php code that it is “calling”, yet there is an error as seen on the screenshot.

line 6: $JSON = json_decode($_POST['JSON']);

line 8: if($JSON->Depot)
line 9:     $filter = " AND `Site` = '" . $JSON->Depot . "'";

Basically, $JSON is undefined, which means nothing is posted, but it looks like the javascript is meant to be posting the information to it?

I’m so confused, I have no experience with JSON or javascript, and can’t figure out why this won’t work.

  • 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-06-09T01:16:29+00:00Added an answer on June 9, 2026 at 1:16 am

    The data variable is going to be sent to the server, but probably just as key/value pairs. You can try dumping them out like:

    if (isset($_POST['JSON'])) {
        print_r($_POST['JSON']);
    }
    if (isset($_POST['Depot']) {
        print_r($_POST['JSON']);
    }
    

    Or just
    print_r( $_POST );

    I suspect that $_POST[‘JSON’] is not set and you probably don’t need to decode the other values as JSON as they are probably just key/value pairs that you can read straight from the $_POST array, but I’m not familiar with YUI’s ajax functions so I could be wrong – check the values on the server.

    P.S. Using the print_r this way will result in invalid return (it won’t be JSON), but you will be able to look at it in Firebug, etc. and see the values.

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

Sidebar

Related Questions

I am trying to move a WordPress installation from one server to another one,
I have a problem. I ma moving a system from one server to another
i have a process to move rows from one database to another. Because of
A program we have erred when trying to move files from one directory to
We have one SAP system in the US (let's call it TKIJVPL1 ), this
I am attempting to move some code from one VS2008 project to another. The
I have to move a file in the system32 folder, I used this code:
I have to move Ant image from top to bottom. On touch, Ant Image
There is one image on LinearLayout. I have to move that image in any
I have this code to move my uploaded file to a specific directory: if

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.