I come across the situation occasionally where I am trying to submit a form programmatically with javascript, but it happens to contain a field with an id
or name
attribute of submit
.
solution posts
Automatically reconnect PDO when connection times out
In PHP scripts that run queries to a MySQL database over a long period of time, the connection may time out and give a “MySQL server has gone away” error.
Continue reading post "Automatically reconnect PDO when connection times out"Symfony router: check for match on different host
I found myself wanting to check if a given URL path exists on another host of a multi-host Symfony application from within a controller action. The router service, which is the instance of Symfony’s routing component used to route requests to actions, has a match()
method, but it only accepts the path part of the URL. It also has a matchRequest()
method, but that seems to ignore the HTTP_HOST
and SERVER_NAME
of the passed Request
object.