Welcome Guest, Not a member yet? Register   Sign In
redirect() and db connection

When I started to do an auth with drop in folder protection, I took a look at redirect() to see what it needs to do a redirect.

And it does not close the DB connection, it just sends a header then calls exit().

I've searched for a shutdown_function, but I didn't find it, so it seems to skip the closing of the db connection completely.

Should it skip the DB connection closing, it doesn't skip it during normal requests (without redirect())?

I don't think the connections should be closed at all... If you are using permanent connection the idea is to keep them open after the execution finished, and if you aren't using it, the "link to the server will be closed as soon as the execution of the script ends", so closing the connection in the normal requests seems to be wrong and not keeping it open on redirect.

If my mind serves me right there were some problems with the pconnect setting, which might be explained by the fact that CI always closes the connection, no matter if it is a permanent one or not (correct me if I'm wrong).

Theme © iAndrew 2016 - Forum software by © MyBB