From 427b2bf9b23abdde603447724f022270b284f0c3 Mon Sep 17 00:00:00 2001 From: chriskl Date: Wed, 9 Feb 2005 11:26:17 +0000 Subject: [PATCH] timeout prevention from adrian nida --- CREDITS | 1 + HISTORY | 1 + INSTALL | 3 +++ dataexport.php | 5 ++++- dataimport.php | 5 ++++- dbexport.php | 5 ++++- display.php | 5 ++++- sql.php | 5 ++++- 8 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CREDITS b/CREDITS index d71ea0f8..18f9402f 100644 --- a/CREDITS +++ b/CREDITS @@ -49,6 +49,7 @@ Contributors - Oliver Meyer & Sven Kiera (Table icons link to browse table) - Bryan Encina (SQL window improvements, bug fixes, admin) - Dan Boren (Object comments) +- Adrian Nida (Fix time outs) Third Party Libraries diff --git a/HISTORY b/HISTORY index cf9dbe60..a9fb7a7b 100644 --- a/HISTORY +++ b/HISTORY @@ -15,6 +15,7 @@ Bugs * Fix export to work with release candidates and beta releases as well as finals (Russell Smith) * Fix port selection for local connections +* Fix timeouts on long running operations (Adrian Nida) Version 3.5.1 ------------- diff --git a/INSTALL b/INSTALL index 7a315d83..d2db06e6 100644 --- a/INSTALL +++ b/INSTALL @@ -34,6 +34,9 @@ phpPgAdmin Installation Guide Also, you will need to ensure that your 'pg_dump' and 'pg_dumpall' utilities are executable by the PHP process, if you want dump support in phpPgAdmin. + Lastly, if you run phpPgAdmin in safe mode, very long running imports, + exports and transactions may time out and be aborted. + 5. Enable the statistics collector in PostgreSQL. phpPgAdmin will display table and index performance and usage statistics if you have enabled the PostgreSQL statistics collector. To enable the collector, uncomment the diff --git a/dataexport.php b/dataexport.php index 9d4ca5d6..6f29571f 100644 --- a/dataexport.php +++ b/dataexport.php @@ -4,7 +4,7 @@ * Does an export to the screen or as a download. This checks to * see if they have pg_dump set up, and will use it if possible. * - * $Id: dataexport.php,v 1.17 2004/11/04 02:56:51 chriskl Exp $ + * $Id: dataexport.php,v 1.18 2005/02/09 11:26:24 chriskl Exp $ */ $extensions = array( @@ -16,6 +16,9 @@ 'xml' => 'xml' ); + // Prevent timeouts on large exports + set_time_limit(0); + // if (!isset($_REQUEST['table']) && !isset($_REQUEST['query'])) // What must we do in this case? Maybe redirect to the homepage? diff --git a/dataimport.php b/dataimport.php index f6b92d89..c7176ce3 100644 --- a/dataimport.php +++ b/dataimport.php @@ -3,9 +3,12 @@ /** * Does an import to a particular table from a text file * - * $Id: dataimport.php,v 1.6 2004/09/01 16:35:58 jollytoad Exp $ + * $Id: dataimport.php,v 1.7 2005/02/09 11:26:24 chriskl Exp $ */ + // Prevent timeouts on large imports + set_time_limit(0); + // Include application functions include_once('./libraries/lib.inc.php'); diff --git a/dbexport.php b/dbexport.php index b052e136..a670b014 100644 --- a/dbexport.php +++ b/dbexport.php @@ -3,9 +3,12 @@ * Does an export of a database or a table (via pg_dump) * to the screen or as a download. * - * $Id: dbexport.php,v 1.16 2005/02/01 22:03:00 mr-russ Exp $ + * $Id: dbexport.php,v 1.17 2005/02/09 11:26:24 chriskl Exp $ */ + // Prevent timeouts on large exports + set_time_limit(0); + // Include application functions $_no_output = true; include_once('./libraries/lib.inc.php'); diff --git a/display.php b/display.php index 94c52aa6..11351266 100644 --- a/display.php +++ b/display.php @@ -9,9 +9,12 @@ * @param $return_desc The return link name * @param $page The current page * - * $Id: display.php,v 1.46 2004/10/13 10:14:24 jollytoad Exp $ + * $Id: display.php,v 1.47 2005/02/09 11:26:24 chriskl Exp $ */ + // Prevent timeouts on large result sets + set_time_limit(0); + // Include application functions include_once('./libraries/lib.inc.php'); diff --git a/sql.php b/sql.php index a6e8e693..74a09871 100644 --- a/sql.php +++ b/sql.php @@ -6,9 +6,12 @@ * how many SQL statements have been strung together with semi-colons * @param $query The SQL query string to execute * - * $Id: sql.php,v 1.26 2004/09/02 13:48:23 jollytoad Exp $ + * $Id: sql.php,v 1.27 2005/02/09 11:26:25 chriskl Exp $ */ + // Prevent timeouts on large SQL sets + set_time_limit(0); + // Include application functions include_once('./libraries/lib.inc.php'); -- 2.39.5