Hallo allemaal,
In mijn error logs op mijn server krijg ik dit:Cannot modify header information - headers already sent by (output started at .... /public_html/index.php:1) in .... public_html/blog/wp-includes/pluggable.php on line 1216\n

The index.php is van mijn statische website en op de eerste regel vind je dit: <!doctype html>
The pluggable.php is van mijn WP blog, die in een map op die statsische website staat.
Op regel 1216 staat dit: header("Location: $location", true, $status);

Ik krijg een aantal dezelfde errors, ook van mijn andere php pagina's van mijn statische website.

Ik heb al online zitten zoeken en waarschijnlijk moet ik iets aan dat doctype veranderen, maar wat?
Er staat geen whitespace voor of achter dat doctype.

Johanna
Dan staat er output, HTML of een witregel VOOR je header() en dat mag niet. Het probleem zit aan het begin van je code (index.php, lijn 1)
- Ariën - op 01/07/2018 09:05:25

Dan staat er output, HTML of een witregel VOOR je header() en dat mag niet. Het probleem zit aan het begin van je code (index.php, lijn 1)


Ja dat begrijp ik, maar dat is volgens mij niet zo.
Mijn site is: https://www.libralion.com]

Toch klopt het precies wat daar staat: Op regel 1 van index.php begint de output met "<!doctype html>" (je ziet het niet letterlijk in je browser, maar het is wel de eerste output). Daarna kun je dus geen headers meer doorgeven.

Als je dit op wilt lossen zul je je plugin naar voren moeten halen:

<?php //dit is regel 1 van index.php

//plugin code hier

//hieronder begint je output pas:
?>
<!doctype html>

Maar geen idee of dit mogelijk is met die plugin ...
Rob Doemaarwat op 01/07/2018 09:30:49

Toch klopt het precies wat daar staat: Op regel 1 van index.php begint de output met "<!doctype html>" (je ziet het niet letterlijk in je browser, maar het is wel de eerste output). Daarna kun je dus geen headers meer doorgeven.

Als je dit op wilt lossen zul je je plugin naar voren moeten halen:

<?php //dit is regel 1 van index.php

//plugin code hier

//hieronder begint je output pas:
?>
<!doctype html>

Maar geen idee of dit mogelijk is met die plugin ...


Maar als ik de index.php bekijk, zie ik niet dat hij begint met ".
En in de paginabron online zie ik dat ook niet. Waar zie jij dat staan dan?

En die plugin code kan ik daar volgens mij niet inzetten.
Mijn site is een statische site en die pluggable.php hoort bij wordpress.

Ik hoop eigenlijk dat ik dit niet goed begrijp, maar voor de zekerheid: Je output begint met "<!doctype html>", maar dan zonder de quootjes/aanhalingstekens. Die heb ik alleen gebruikt om aan om aan te geven wat ik bedoelde. Gewoon, waar je normaal quootjes ook voor gebruikt, om iets te citeren.

