Closed
Description
Description
The following code:
<?php
// Connect
$conn = pg_connect("dbname='somedb'");
// Send a postgres sleep query (or anything long running query)
pg_send_query($conn, "SELECT pg_sleep(5)");
// Set PHP max execution time less than above
set_time_limit(2);
// Waiting for query to complete (but fails and error is shown)
$res = pg_get_result($conn);
// Never printed
echo "OK";
Resulted in this output:
PHP Fatal error: maximum execution time of 2 seconds exceeded
But I expected this output instead:
OK
PHP Version
8.3.8
Operating System
Gentoo Linux