variable "_method" is not defined in s3demo.php - fine-uploader

I am using fine uploader. for the server side handling using s3demo.php,(downloaded from github).
But while sending response to this file, there are error that, $_POST['_method'] is not defined.
can any body give me solution for this problem ?

Related

Part of the HTTPS response is changing on every session

I have a HTTP response code. A part of it was changing with application upgrade, so I have created a variable for this and changing the variable after each upgrade and so that it will be automatically updated throughout the JMeter script.
Language|aB5U0Easj5xXnirzSu4eYyOxICkTU9uEgH4TPx/A++/hc6XBB3sgFdHmvXLriQxFq9RCj4T1Zq+fvzXouImGRIc93NkzkPUEMR1xqwMipVw4A4jJRruIBoLQ6SnP6JfOM3O7M0fV2bhJEHuRAoI04WmYI5eRfNCZhvG9e6Ye9h/8qyk8YRCMRfSjqaA1aZKAXPv1yYPFYXej+WDAt8L82LY/jW3URLc7LLDz/da87CZi3MLJgwRJvjhwB1fBu1Wp4mIR0e79ipNeGJyYY7ADxir0r9cYP611NTj+WF4tR5P7/epeDgexHXpuI/o2+q+vaALUn4+QikI+8KtSi5zE0g9oMJ39o/MIWpJIRAr0p4WmUoROB+6nTyNPG0MZaxKkuboD/7c/mdWzDOeB4eBOljGQpwg1PB53eWrSQJ8Gf7utR05sMOe87worG8lm34oAVlU/H32JzY82ig==
The above is the part which is changing and I have created a Variable as Language. And everything is fine till now.
Now, I am facing a new problem after upgrading my application. This variable is changing with every new login, because of this was unable to run the load test. It is giving me the following error.
java.lang.IllegalArgumentException: Error while decrypting message, close tab or re-login
Can someone came across similar issue or if anybody has some idea how to solve this. Please help me !!
So basically you are doing what is known as a "Correlation". The error you are getting is mostly related to correlation. when you are replaying the script, you are using dynamic value from the recording script which is expired.
Check the following:
Have you replaced all the changing values in the scripts with your variable? Maybe you
missed some parts. Some values could be in a request url or in a body data of a Post
request.
Check for other values that are changing, sometimes you will have many values to be
correlated, not just one (ex. JSessionID, CSRF token and ...)
What tool you are using to search for dynamic values and their locations? You can use
JMeter response to check for dynamic values but it is easier if you use Fiddler or if
you know LoadRunner, you can use its scripts comparison capabilities.

Custom error handling

I am developing a component in joomla 2.5, my component sends a request to some url and gets the response object. If i pass wrong url, joomla takes me to the default page of Error : 500 - No response code found . I want that if user install my component and mistakenly they put wrong url , it should show some custom error message/page which should more meaningful to non-programming person rather than taking user to default error page. Is there some way to add this type of functionality in Joomla without editing template/error.php file in core.
You should have an error.php file in your template, if you don't add one and make it look the way you want. also remember that when you turn debugging off you won't get the stack trace etc.
However error 500 indicates something different than that the url does not exist ("wrong URL"), which would be a 404. 500 is an internal server error and you need to check your logs to figure out what is causing it.

Got "parsererror" when trying to using Ajax call REST Service

I have been puzzled by this question for almost a week and still not able to get it solved.
The problem is while using JS Ajax calling a REST GET method, but I always got
parser error
However it's working fine for Firefox's REST Client
Check the Code here.
The URL http://wally.pythonanywhere.com/test/ is not producing a valid JSONP. Valid JSONP response should look like your json data wrapped in a function invocation. Visit JSONP doc for more details.
The actual error your code facing is "jQuery18308228800671640784_1374132969407 was not called". This is because of the invalid JSONP response.

How to debug a failed ajax request in google chrome?

I have a web application that crashes on ajax requests with google chrome (it works with every other web browser it was tested it). After debugging I found that the error is caused by response.responseText being undefined. The xhr object looks like this:
argument: undefined
isAbort: false
isTimeout: undefined
status: 0
statusText: "communication failure"
tId: 3
In debugger in the 'network' tab I get "(failed)", however all the headers are there and I can even copy into clipboard the response body (which is a valid JSON).
My question is - how can I debug this problem? Where to find additional information, what causes this request to fail?
I finally found the solution to my problem : AdBlocks, when it blocks an ajax request, it just says "communication failure".
The first thing I would double-check is that the data coming back from the response is valid JSON. Just pass it through a JSON validator like this online JSONLint: http://jsonlint.com/
I assume that you are using something like jQuery to make your AJAX requests. If so, then make sure that you are using the development version of that library. Now that you are using the development version (uncompressed) of the script, find the particular function that you are using (eg. $.ajax) and then, within the Chrome inspector, insert a breakpoint in the code where the AJAX response is first handled (eg. https://github.com/jquery/jquery/blob/master/src/ajax.js#L579). Then proceed to step through the code, inspecting various return-values to see exactly what is going wrong.
If you are not using something like jQuery to make AJAX calls, then I'd recommend using a framework to avoid possible cross-browser compatibility issues like you might be experiencing right now.

4xx Response from server doesn't include JSON data

I've got a .NET MVC site that uses JSON to perform AJAX form Posts. If a validation error occurs (ie user misses a required field etc), then the server returns the validation errors in a JSON object and sets the HTTP status code of the response to something in the 400 range. On our local machines, this works absolutely fine.
However on our CI environment, it has suddenly stopped working, without any code changes. The response comes back from the server with the correct HTTP code, but the content is not the JSON our controller returns, but the standard .NET error page HTML, ie just the 11-byte 'Bad Request' response if the status code is 400.
The error code is correct for each validation error, so we are hitting the right controller/action, and the validation is working correctly, but for some reason our JSON is getting snipped out. Any ideas why this might be happening?
You are getting 400 code because your request syntax in not correct. Check if you have actually encode json data correctly or not.

Resources