0

So I am trying to create a search panel, about 9 search inputs, everything works well.

When I added 2 more inputs or select box, my Auth::user() becomes null, it logs me out, so the credentials are useless.

It seems laravel only accepts 10 GET parameters, it's weird.

Could any figure it out? I'm trying to tail the laravel.log seems not logging the error why it logs me out, I tried it many times but it's kinda weird.

lists? search[application.reference_number]= &search[application.status]= &search[customer.first_name]= &search[customer.last_name]= &search[customer.email]= &search[customer.tin]= &search[customer.job_position]= &search[company.name]= &sort=application.reference_number &order=desc &search[created_at_from]= &search[created_at_to]=

so when adding created_at_from and created_at_to it automatically destroy my session.

I guess laravel might be designed to accept only 10 GET parameters.

NosiaD
  • 587
  • 1
  • 6
  • 18
  • once those variables are populated, how long is that url? are you hitting the url size limit by chance? – castis Feb 14 '15 at 01:13
  • @castis, around 300 without search values, the normal search size i guess around 500 chars – NosiaD Feb 14 '15 at 01:19
  • 1
    yeah you're nowhere near the limit, strange. ill star it and see if anyone comes back with a good answer. – castis Feb 14 '15 at 01:21
  • http://stackoverflow.com/questions/7724270/max-size-of-url-parameters-in-get based from that it modifies a system configuration, however i want a better solution without modifying system config. – NosiaD Feb 14 '15 at 01:21

2 Answers2

0

As far as I know, there is no limit to the amount of GET parameters, as I have seen a project with 23 GET parameters (I was hired to rebuild from scratch). Try passing the variables through POST as you are limited to +- 2000 characters in a URL, but not in POST

EDIT

Try clearing your browser cookies and make sure the correct permissions are set for app/storage

Haring10
  • 1,517
  • 1
  • 19
  • 37
  • When i am using post, yes everything works well even adding 20 more params...however the weird thing is the GET process, while laravel automatically destroy my session without any error response, even tailing the laravel log. – NosiaD Feb 14 '15 at 01:53
  • Im always using incognito, yes the app/storage has permission to store views cache and more... – NosiaD Feb 14 '15 at 02:01
  • @daison12006013 well google says: `Incognito mode: You don't leave browsing history and cookies on your computer`, so maybe your issue is that the session is not being stored correctly? – Haring10 Feb 14 '15 at 02:06
  • I can see laravel_session, also cleared up did the same thing, still not working...i am able to login my project Nd able to do a CRUD with credentials for even 24hours online without destroying my session....ehile doing the search with multiple parameters if it exceeds to 10 it automatically destroy the session – NosiaD Feb 14 '15 at 02:16
  • @daison12006013 Any particular reason you want to use `GET`? – Haring10 Feb 14 '15 at 02:19
  • It is because the practical way to provide a search result is to use get process...instead of using post..check bing, google, yahoo,they are using get which it is the correct procedure... – NosiaD Feb 14 '15 at 04:38
  • @daison12006013 well that depends on a number of things. For instance, the user could edit the contents of the URL with possible SQL injection, etc. Just a thought... – Haring10 Feb 14 '15 at 07:04
  • It doesnt matter, we have prepared statement for that, so i am just focusing about the get process, or there might be a problem inside the laravel itself or some configurations tha i need to fix, for now ill wait for other members who experienced the same problem. – NosiaD Feb 14 '15 at 11:13
0

After a while, and calling back this problem, I did a test to other browsers such as Firefox, IE.

It seems Chrome Browser destroys the session when the header url is max to 500+ characters. The laravel_session was changed everytime I am using the form.

I'm using the latest Chrome Browser, and it seems that they really need to fix this kind of problem.

NosiaD
  • 587
  • 1
  • 6
  • 18