"Cannot modify header information" bei Joomla!

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

"Cannot modify header information" bei Joomla!

Postby Stefan2733 » 10. March 2008 19:46

Hallo Profis,

ich habe lokal den XAMPP-Server installiert und bin ehrlich gesagt sehr zufrieden damit, allerdings...

Habe nun zu einer perfekt laufenden Joomla-Installation eine weitere eingespielt, die im Web fehlerfrei funktioniert. Nur habe ich unter XAMPP das Problem, dass ich immer folgende Fehlermeldung erhalte:
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Stefan\Desktop\xampp\htdocs\web\ff-puchberg\mambots\editors\jce.php:506) in C:\Users\Stefan\Desktop\xampp\htdocs\Web\FF-Puchberg\index.php on line 250 Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Stefan\Desktop\xampp\htdocs\web\ff-puchberg\mambots\editors\jce.php:506) in C:\Users\Stefan\Desktop\xampp\htdocs\Web\FF-Puchberg\index.php on line 251 Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Stefan\Desktop\xampp\htdocs\web\ff-puchberg\mambots\editors\jce.php:506) in C:\Users\Stefan\Desktop\xampp\htdocs\Web\FF-Puchberg\index.php on line 252 Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Stefan\Desktop\xampp\htdocs\web\ff-puchberg\mambots\editors\jce.php:506) in C:\Users\Stefan\Desktop\xampp\htdocs\Web\FF-Puchberg\index.php on line 253 Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Stefan\Desktop\xampp\htdocs\web\ff-puchberg\mambots\editors\jce.php:506) in C:\Users\Stefan\Desktop\xampp\htdocs\Web\FF-Puchberg\index.php on line 254


Ich bin mir nicht sicher ob es hier gestattet ist, aber ich würde an dieser Stelle auf meinen Beitrag im Joomla-Forum verweisen, wo mir leider nicht geholfen werden konnte.


Habt ihr eine Idee??

Wäre über jeden Tipp sehr dankbar.

lG Stefan
Stefan2733
 
Posts: 3
Joined: 10. March 2008 19:23
XAMPP version: 7
Operating System: Win10

Postby Xardas der Dunkle » 10. March 2008 19:55

Dieser Fehler tritt auf wenn eine Ausgabe gemacht wird bevor alle Header gesendet werden.
Es reicht schon wenn am Anfang einer php-datei vor dem <?php ein leerzeichen steht.

Am besten guckst du dir mal die jce.php an und prüfst ob am Anfang oder vllt auch am Ende der Datei ein leerzeichen steht!

mfG
User avatar
Xardas der Dunkle
 
Posts: 482
Joined: 09. March 2008 19:40
Location: /var/www

Postby Stefan2733 » 11. March 2008 12:44

Hallo, danke für die Antwort.

Habe keine Leerzeichen gefunden, außer vielleicht Einrückungen. Und schon gar nichts in den angeführten Zeilen.

Code: Select all
<?php

/*

* JCE 1.1.0 for Joomla 1.0.x

* @version $Id: jce.php, v 1.1.0 2006/10/31

* @package JCE 1.1.0

* @copyright (C) 2005 - 2006 Ryan Demmer

* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL

* Oficial website: http://www.cellardoor.za.net

*/

defined('_VALID_MOS') or die('Restricted Access.');



$task = mosGetParam( $_REQUEST, 'task' );

define( 'DS',  DIRECTORY_SEPARATOR );



function cleanInput( $string ){

   return preg_replace( '/[^a-zA-z._]/i','', $string );

}

switch ( $task )

{

    case 'popup':

        showPopup();

    break;

    case 'plugin':

           $query = "SELECT plugin"

         . "\n FROM #__jce_plugins"

         . "\n WHERE published = 1 AND type = 'plugin'"

         ;

         $database->setQuery( $query );

         $plugins = $database->loadResultArray();

                  

         $plugin = cleanInput( mosGetParam( $_REQUEST, 'plugin' ) );

         if( in_array( $plugin, $plugins ) ){

            $file = cleanInput( basename( mosGetParam( $_REQUEST, 'file' ) ) );

            $path = $mainframe->getCfg('absolute_path') . '/mambots/editors/jce/jscripts/tiny_mce/plugins/' . $plugin;            

            if( is_dir( $path ) && file_exists( $path . '/' . $file ) ){

               include_once $path . '/' . $file;

            }else{

               die('File not found!');

            }

         }else{

            die('Plugin not found!');

         }

            break;

      case 'help':

         $file = cleanInput( basename( mosGetParam( $_REQUEST, 'file' ) ) );

         $path = $mainframe->getCfg('absolute_path') . '/mambots/editors/jce/jscripts/tiny_mce/libraries/help/' . $file;

         if( file_exists( $path ) ){

            include_once $path;

         }else{

            die('File not found!');

         }

         break;

}

