changed parameter retrieval to avoid PHP notices when they do not exist
only apply max_execution_time setting if the execution time is increased
fixed query: according to <http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rSelectClause>, a comma is not allowed between variables