backport: timeout prevention from adrian nida
authorchriskl <chriskl>
Wed, 9 Feb 2005 11:31:49 +0000 (11:31 +0000)
committerchriskl <chriskl>
Wed, 9 Feb 2005 11:31:49 +0000 (11:31 +0000)
CREDITS
HISTORY
INSTALL
dataexport.php
dataimport.php
dbexport.php
display.php
sql.php

diff --git a/CREDITS b/CREDITS
index d71ea0f8a723ac24ba459e16e3bfaf9fb708c911..18f9402f1e7bdb8d34d234032bc7fb2ee1d3fa14 100644 (file)
--- 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 2898edc49fc49353c63a9998ffed8828d421f0bf..5c86bed2f5387630802dccdad2bb86d740807e4c 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -8,6 +8,7 @@ Bugs
 * Fix export to work with release candidates and beta releases as well as finals
  (Russell Smith)
 * Fix port selection for local connections (Russell Smith)
+* Fix timeouts on long running operations (Adrian Nida)
 
 Version 3.5.1
 -------------
diff --git a/INSTALL b/INSTALL
index 7a315d83fac355afa6dbe4d860e82e39b81337f7..e3966eaf85785049271f0c0dfdc1cadfecad034a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -34,6 +34,8 @@ 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
index 9d4ca5d6989a826cb2db76d17ff46c37d685890f..429e2ef752f6036302cd034b113a263e1e7d990f 100644 (file)
@@ -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.17.2.1 2005/02/09 11:31:49 chriskl Exp $
         */
 
        $extensions = array(
@@ -16,6 +16,8 @@
                '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?
 
index f6b92d899061eaf3d592b79997f2b9ac38f566d6..998bc24de8e7629540435b1be08c538a95835b32 100644 (file)
@@ -3,9 +3,11 @@
        /**
         * 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.6.2.1 2005/02/09 11:31:49 chriskl Exp $
         */
 
+      // Prevent timeouts on large imports
+      set_time_limit(0);
        // Include application functions
        include_once('./libraries/lib.inc.php');
 
index 18fcbaea47e775fd044de946cee845fc174921cc..154fdb6af2540c06127f2f85add402c727cba629 100644 (file)
@@ -3,9 +3,11 @@
         * Does an export of a database or a table (via pg_dump)
         * to the screen or as a download.
         *
-        * $Id: dbexport.php,v 1.14.2.2 2005/02/02 21:15:04 mr-russ Exp $
+        * $Id: dbexport.php,v 1.14.2.3 2005/02/09 11:31:49 chriskl Exp $
         */
 
+      // Prevent timeouts on large exports
+      set_time_limit(0);
        // Include application functions
        $_no_output = true;
        include_once('./libraries/lib.inc.php');
index 94c52aa6c1af1f9d5286cc13c47d8c067f2835e7..a1f0bdb448bb96b83972812b22b20470fb256f62 100644 (file)
@@ -9,9 +9,11 @@
         * @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.46.2.1 2005/02/09 11:31:49 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 a6e8e6938b25b11583f92dad39e271d2d5e65dd9..093c1529866a764f3bba9d3a63df8874efa2d11e 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -6,9 +6,11 @@
         * 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.26.2.1 2005/02/09 11:31:49 chriskl Exp $
         */
 
+      // Prevent timeouts on large SQL sets
+      set_time_limit(0);
        // Include application functions
        include_once('./libraries/lib.inc.php');