Questions tagged [slim-3]

Slim 3 is the successor to Slim 2, a micro framework for PHP.

Resources

Related tags


For the Ruby template engine use instead.

421 questions
-1
votes
1 answer

Recieving a 405 error, Method not allowed, when using a form to get data from the client

I'm Using the Slim framework and trying to get a basic form up and running with some php scripting. Index.php contains a form that when submitted will execute a second php script called request_variable.php, which will output the contents of the…
digitalXmage
  • 23
  • 1
  • 7
-1
votes
2 answers

API doesn't allow text

I've just created a simple API for a CAD/MDT I'm working on, I've managed to get it to show the correct information when I do /citations/userid/1. This will then display all the correct values from the SQL database however, if I do…
-1
votes
1 answer

Pass Data between route in Slim

I am new to slim and I want to pass Data between two routes (apps) $app->get('/answer', function (Request $request, Response $response) use($talk,$voiceName,$message){ // submit this data $request =…
-1
votes
2 answers

Slim Api Using $settings $logger and $db in __construct from dependencies.php in a Model function

Good morning How Can I use $settings $logger and $db in __construct from the $container in dependencies.php in a Model function in a Slim Api? I have the following setup for my Slim framework Api: settings.php (has $settings $looger and $db in…
j00ls
  • 95
  • 2
  • 14
-1
votes
1 answer

Pachico Slim/swoole and Eloquent ORM

i have setup the below library: https://github.com/pachico/slim-swoole but when I try to run a query with Eloquent ORM I can not, it takes to much time until it gives an error I understand that I can not use PDO with async framework but how can I…
Ratchet
  • 223
  • 1
  • 5
  • 13
-1
votes
1 answer

CORS errors on REACTJ + SlimPhP

I'm having some issues with an Api in PHP, all tests on postman have passed, but when i'm trying to integrate it with my ReactJS api, ONLY on POST route to login, it is sending me a CORS error Cross-Origin Request Blocked: The Same Origin Policy…
-1
votes
1 answer

Slim 3 double output using own view file

In spite that I am very new to the Slim 3 framework I'm using it for a small project (API) and it works fine except for the double output that I'm getting back and it's making me crazy! I'm suspecting that htaccess is calling the index.php file…
-1
votes
1 answer

PDO does not throw exception

I know this question has been there many times, but no answer works for me. My PDO just doesn't throw any error... or something catch the error before me. I'm quite new to php, and I hate to not understand simple things. Here's my initialization…
Martin
  • 11,881
  • 6
  • 64
  • 110
-1
votes
1 answer

how to make a file using fopen() fwrite() in slim 3

i have an application where i upload a xml file then it is coverted into json where the json file is being created inside the controller using fopen(), fwrite() php functions. my problem is i keep having a problem on making the json file. i dont…
Emil Kitua
  • 59
  • 8
-1
votes
1 answer

Slim 3 response withRedirect

I'm trying out slim responses object and redirect feature, i have routes and controllers like this : routes : $app->get('/', 'index:index')->setName('index'); in my controller i have this line : return…
jsn alf
  • 43
  • 2
  • 10
-1
votes
1 answer

How to extract CouchDB cookie from Httpful response object in PHP?

I try to authenticate a user via a RESTful API in combination with CouchDB and Httpful. The client sends the credentials of the user to my server and the server forwards them to the CouchDB server. When I var_dump the response, I can see that the…
Magiranu
  • 299
  • 4
  • 27
-1
votes
1 answer

How to set multiple header value in Slim Framework 3 to a web service with api key?

I'm new in Slim Framework 3. I have a problem to accessing web service that has a Api Key header value. I have had a Api Key value and wanna access the web service to get JSON data. Here is my slim get method code: $app->get('/getbooking/{id}',…
Agung
  • 43
  • 9
-1
votes
1 answer

response->getBody() is empty in slim3 php framework

I'm having trouble with this slim3 php code. On function createErrorReponse function, $response->getBody() is null or empty. Php complains the following error below. As you can see the getBody() size is empty and hence write won't work on it. The…
Prasana Ramesh
  • 97
  • 3
  • 11
-2
votes
2 answers

does Slim framework have URL encoded annotation for POST method?

I'm developing a web RESTful API using slim framework of php.I want to know how do I add some annotation type thing on POST method so that it can behave as URL encoded method.Please help me in this regard.Advance thanks.
Asad Yasin
  • 93
  • 10
-2
votes
1 answer

php slim framework response wait issue

I developed an API using a the Slim framework. On JavaScript side two APIs are called asynchronously. One call is taking too much time and one takes less. But the response is coming after the one that takes long ends. Is any issue related slim…
Anish Chandran
  • 427
  • 1
  • 5
  • 19
1 2 3
28
29