Odpowiedź forum utworzona

Viewing 7 replies - 1 through 7 (of 7 total)
  • Twórca wątku spawnster

    (@spawnster)

    Okazuje się, że patrzyłem nie na te linie gdzie trzeba: spacje niepotrzebne były, tylko trzeba było wiedzieć gdzie patrzeć

    Twórca wątku spawnster

    (@spawnster)

    Ha – myślenie nie boli i znajomość anglickiego tyż nie: rozwiązanie:

    Reason and Solution :

    It is usually because there are spaces, new lines, or other garbage before an opening <?php tag or after a closing ?> tag, typically in wp-config.php. This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred (see „Interpreting the Error Message” below). Replacing the faulty file with one from your most recent backup or one from a fresh WordPress download is your best bet, but if neither of those are an option, please follow the steps below.

    Just because you cannot see anything does not mean that PHP sees the same.

    1. Download the file mentioned in the error message.
    2. Open that file in a plain text editor (NOT MS Word or similar. Notepad or BBEdit are fine).
    3. Check that the very first characters are <?php
    4. Check that the very last characters are ?>

    To be sure about the end of the file, do this:

    1. Place the cursor between the ? and >
    2. Now press the DELETE key on your computer
    * Note to MAC users: The „DELETE” key on a PC deletes characters to the right of the cursor. That is the key noted here.
    3. Keep that key pressed
    4. For at least 15 seconds
    5. Now type > and
    6. save without pressing any other key at all.
    7. If you press another key, you will bring the problem back.

    Also check the encoding of the file. If the file is encoded as UTF-8 with BOM, the BOM is seen as a character which starts the output.

    Interpreting the Error Message:

    If the error message states: Warning: Cannot modify header information – headers already sent by (output started at /path/blog/wp-config.php:34) in /path/blog/wp-login.php on line 42, then the problem is at line #34 of wp-config.php, not line #42 of wp-login.php. In this scenario, line #42 of wp-login.php is the victim. It is being affected by the excess whitespace at line #34 of wp-config.php.

    If the error message states: Warning: Cannot modify header information – headers already sent by (output started at /path/wp-admin/admin-header.php:8) in /path/wp-admin/post.php on line 569, then the problem is at line #8 of admin-header.php, not line #569 of post.php. In this scenario, line #569 of post.php is the victim. It is being affected by the excess whitespace at line #8 of admin-header.php.

    Other issues that might cause that error:

    In case you’ve used the function: wp_redirect() or tried to use a header redirect after the header (or any content at all was sent) that error message will pop. Instead use javascript redirection if needed.

    Twórca wątku spawnster

    (@spawnster)

    Aha, dodam, że sprawdziłem czy nie mam pustych spacji <?php i po?> w w/w plikach …

    Twórca wątku spawnster

    (@spawnster)

    Piękne podziękowania dla pana powyżej. Faktycznie, mogłem się domyśleć że 'showcount’ to licznik …:)

    Twórca wątku spawnster

    (@spawnster)

    Witam, dzięki za odpowiedzi. Funkcja list cats podana przez flasha jak najbardziej działa, z tym że wywołuje nowe kategorie i teraz mam dwie:) Jeśli chodzi o funkcję do kategorii to jest to:

    <?php if(get_arclite_option(’sidebar_categories’)) { ?>
    <li class=”block”>
    <!– sidebar menu (categories) –>
    <ul class=”menu”>
    <?php if(!get_arclite_option(’jquery’)):
    echo preg_replace(’@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i’, '<li$1>$3’, wp_list_categories(’show_count=0&echo=0&title_li=’));
    else:
    echo preg_replace(’@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a> \(\]*) ([^>]*)>(.*?)\<\/a>\)@i’, '<li $1>$3’, wp_list_categories(’show_count=0&echo=0&title_li=&feed=XML’));
    endif;
    if (function_exists(’xili_language_list’)) xili_language_list(); ?>

    Zaznaczam, że laik ze mnie w tej tematyce, w tym wypadku 'arclite’ to nazwa szablonu (modyfikuję go do własnych potrzeb, ale jaki efekt każdy widzi;)

    Ha! Banał! Wystarczy ręcznie pozamieniać znaczki na polskie i już wyświetla normalnie:)

    Miałem identycznie, ten sam problem. Rozwiązanie: problem jest w pliku wp config. Sprawdź czy na końcu masz znacznik zamykający ?> , ja np nie miałem. Poza tym skorzystaj z darmowego notepad++ i w edycji wybierz opcję „usun spacje”. Dodatkowo, strona nie dziala pod uft 8, musisz w opcjach wybrac zmiane na „uft 8 bez mod. Wszystko to co powyzej znajdzieszw notepad. Aha, zeby nie bylo tak rozowo, teraz dla odmiany nie bedziesz mial polskich znakow tylko krzaczki, ale strona ruszy. Moze ktos wie, jak to zrobic zeby byly polskie znaki zamiast krzakow? (samo kodowanie uft -8 generuje bledy, dziala dopiero na uft bez mod)

Viewing 7 replies - 1 through 7 (of 7 total)