function getInput( $item, $def=null ){

   return htmlspecialchars( mosGetParam( $_REQUEST, $item, $def ) );

}

function showPopup()

{

    global $mainframe, $template;



    $img = getInput( 'img' );

    $title = str_replace( '_', ' ', getInput( 'title', 'Image' ) );

    $mode = getInput( 'mode', '0' );

    $right_click = getInput( 'click', '0' );

    $print = getInput( 'print', '0' );

    $w = getInput( 'w' );

    $h = getInput( 'h' );



    if( strpos( $mainframe->getCfg('live_site'), $img ) === false ) $img = $mainframe->getCfg('live_site').'/'.$img;

?>

    <style type="text/css">

        body{

            margin: 0px;

            padding: 0px;

        }

    </style>

   <script type="text/javascript">

   var w = '<?php $w;?>';

   var h = '<?php echo $h;?>';   

   var x = (screen.width-parseInt(w))/2;

   var y = (screen.height-parseInt(h))/2;

      

   window.moveTo(x, y);

   </script>

<?php if($right_click){?>

   <script type="text/javascript">

    function clickIE4(){

        if (event.button==2){

            return false;

        }

    }

    function clickNS4(e){

        if (document.layers||document.getElementById&&!document.all){

            if (e.which==2||e.which==3){

                return false;

            }

        }

    }

    if (document.layers){

        document.captureEvents(Event.MOUSEDOWN);

        document.onmousedown=clickNS4;

    }

    else if (document.all&&!document.getElementById){

        document.onmousedown=clickIE4;

    }

    document.oncontextmenu=new Function("return false");

   </script>

<?php }

    switch( $mode ){

        case '0':

?>

            <img src="<?php echo $img;?>" width="<?php echo $w;?>" height="<?php echo $h;?>" title="<?php echo $title;?>" alt="<?php echo $title;?>" style="cursor:pointer;" onclick="window.close();" />

    <?php

        break;

        case '1':

?>

            <table align="center" cellspacing="0" cellpadding="0" border="0">

                <tr>

                    <td align="left" class="contentheading" style="width:<?php echo $w-18;?>px; margin-left: 5px;"><?php echo $title;?></td>

                    <td align="right" style="width:18px;" class="buttonheading">

                    <?php if($print){?>

                            <a href="javascript:;" onClick="window.print(); return false"><img src="<?php echo $mosConfig_live_site; ?>/images/M_images/printButton.png" width="16" height="16" alt="<?php echo _CMN_PRINT;?>" title="<?php echo _CMN_PRINT;?>" border="0" style="vertical-align:middle;"/></a>

                        <?php }?>

                    </td>

                </tr>

                <tr>

                    <td colspan="2"><img src="<?php echo $img;?>" width="<?php echo $w;?>" height="<?php echo $h;?>" title="<?php echo $title;?>" alt="<?php echo $title;?>" style="cursor:pointer;" onclick="window.close();" /></td>

              </tr>

            </table>

<?php

        break;

    }

}

?>



Hilft dir der Inhalt der jce.php weiter?
Stefan2733
 
Posts: 3
Joined: 10. March 2008 19:23
XAMPP version: 7
Operating System: Win10

Postby Nobbie » 11. March 2008 13:48

<style type="text/css">

body{

margin: 0px;

padding: 0px;

}

</style>

<script type="text/javascript">

var w = '<?php $w;?>';

var h = '<?php echo $h;?>';

var x = (screen.width-parseInt(w))/2;

var y = (screen.height-parseInt(h))/2;


Das obige ist Output. Deutlich mehr als nur Leerzeichen.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Postby Stefan2733 » 11. March 2008 14:41

Das obige ist Output. Deutlich mehr als nur Leerzeichen.
Du meinst, alles was ober der Zeile "<style type="text/css"> " steht?
Soll ich da alle Leerzeilen und -zeichen löschen? Was muss ich denn da alles ändern??

Habe nun die Komponente deinstalliert und es funktioniert - sehr eigenartig!

Ich verstehe nur nicht, warum das Ding dann im Web und auf dem lokalen Server easyphp funktioniert, nur nicht unter XAMPP!
Stefan2733
 
Posts: 3
Joined: 10. March 2008 19:23
XAMPP version: 7
Operating System: Win10


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 44 guests