View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004555 | mantisbt | administration | public | 2004-09-15 13:23 | 2004-11-06 06:27 |
Reporter | tom01 | Assigned To | vboctor | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.19.0 | ||||
Fixed in Version | 0.19.1 | ||||
Summary | 0004555: Warnings on set_time_limit() in safe mode | ||||
Description | On my server I got this warning:
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. | ||||
Tags | No 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; } | ||||