Cannot modify header information - headers already sent

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 1466 Views - Last Post: 04 April 2013 - 11:46 PM Rate Topic: -----

#16 AlexxanderX  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 54
  • Joined: 13-January 12

Re: Cannot modify header information - headers already sent

Posted 04 April 2013 - 11:33 PM

Hello back. I have the same error:

Quote

Warning: Cannot modify header information - headers already sent by (output started at /home/.../public_html/.../.../backup_functions.php:206) in /home/.../public_html/.../.../backup_functions.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/.../public_html/.../.../backup_functions.php:206) in /home/.../public_html/.../.../backup_functions.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/.../public_html/.../.../backup_functions.php:206) in /home/.../public_html/.../.../backup_functions.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/.../public_html/.../.../backup_functions.php:206) in /home/.../public_html/.../.../backup_functions.php on line 216
.
I have in backup_functions.php this code from https://github.com/b...0with%20PHP.php but whithout last 6 lines because I but them in backup_save.php wich is accesed. I know the code from github is old but if can help or give me another code for making a backup of a database into a .sql file.

EDIT: I know the warning is because of the echo from line 209, but if delete the echo I will download an 0 Bytes file.

This post has been edited by AlexxanderX: 04 April 2013 - 11:36 PM

Was This Post Helpful? 0
  • +
  • -

#17 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,257
  • Joined: 08-June 10

Re: Cannot modify header information - headers already sent

Posted 04 April 2013 - 11:36 PM

well, then you must have (visible or invisible) output before that code.

EDIT: why is there an echo statement in the DoBackup() function? a forgotten debug output?

This post has been edited by Dormilich: 04 April 2013 - 11:39 PM

Was This Post Helpful? 0
  • +
  • -

#18 AlexxanderX  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 54
  • Joined: 13-January 12

Re: Cannot modify header information - headers already sent

Posted 04 April 2013 - 11:42 PM

I don't know, but one time worked that code without errors, but now I don't know why no more working. In the accesed file I have:
<?php //include("protection.php");
include_once 'backup_functions.php';
$obj = new backup("localhost","user","pass","database");
$str = $obj->DoBackup();
//echo '</br></br></br>START-'.$str.'-STOP</br></br></br>';
?>

Was This Post Helpful? 0
  • +
  • -

#19 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,257
  • Joined: 08-June 10

Re: Cannot modify header information - headers already sent

Posted 04 April 2013 - 11:46 PM

as long as there is that echo statement, the code will not work properly.

and DoBackup() does not have a return value either.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2