Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    Cannot send session cache limiter - headers already sent

    Ciao, ho un problema, tutti gli script che ho "integrati" al layout del sito ad un certo punto hanno cominciato a darmi quest'errore
    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /web/htdocs/www.sonicdream.it/home/style.htm:156) in /web/htdocs/www.sonicdream.it/home/video/script.php on line 60
    Prima di tutto, tutte le pagine del mio sito sono strutturate così
    <?php require("../style.htm"); ?>
    <?php require("../head.htm"); ?>
    <TABLE class=bodyline cellSpacing=0 cellPadding=0 width="100%" border=0>
    <td width="14%" height="2"></TBODY></TABLE>
    <table width="100%" height="100%" border="0" align="left" cellpadding="0" cellspacing="0">
    <tr>
    <td width="13%" align="left" valign="top"><?php require("../sinistra.htm"); ?>
    </td>
    <td width="73%" valign="top"><?php require("centro.htm"); ?></td>
    <td width="14%" height="542" align="right" valign="top"><?php require("../destra.htm"); ?></td>
    </tr>
    </table>
    </BODY>
    </HTML>
    centro.htm è il file che cambia da pagina a pagina, ma per il resto sono tutte così.
    centro.htm a sua volta è strutturato così


    <table width="100%" height="48" cellpadding="0" cellspacing="0">
    <tr>
    <td width=5% height="49" valign="top">
    <div align="right">[img]../images/bar_SX.jpg[/img]</div>
    <td width=100% height="49" background="../images/bar_MD.jpg">
    <div align="center"><font size="2"><font color="#CCFF00" face="Verdana, Arial, Helvetica, sans-serif">Video</font></font></div>
    <td width=4% valign="top"> <div align="left">[img]../images/bar_DX.jpg[/img]</div>
    </table>
    <table width="100%" height="6%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="90%" background="../images/col.gif"></td>
    <td width="98%" valign="top"><?php require("script.php"); ?></td>
    <td width="1%" height="90%" background="../images/col.gif"></td>
    </tr>
    <tr>
    <td width="1%">[img]../images/barl.gif[/img]</td>
    <td align="center" valign="top" background="../images/mid.gif"></td>
    <td>[img]../images/barl2.gif[/img]</td>
    </tr>
    </table>
    in questo caso c'e un'altro require dentro che richiama il codice dello script.

    L'errore non può essere in script.php perchè sta cosa ha iniziato a farmela con TUTTI gli script che ho integrato dentro al layout con la funzione include o require..
    http://www.sonicdream.it/music/midi/index.php
    http://www.sonicdream.it/immagini/coppermine/index.php
    Inoltre se apro script.php (che è il file col codice vero e propriod ello script "incollato" con include in index.php) funziona tutto bene.
    http://www.sonicdream.it/video/script.php

    Quindi a sto punto ho pensato che ci sia qualcosa in style.htm che fa casino.. E indovinate? escludendo quel file l'errore lo da lo stesso. Ho provato a escludere uno per uno tutti i file inclusi in index.php e ho notato che l'errore non esce solo escludendo sia sinistra.htm e style.htm insieme, ma non riesco proprio a capire che tipo di relazione possa esserci con questi codici e la funzione che va in errore!
    il codice di style.htm è questo
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <style>
    <style type="text/css">
    <!--
    #leftright, #topdown{
    position:absolute;
    left:0;
    top:0;
    width:1px;
    height:1px;
    layer-background-color:black;
    background-color:black;
    z-index:100;
    font-size:1px;
    }
    td {
    cursor: crosshair;
    font-family: Verdana;font-size: 8pt;
    SCROLLBAR-FACE-COLOR: black; SCROLLBAR-HIGHLIGHT-COLOR: gray; SCROLLBAR-3DLIGHT-COLOR: black; SCROLLBAR-ARROW-COLOR: gray; SCROLLBAR-TRACK-COLOR: gray; scrollbar-blue-color: gray; scrollbar-Lightblue-Color: gray
    }
    body {
    cursor: crosshair;
    font-family: Verdana;font-size: 8pt;
    SCROLLBAR-FACE-COLOR: black; SCROLLBAR-HIGHLIGHT-COLOR: gray; SCROLLBAR-3DLIGHT-COLOR: black; SCROLLBAR-ARROW-COLOR: gray; SCROLLBAR-TRACK-COLOR: gray; scrollbar-blue-color: gray; scrollbar-Lightblue-Color: gray

    }
    a:link {
    cursor: crosshair;
    font-family: Verdana;
    font-size: 8pt;
    color: #FFFFFF;
    text-decoration: none;
    }
    a:visited {
    cursor: crosshair;
    font-family: Verdana;
    font-size: 8pt;
    text-decoration: none;
    color: #FFFFFF;
    }
    a:hover {
    cursor: crosshair;
    font-family: Verdana;
    font-size: 8pt;
    color: #33FF00;
    text-decoration: underline overline;
    }
    .over {background-image: url(/images/rolloverbg.gif);; cursor: crosshair }
    .out { }
    }
    input {
    font-family: Verdana;
    font-size: 8pt;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #5B5B5B;
    border: 1px solid #000000;
    }
    -->
    </style>
    <SCRIPT LANGUAGE="JavaScript">
    <!--// Copyright 1996 - Tomer and Yehuda Shiran
    // This example will appear in our forthcoming book on JavaScript.
    // Feel free to "steal" this code provided that you leave this notice as is.
    // Additional examples from the book can be found at http://www.geocities.com/SiliconValley/9000/
    // For more information contact Tomer or Yehuda Shiran <yshiran@iil.intel.com>

    // set speed of banner (pause in milliseconds between addition of new character)
    var speed = 10

    // decrease value to increase speed (must be positive)
    // set pause between completion of message and beginning of following message
    var pause = 1500

    // increase value to increase pause
    // set initial values
    var timerID = null
    var bannerRunning = false

    // create array
    var ar = new Array()

    // assign the strings to the array's elements
    ar[0] = "Benvenuti. . ."
    ar[1] = ". . .nell'impero del Sonic Dream. . ."
    ar[2] = ". . .FIGHT FOR THE EMPIRE OR DIE BY MY SWORD. . ."
    ar[3] = "..:: www.sonicdream.it ::.."

    // assign index of current message
    var message = 0

    // empty string initialization
    var state = ""

    // no value is currently being displayed
    clearState()

    // stop the banner if it is currently running
    function stopBanner() {
    // if banner is currently running
    if (bannerRunning)
    // stop the banner
    clearTimeout(timerID)
    // timer is now stopped
    timerRunning = false
    }

    // start the banner
    function startBanner() {
    // make sure the banner is stopped
    stopBanner()
    // start the banner from the current position
    showBanner()
    }

    // assign state a string of "0" characters of the length of the current message
    function clearState() {
    // initialize to empty string
    state = ""
    // create string of same length containing 0 digits
    for (var i = 0; i < ar[message].length; ++i) {
    state += "0"
    }
    }

    // display the current message
    function showBanner() {
    // if the current message is done
    if (getString()) {
    // increment message
    message++
    // if new message is out of range wrap around to first message
    if (ar.length <= message)
    message = 0
    // new message is first displayed as empty string
    clearState()
    // display next character after pause milliseconds
    timerID = setTimeout("showBanner()", pause)
    }
    else {
    // initialize to empty string
    var str = ""
    // built string to be displayed (only character selected thus far are displayed)
    for (var j = 0; j < state.length; ++j) {
    str += (state.charAt(j) == "1") ? ar[message].charAt(j) : " "
    }
    // partial string is placed in status bar
    window.status = str
    // add another character after speed milliseconds
    timerID = setTimeout("showBanner()", speed)
    }
    }

    function getString() {
    // set variable to true (it will stay true unless proven otherwise)
    var full = true
    // set variable to false if a free space is found in string (a not-displayed char)
    for (var j = 0; j < state.length; ++j) {
    // if character at index j of current message has not been placed in displayed string
    if (state.charAt(j) == 0)
    full = false
    }
    // return true immediately if no space found (avoid infinitive loop later)
    if (full) return true
    // search for random until free space found (braoken up via break statement)
    while (1) {
    // a random number (between 0 and state.length - 1 == message.length - 1)
    var num = getRandom(ar[message].length)
    // if free space found break infinitive loop
    if (state.charAt(num) == "0")
    break
    }
    // replace the 0 character with 1 character at place found
    state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
    // return false because the string was not full (free space was found)
    return false
    }

    function getRandom(max) {
    // create instance of current date
    var now = new Date()
    // create a random number (good generator)
    var num = now.getTime() * now.getSeconds() * Math.random()
    // cut random number to value between 0 and max - 1, inclusive
    return num % max
    }
    startBanner()
    // -->
    </SCRIPT><title>&times;&divide;&middot;.&middot;&acu te;&macr;`&middot&raquo;$&oslash;&ntilde;&iuml;&cent; &ETH;&reg;&euro;&atilde;m I&ntilde;&fnof;&iuml;&ntilde;&iuml;t&yuml;&laquo;( &middot;&acute;&macr;`&middot;.&middot;&divide;&ti mes;</title><div id="leftright" style="width:expression(document.body.clientWidth-2)"></div>
    <div id="topdown" style="height:expression(document.body.clientHeigh t-2)"></div>

    </HEAD>
    <BODY BGCOLOR=#404040 LEFTMARGIN=0 TOPMARGIN=3 MARGINWIDTH=0 MARGINHEIGHT=0 text="#FFFFFF">
    </body>
    </html>
    <script type="text/javascript" src="http://www.sonicdream.it/stats/php-stats.js.php"></script>
    <noscript></noscript>

  2. #2
    e questo quello di sinistra.htm
    <style>
    /* styles for the tree */
    SPAN.TreeviewSpanArea A {
    font-size: 8pt;
    font-family: verdana,helvetica;
    }
    </style>
    <script src="http://www.sonicdream.it/main/ua.js"></script>
    <script src="http://www.sonicdream.it/main/ftiens4.js"></script>
    <script src="http://www.sonicdream.it/main/demoFramelessNodes.js"></script>
    <table width="140" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td background="/images/sideboxtop1.gif" width="140" height="17"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">[&raquo;_Main_&laquo;]</font></div></td>
    </tr>
    <tr>
    <td>[img]/images/sideboxtop2.gif[/img]</td>
    </tr>
    <tr>
    <td><table width="97%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
    <tr>
    <td><table width="100%" border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td><table border=0><tr><td></font></td></tr></table>

    <span class=TreeviewSpanArea>
    <script>initializeDocument()</script>
    </td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td>[img]/images/sideboxbottom.gif[/img]</td>
    </tr>
    </table>


    <table width="140" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td background="/images/sideboxtop1.gif" width="140" height="17"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">[&raquo;Stats&laquo;]</font></div></td>
    </tr>
    <tr>
    <td>[img]/images/sideboxtop2.gif[/img]</td>
    </tr>
    <tr>
    <td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
    <tr>
    <td><table width="100%" border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    Visite Totali:
    <script type="text/javascript" src="http://www.sonicdream.it/stats/view_stats.js.php?mode=4&amp;digits=8"></script>

    Di Cui oggi: <script type="text/javascript" src="http://www.sonicdream.it/stats/view_stats.js.php?mode=2&amp;style=0&amp;digits=1" ></script>


    Visitatori di oggi:
    <script type="text/javascript" src="http://www.sonicdream.it/stats/view_stats.js.php?mode=1&amp;style=0&amp;digits=1" ></script>

    Visitatori Online: <script type="text/javascript" src="http://www.sonicdream.it/stats/view_stats.js.php?mode=0&amp;style=0&amp;digits=1" ></script>

    <?php include('stats.php'); ?>
    </font></div></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td>[img]/images/sideboxbottom.gif[/img]</td>
    </tr>
    </table>


    <table width="140" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td background="/images/sideboxtop1.gif" width="140" height="17"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"> [&raquo;Affiliati&laquo;]</font></div></td>
    </tr>
    <tr>
    <td>[img]/images/sideboxtop2.gif[/img]</td>
    </tr>
    <tr>
    <td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
    <tr>
    <td><table width="100%" border="0" cellpadding="7" cellspacing="0">
    <tr>
    <td bordercolor="0"><div align="center"><font size="1"><a href="http://www.sonicitalia.net" target="_blank">[img]/images/minibanner/sonicitalia.gif[/img]

    Sonic Italia</a>

    <a href="http://www.foxhoundforce.it" target="_blank">[img]/images/minibanner/bannerfognaporcoddio.png[/img]

    La Fogna</a>

    <a href="http://www.sonicna.cjb.net/" target="_blank">[img]/images/minibanner/Minibanner.JPG[/img]

    Sonic NA</a>

    <a href="http://ciny2.altervista.org/" target="_blank">[img]/images/minibanner/Minibannersgabbiotto.gif[/img]

    Lo Sgabbiotto</a>

    <a href="http://artistaly.altervista.org/index.htm" target="_blank">[img]/images/minibanner/bannerforumaly.jpg[/img]

    Artistaly Website </a>

    <a href="http://worldofsonic.altervista.org" target="_blank">[img]/images/minibanner/loghino.gif[/img]

    World Of Sonic</a></font></div></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td>[img]/images/sideboxbottom.gif[/img]</td>
    </tr>
    </table>
    Nessuno sa dirmi qualcosa in modo da evitarmi un esauriment nervoso?
    Proprio non riesco a venirne a capo

  3. #3
    nessuno ha la minima idea di cosa potrebbe essere?

  4. #4
    chi vuoi che si metta a leggere tutta quella roba?

    di solito l'errore e' nelle prime righe. Sicuramente invii dei dati al browser prima di eseguire session_start().

    mettilo come prima istruzione assoluta dopo il tag di apertura del php.

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  5. #5
    prima dei tag di aertura del hp non deve esserci nemeno uno sazio altrimenti avresti cmq inviato output al browser. Ciao!
    eCommerceRS.NET - Commerciante, vendi on-line!
    Il mio nick è mircov e non mirco!!!

  6. #6
    Originariamente inviato da piero.mac
    chi vuoi che si metta a leggere tutta quella roba?

    di solito l'errore e' nelle prime righe. Sicuramente invii dei dati al browser prima di eseguire session_start().

    mettilo come prima istruzione assoluta dopo il tag di apertura del php.
    anche se i tag php precedenti sono tutti chiusi? e poi non capisco, prima funzionava. Non è lo script in se a non andare, non va SOLO se visualizzato all'interno del layout.
    Cmq ho provato a spostare quell'istruzione proprio all'inizio di style.htm ma nemmeno ne vuole sapere.
    L'errore non è nllo script, ma penso che ci sia qualcosa che va in conflitto prima...

  7. #7
    cmq non può dipendere da qualche impostazione cambiata al server php? su altri server pare che funzioni

  8. #8
    Questo è l'errore che ti viene dato:

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /web/htdocs/www.sonicdream.it/home/style.htm:156) in /web/htdocs/www.sonicdream.it/home/video/script.php on line 60
    L'errore dice che la funzione non può essere usata perchè un output è stato già inviato al browser.

    Per output si intende qualunque tipo di carattere (anche spazio) inviato in qualunque modo (con php, in html, oltro).

    L'errore inoltre, ti dice anche chi ha inviato già un output. In questo caso è style.htm che viene incluso nela linea 60 di script.php.

    Rivedi lo script. Ciao!
    eCommerceRS.NET - Commerciante, vendi on-line!
    Il mio nick è mircov e non mirco!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.