HTTP 500 Internal Server Error with special signs URL - laravel

I have developed a Laravel API for my SPA. Sometimes I'm using query parameters to provide data to the API. But if there's an # sign inside the API URL the server responds with a 500 - Internal Server Error. Example...
Here I will get the error:
http://www.mywebsite.com/api/user/login?name=example.user#gmail.de&password=changeMe
Here everything works fine:
http://www.mywebsite.com/api/user/login?name=exampleUser&password=changeMe
Locally both ways are working. But when tested on the live server the error occurred.
Does anyone know what the problem is? I'm using an Apache Server with Plesk, if it helps. ;-)

Ok, I've solved the problem. If someone else has the same error:
Just set the server-sides default charset to utf-8 fixed that problem!

Related

Version 4.0 localhost testing getting 3228 : The ThreeDSNotificationURL field format is invalid

I am currently testing the changes for version 4.0 of the protocol for PSD2 using Direct Integration.
I am running under Visual Studio using a localhost website address.
When calling the SagePay payment endpoint with ThreeDSNotificationURL set as a localhost address (http://localhost:15536/Payments/ThreeDResponse) I receive the following error '3228 : The ThreeDSNotificationURL field format is invalid.'
If I change this field to a fully qualified domain (http://www.google.com) I no longer receive the error, but can't complete my testing.
Using localhost for the termurl in version 3.0 of the protocol works as expected.
I was attempting to work locally like your self and receiving the same issue. After speaking with support they confirmed that they will not accept "localhost". Also, the documentation suggests that HTTPS is a requirement, so this might also be a blocking factor.
I think someone suggested using ngrok as a means of tunneling external requests into your localhost, which is a good method to continue development locally whilst also being visible externally to services like SagePay.
Once I got passed the above issue, I got several more errors for other missing required fields as listed here; https://www.sagepay.co.uk/support/38/psd2-under-direct-integration (note that if BrowserJavascriptEnabled is true all conditional fields are then required)
Did you URL encode the ThreeDSNotificationURL in your post?
I send it like that and it is ok:
sb.Append(HttpUtility.UrlEncode("https://www.clientdomian.com/ac/ThreeDSNotificationURL.aspx"));
I run the site on my local IIS for development.
I recently had this issue and I wanted to document it here, because searching for this issue gives very little in terms of results.
I was getting this error code when i switched my Opayo/SagePay extension (MageNest SagePay for Magento) to 3ds2.
As it turns out, the full URL wasn't being sent. It was trying to send sagepay/direct/postBack?form_key=HZuYxgiEq9w2CNFB and NOT https://www.example.com/sagepay/direct/postBack?form_key=HZuYxgiEq9w2CNFB. It's partly my fault because there was a domain field in the config which was empty (it's not like the domain can't be retrieved automatically, huh) and partly the vendors fault because it was very badly documented.
So while this is a different problem for a different platform, I hope this helps someone.

Deploying laravel app on Fortrabbit - 403 internal server serror

I followed the setup to deploy laravel app on fortrabbit but now I am stuck with this error:
Error 403
Internal server error
Overload: More requests than the App can handle.
A script stops with an error. Are your config files up to date? Maybe turn on debugging to trace the error.
There is an error in the .htaccess file.
Something else. Please check the fortrabbit status.
I have checked the configurations but I keep find a cause for that or even a solution for this issue.
That's not really a good question to post her on StackOverflow. It's too specific - probably App- or even service-related. For such cases: please try customer support.

socket.io 1.0 error: ERR_NAME_NOT_RESOLVED

I have a node.js server using socket.io. The idea is to allow two different html files to communicate information to each other through this server. All was well with socket.io ver0.9.16 until ver 1.0 came out. Now, I receive a few errors on both the client and server side, the most apparent (to me, since I am new to this) is the ERR_NAME_NOT_RESOLVED error that I find when I start up the locally hosted server.js file and attempt to connect to it through the client html.
When I open the console in Google Chrome, I find this error which prints again to the console every second or so:
GET http://file/socket.io/?EIO=2&transport=polling&t=1406247171961-0 net::ERR_NAME_NOT_RESOLVED
What follows are snippets of places where I may have problems in my html and server.js files as well as in a js file that is used by my html file to connect to the server.
index.html
I think this bit of code gets the socket.io client code from the localhost server. This is the first place where I may think that I have a problem
<script src="http://localhost:4000/socket.io/socket.io.js "></script>
In addition, the following is where I import my index.js file which is used to connect to the server
<script type="text/javascript" src="scriptsTeacher.js" ></script>
-
server.js
This code (according to my sources) should set up a server on the localhost with port 4000 to which clients can connect and send/receive information
var io;
io = require('socket.io').listen(4000);
io.on('connection', function(socket)
{
console.log("user connected");
});
-
index.js
This code is used by the index.html which has it connect to a server listening on port 4000 using socket.io.
var socket = io.connect('localhost:4000');
-
Currently, there are two blatant errors that I can find. They are probably not the root of the problem, but they are as far as my limited debugging experience can take me.
ERR_NAME_NOT_RESOLVED: (NOTE: I have looked at socket.io ERR_NAME_NOT_RESOLVED and it was not entirely useful since that user had a typo by using http:\\ instead of http://). As stated before, when opening index.html in Google Chrome and accessing the console, I receive multiple ERR_NAME_NOT_RESOLVED errors.
There is no "Welcome to socket.io" message when accessing localhost:4000 I am certain that there should be such a message. Note that there is no 404 error, when I start up the server, I can access that webpage, but it is blank. If the server is not running, then I do get a "Webpage not found" message.
My question is this: Is there anything that I am not doing but should? As I said, I am new to this, and after some hunting around on the internet, I have a suspicion that there is some server (HTTP, Express, Express 3/4?) that I am not establishing. However, it is of note that the code worked as is in ver0.9.16 (using the .socket() and .listen() functions which were removed from my code for migration to ver1.0). If there is any information that is missing, I will do my best to provide it as soon as possible.
-
I am using:
Macintosh OS 10.6.8
Google Chrome version 36.0.1985.125
socket.io ver1.0
node.js v0.10.29
The address in the error is wrong (assuming you haven't set up a local name resolver).
The address in the error begins with:
file
When it should begin with something like:
localhost:4000
The issue is probably in some of the js-config files for the web application (not the server). Or maybe you're trying to access the file locally (eg. just open the html-file in the browser) instead of typing the address localhost:4000.
I had the same problem that running file in the browser:
eg.
"file:///C:/apppath/index.html"
Try running from the server
eg.
"http://your.app:4000/index.html"
I had the same issue - I wasn't able to connect to my socket.io server through my client on the same machine on mac. I disabled the firewall and it resolved the issue. I guess we could use xhr-polling instead and overcome this.
Vikram
I ran into a similar problem, but the solution to my problem had nothing to do with CORS. In my case, which is a Cordova 4.0.0 app using socket.io, I was using an incorrect URL for the socket server. I was using a socket server URL like this:
//socketserver.example.com:8000
This worked fine in the desktop Chrome browser, but in the Cordova webview on the phone or emulator there were many errors regarding failed GET and POST requests to a URL that started with
http://file/socket.io
The correct URL in my case turned out to be:
http://socketserver.example.com:8000
Note the complete scheme at the beginning of the URL.

magento-shipworks: the remote server returned an error (405) method not allowed

I am trying to connect Magento with Shipworks, for that i have downloaded shipworks3.php file which is required for the integration,
and i have put the file in the c://wamp/www/magento/shipworks3.php, that time Shipworks giving me message that it requires SSL required, to resolve that i made my apache SSL enable using IIS7, so it will use the https:// url ,
error resolved that time but got new error, about
the remote server returned an error (405) method not allowed
I have searched a lot but found nothing, can anyone sort it out,
Thanks in advance.

500 - Internal server error. IIS 7 using classic asp

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Now showing error res-one. Please, how can I debug this asp classic language in PC?
Thanks!
Try to restart ISS, check paths, full reload page (Ctlr+F5)...
If you can, turn on logging in IIS and then check the log after you receive the 500 server error. Also, you can try using the FireFox browser, sometimes it will tell you which line of your code is having a problem.

Resources