View Issue Details

IDProjectCategoryView StatusLast Update
0004555mantisbtadministrationpublic2004-11-06 06:27
Reportertom01 Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.0 
Fixed in Version0.19.1 
Summary0004555: Warnings on set_time_limit() in safe mode
Description

On my server I got this warning:

 SYSTEM WARNING: set_time_limit(): Cannot set time
 limit in safe mode

when installing 0.19.0. The install worked, the problem was cosmetic as far as I can see.

I get the same warning when moving an issue from one project to another -- the issue does get moved, but the subsequent page doesn't display as the error message appears to prevent the redirect (Location:) header from being sent, and I get the usual PHP "Cannot modify header information - headers already sent by ..." error.

TagsNo tags attached.
Attached Files
safe_mode_fix.diff (1,621 bytes)   
Index: core/file_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/file_api.php,v
retrieving revision 1.57
diff -u -r1.57 file_api.php
--- core/file_api.php	28 Sep 2004 00:56:13 -0000	1.57
+++ core/file_api.php	28 Sep 2004 22:48:36 -0000
@@ -317,13 +317,13 @@
 	# --------------------
 	# Put a file to the ftp server.
 	function file_ftp_put ( $p_conn_id, $p_remote_filename, $p_local_filename ) {
-		set_time_limit( 0 );
+		helper_begin_long_process();
 		$upload = ftp_put( $p_conn_id, $p_remote_filename, $p_local_filename, FTP_BINARY);
 	}
 	# --------------------
 	# Get a file from the ftp server.
 	function file_ftp_get ( $p_conn_id, $p_local_filename, $p_remote_filename ) {
-		set_time_limit( 0 );
+		helper_begin_long_process();
 		$download = ftp_get( $p_conn_id, $p_local_filename, $p_remote_filename, FTP_BINARY);
 	}
 	# --------------------
Index: core/helper_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/helper_api.php,v
retrieving revision 1.51
diff -u -r1.51 helper_api.php
--- core/helper_api.php	1 Aug 2004 03:29:25 -0000	1.51
+++ core/helper_api.php	28 Sep 2004 22:48:14 -0000
@@ -139,7 +139,9 @@
 	function helper_begin_long_process( $p_ignore_abort=false ) {
 		$t_timeout = config_get( 'long_process_timeout' );
 
-		set_time_limit( $t_timeout );
+		# silent errors or warnings reported when safe_mode is ON.
+		@set_time_limit( $t_timeout );
+
 		ignore_user_abort( $p_ignore_abort );
 		return $t_timeout;
 	}
safe_mode_fix.diff (1,621 bytes)   

Activities

tom01

tom01

2004-09-28 11:49

reporter   ~0007811

The same error occurs when closing a group of issues using the checkboxes on the left side of the View Issues page -- after clicking OK on the confirmation page the set_time_limit error appears. However, the issues are properly closed.