mirror of
https://github.com/cytopia/devilbox.git
synced 2025-04-12 13:27:50 +00:00
DVL-005 Using non-persistent pg connect to prevent HHVM core-dump
This commit is contained in:
parent
8295e1ac18
commit
6eea97f1be
@ -55,7 +55,7 @@ class Postgres
|
||||
|
||||
// Silence errors and try to connect
|
||||
error_reporting(0);
|
||||
$link = pg_pconnect('host='.$host.' user='.$user.' password='.$pass);
|
||||
$link = pg_connect('host='.$host.' user='.$user.' password='.$pass);
|
||||
error_reporting(-1);
|
||||
|
||||
if (!$link || pg_connection_status($link) !== PGSQL_CONNECTION_OK) {
|
||||
@ -126,10 +126,10 @@ class Postgres
|
||||
// Silence errors and try to connect
|
||||
error_reporting(0);
|
||||
if ($database !== null) {
|
||||
$link = pg_pconnect('host='.$host.' dbname='.$database.' user='.$user.' password='.$pass);
|
||||
$link = pg_connect('host='.$host.' dbname='.$database.' user='.$user.' password='.$pass);
|
||||
} else {
|
||||
// NOTE: using dbname=postgres prevents HHVM from segfaulting
|
||||
$link = pg_pconnect('host='.$host.' dbname=postgres user='.$user.' password='.$pass);
|
||||
$link = pg_connect('host='.$host.' user='.$user.' password='.$pass);
|
||||
}
|
||||
error_reporting(-1);
|
||||
|
||||
|
@ -455,7 +455,7 @@ debilbox_test() {
|
||||
|
||||
echo "log files"
|
||||
echo "------------------------------------------------------------"
|
||||
find log -type f -exec sh -c 'echo "{}:\n-----------------"; cat "{}"' \;
|
||||
find log -type f -exec sh -c 'echo "{}:\n-----------------"; cat "{}"; echo "\n\n"' \;
|
||||
|
||||
return 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user