mevdschee/php-sp-api

500 Internal Server Error

Closed this issue ยท 8 comments

Dear Maurits,

I tested the API on my 'localhost' server. It worked perfectly!

When running on my web server I get the following error:
'500 Internal Server Error'

I did some testings.
I've the impression that following code causes the error:

$values = array_map(function ($value) use ($link) { if ($value===null) return null; return mysqli_real_escape_string($link,(string)$value); },array_values($input));

Dou you have any idea what's going wrong?

Thanks for your advise.

Thank you for reaching out and your kind words.

Please report the PHP version you are running and, if possible, post the errors from the error log or enable error reporting using error_reporting(E_ALL);, see http://php.net/manual/en/function.error-reporting.php

With some actual error messages finding the cause will be much easier.

Thank you for your reaction.

PHP Version 5.2.17

No error messages from PHP
See attached file for the browser Error.

I've also tested the API with 'Postman' => '500 Internal Server Error'

chromeerror

Unfortunately PHP Version 5.2.17 (Released: 06 January 2011) is not supported (and I would also advise against it for security reasons), please upgrade to 5.3 or higher.

I've no control over the PHP version running on the server.
I'm wondering if my hosting provider will upgrade his PHP on my advise.

But thanks for helping me.

This is a great tool, I'll still using it on my 'localhost' (hoping for an upgrade in the near future).

Have a nice day Maurits.

You host with stone-is.com right? What product do you have? Is it a cloud server? I'm pretty sure they would love to get rid of a security threat like that, just ask them.

OK, I just opened a 'ticket'. Waiting for a resonse tomorrow.

Keep up the good work!!!

You are welcome, feel free to open a new issue if you run into problems on a supported version.

I migrated my code to another 'subdomain' on the same server but with PHP 5.3 support.
Problem SOLVED.
Thx again for your support.