Het feit dat je toch die foutmelding krijgt betekent dat er toch een manier is waarbij je via je index.php die plugin aanroept. Gaat het wel om de root index.php (dus deze https://www.libralion.com/index.php), of om de index.php van het blog (https://www.libralion.com/blog/index.php)?

Ja het gaat om https://www.libralion.com/index.php.
Ik begreep je dan verkeerd.
Maar ik kan daar niet die wp plugin aanroepen en dat zou ook eigenlijk niet moeten.
Het zijn gewoon 2 verschillende sites, waarvan de wp site in een map staat, die "blog" heet. Zonder de aanhalingstekens.
Is het niet een kwestie van de B-O-M (Byte-Order-Mark) die het script in de soep laat lopen?
- Ariën - op 01/07/2018 10:35:37

Is het niet een kwestie van de B-O-M (Byte-Order-Mark) die het script in de soep laat lopen?


Die heb ik niet aangevinkt in Dreamweaver.

Kun je je index.php hier plaatsen (dus de PHP code, zodat we ook kunnen zien wat er aan de achterkant gebeurd)?

Kijk met name naar includes/requires. Via via laad je waarschijnlijk toch die plugin (of iets van WP, die weer die plugin aanroept).
index.php:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>At Johanna's</title>
  <meta name="keywords" content="astrology,white eagle,egypt,poetry,animals,spirituality,chiron,nibiru,madame lenormand,stonehenge,milkyway,louise hay,who pays the ferryman,strictly come dancing" />
  <meta name="description" content="A Site about all kind of spiritual things like Stonehenge, Milkyway, Egypt, Tree of Life, Astrology, White Eagle and Cats and Dogs" />
  <meta name="author" content="Johanna Ouwerling" />
  <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
  <link href="css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css">
  <link href="https://netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet" type="text/css">
  <link href="style.css" rel="stylesheet" type="text/css">
  <link href="css/double.css" rel="stylesheet" type="text/css">
  <!-- HTML 5 shim for IE backwards compatibility -->
  <!-- [if lt IE 9]>
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js">
  </script>
  <![endif]-->
  <style>
body {
    padding-top: 40px;}
    </style> 
</head>
<body> 
    <header>
  <div class="container">
  <nav> 
       <div class="johanna">
       <a class="brand" href="index.php">At Johanna's</a>
       </div>
        <nav id="nav">
    <a href="#nav" title="Show navigation">Show navigation</a>
    <a href="#" title="Hide navigation">Hide navigation</a>
    <ul>
					<li><a href="index.php">Home</a></li>
					<li><a href="astrology.php" aria-haspopup="true">Astrology<b class="caret"></b></a>
						<ul>
<li><a href="chiron.php">Chiron</a></li>
                            <li><a href="louisehay.php">Louise Hay</a></li>
                            <li><a href="lenormand.php">Lenormand</a></li>	
						</ul>
					</li>
					<li><a href="photos.php" aria-haspopup="true">Photos<b class="caret"></b></a>
						<ul>						
                            <li><a href="poetry.php">Poetry</a></li>
                            <li><a href="poetry2.php">Poetry 2</a></li>	
                            <li><a href="stories.php">Stories</a></li>					
						</ul>
					</li>
					<li><a href="egypt.php" aria-haspopup="true">Egypt<b class="caret"></b></a>
						<ul>
                            <li><a href="milkyway.php">Milkyway</a></li>
                            <li><a href="stonehenge.php">Stonehenge</a></li>	
                            <li><a href="treeoflife.php">Tree of Life</a></li>	
                            <li><a href="whiteagle.php">White Eagle</a></li>				
						</ul>
					</li>
                    <li><a href="ferryman.php" aria-haspopup="true">Ferryman<b class="caret"></b></a>
						<ul>
							<li><a href="adventure.php">Adventure</a></li>
                            <li><a href="family.php">Family</a></li>
                            <li><a href="parents.php">Parents</a></li>	
                            <li><a href="strictly.php">Strictly</a></li>				
						</ul>
					</li>                                                      
					<li><a href="contact.php" aria-haspopup="true">Contact<b class="caret"></b></a>
                    <ul>
                           <li><a href="blog/index.php" target="_blank">Johanna Blog</a></li>
                           <li><a href="forum" target="_blank">Forum</a></li>
                           <li><a href="links.php">Links</a></li>
                       </ul>
                     </li>
				</ul>
          </nav>
          </nav>
        </div>
       
  </header>
  <section class="container" id="carousel_container">
    <div class="row">
      <div class="span12">
        <div id="artCarousel" class="carousel slide">
          <ol class="carousel-indicators">
            <li data-target="#artCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#artCarousel" data-slide-to="1"></li>
            <li data-target="#artCarousel" data-slide-to="2"></li>
            <li data-target="#artCarousel" data-slide-to="3"></li>
            <li data-target="#artCarousel" data-slide-to="4"></li>
          </ol>
          <div class="carousel-inner">
            <div class="item active"><img src="images/slide01.jpg" alt="Astrology" width="1200" height="800">
              <div class="carousel-caption">
                <h1>Astrology</h1>
                <p>Read about Astrology <a href="astrology.php">here</a></p>
              </div>
            </div>
            <div class="item"><img src="images/slide02.jpg" alt="Egypt - Temple of Abydos" width="1200" height="800">
            <div class="carousel-caption">
                <h4>Egypt - Temple of Abydos</h4>
                <p>A Journey through Egypt <a href="egypt.php">here</a></p>
              </div></div>
            <div class="item"><img src="images/slide03.jpg" alt="Sea" width="1200" height="800">
            <div class="carousel-caption">
                <h4>Sea</h4>
                <p>Adventure in the sea <a href="adventure.php">here</a></p>
              </div></div>
               <div class="item"><img src="images/slide04.jpg" alt="Animals" width="1200" height="800">
            <div class="carousel-caption">
                <h4>Animals</h4>
                <p>Photos of Animals <a href="animals.php">here</a></p>
              </div></div>
               <div class="item"><img src="images/slide05.jpg" alt="Strictly Come Dancing" width="1200" height="800">
            <div class="carousel-caption">
                <h4>Strictly Come Dancing</h4>
                <p>I Love Strictly Come Dancing. More <a href="strictly.php">here</a></p>
              </div></div>
          </div>
          <a class="left carousel-control" href="#artCarousel" data-slide="prev">&lsaquo;</a> <a class="right carousel-control" href="#artCarousel" data-slide="next">&rsaquo;</a> 
        </div>
      </div>
    </div>
  </section>
  <section class="container home" id="home">
    <h4>&nbsp;</h4>
  <article class="row">
      <div class="span12">
        <h4 class="featurette-heading">Welcome</h4>
			  <p><img style="float: right;"  src="images/jo2018.jpg" width="150" height="150" alt="Johanna Ouwerling" class="img2">to my website. My name is Johanna Ouwerling and I love to make 
  websites. I play with colours, music and text. <br>
I have a lot of interests and I am sure, that you will find something here 
  you like.<br>
I am very interested in all kind of spiritual things like Stonehenge, Milkyway, Egypt, Tree of Life, Astrology, White Eagle <br>
and I love animals! 
  Happy surfing!&nbsp;<br>
  <br>
  And I make websites! I love doing that. It is a very creative process.
	  <p>I also love communicating with people from all over the world. Because of my websites I get emails from people from a lot of different countries and also through <a href="https://www.facebook.com/ouwerling" target="_blank">Facebook</a> I made some nice friends. It is fantastic that this is possible nowadays!        
		<p>Enjoy my websites and if you want to ask or write anything, please <a href="contact.php">contact </a>me!</p>        
		<p>Johanna</p>	
    </div>
    </article>
    <hr class="featurette-divider">
    <div class="row">
      <article class="span4">
        <h4>Louise Hay Affirmations</h4>
        <p>Louise Hay is a spiritual teacher. She works a lot with affirmations. If you have a problem in your life, affirmations can do a lot of good.</p>
        <p>&nbsp;</p>
		<p><img style="margin:0px auto;display:block" src="images/hay/lhay2small.jpg" width="300" height="307" alt="Louise Hay Wisdomcard"></p>
				<p>&nbsp; 
	    </p>
        <p style="text-align:center"><a class="btn btn-danger" href="louisehay.php">More Info &raquo;</a></p>
      </article>
      <article class="span4">
        <h4>Lenormand Card Reading</h4>
        <p>Madame Lenormand was a clairvoyant and did card readings. Try it out for yourself. Do a cardreading with the Lenormand cards.</p>
        <p>&nbsp;</p>
	<p><img style="margin:0px auto;display:block" src="images/hay/Lenormand16small.jpg" width="201" height="307" alt="Madame Lenormand Card"></p>
		<p>&nbsp; </p>
        <p style="text-align:center"><a class="btn btn-danger" href="lenormand.php">More Info &raquo;</a></p>
      </article>
      <article class="span4">
        <h4>Tree of Life</h4>
        <p>The Tree of life is an important part of the Qabala (Kaballah). Its origin lies in Egypt some 3000 years B.C. Read more about it.</p>
        <p>&nbsp;</p>
		<p><img style="margin:0px auto;display:block"  src="images/tree/levensbloemsmall.jpg" width="300" height="307" alt="Life Flower"></p>
				<p>&nbsp;</p> 
        <p style="text-align:center"><a class="btn btn-danger" href="treeoflife.php">More Info &raquo;</a></p>
      </article>
    </div>
  </section>
 <footer>
    <div class="container">        
     <div id= "latest" class="row"> 
        <section class="span4 rp_box_wrapper">
          <h4>Johanna's Blog</h4>
          
            <p><img src="images/tree/vesicapisces3.jpg" alt="Vesica Pisces"></p>
            <div class="section"> 
                <p><?php  include "blogposts.php";  ?>		
          </div> 
       </section>
        
        <section class="span4 rp_box_wrapper">
        
          <h4>Twitter</h4>
          <p><img src="images/twitterpic.jpg" alt="Twitter"></p>
          
       <a class="twitter-timeline" href="https://twitter.com/......." data-widget-id=".......">Tweets by @......</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
         
       </section>
       
       <section class="span4 rp_box_wrapper">
       
        <h4>Quotations</h4>
        
       <p><img src="images/quotations/democritus.jpg" alt="Quotation Democritus"></p>
       <p><img src="images/quotations/swamisivananda.jpg" alt="Quotation Swami Sivananda"></p>
       </section>
      
    </div>
      <div class="credit">
        <p id="cr_bar">
          Copyright ©  <a href="index.php">Libralions World</a>
        </p>
      </div>
    </div>
  </footer>

  <script src="https://code.jquery.com/jquery-latest.js"></script>
  <script defer src="js/bootstrap.min.js"></script>
  <script>
    $('#artCarousel').carousel({
      interval: 4000,
      cycle: true
    });
  </script>
  <script defer src="js/doubletaptogo.js"></script>
  <script>
	$( function()
	{
		$( '#nav li:has(ul)' ).doubleTapToGo();
	});
</script>
 
    <!-- Start of StatCounter Code for Dreamweaver -->
<script type="text/javascript">
var sc_project=......; 
var sc_invisible=1; 
var sc_security="......."; 
</script>
<script defer type="text/javascript"
src="https://www.statcounter.com/counter/counter.js"></script>
<noscript><div class="statcounter"><a title="hits counter"
href="https://statcounter.com/" target="_blank"><img
class="statcounter"
src="https://c.statcounter.com/...../0/d50a7f35/1/"
alt="hits counter"></a></div></noscript>
<!-- End of StatCounter Code for Dreamweaver -->

</body>
</html>


[size=xsmall]Toevoeging op 01/07/2018 11:11:26:[/size]



Zou het met die include blogposts.php te maken hebben?

Reageren