Internal server error

(Ответов: 10, Просмотров: 911)
Страница 1 из 2 12 Последняя
  1. Дипломник
    • Регистрация: 01.02.2013
    • Сообщений: 103
    • Репутация: 13
    • Webmoney BL: ?
    Доброй ночи господа!
    Личный блог на WP.
    Выдает такую ошибку: Internal server error
    Нажмите на изображение для увеличения.  Название:	wp.jpg  Просмотров:	13  Размер:	67.1 Кб  ID:	12344
    Проблема в том, что когда добавляю пост с картинкой, такая ошибка. Когда без картинки все хорошо.
    И самое интересное, что все страницы работают, а главная нет
    • 0
  2. Super Moderator Аватар для Демиург
    • Регистрация: 09.06.2011
    • Сообщений: 2,212
    • Репутация: 1782
    • Webmoney BL: ?
    Вряд ли на форуме есть экстрасенсы. И вряд ли это какая-то стандартная ошибка. Я сколько ВП юзал - ни разу с таким не сталкивался. Но вообще некоторое время назад приходилось иметь место с такой ошибкой на сайтах с самописным движком. В процессе нагуглил вот эту статейку, гляньте. Да и вообще Гугл в помощь, как по мне!
    • 1

    Спасибо сказали:

    Foka7(14.11.2013),
  3. Дипломник
    • Регистрация: 01.02.2013
    • Сообщений: 103
    • Репутация: 13
    • Webmoney BL: ?
    Спасибо попробую, там все дело в шаблоне. Это 100%.
    Вспомнил еще случай, вроде как я добавил, перестало работать пошел спать, проснулся утру заработало.
    • 0
  4. Разработка любых сайтов Аватар для ArhStrAngeR
    • Регистрация: 08.06.2011
    • Сообщений: 3,376
    • Записей в дневнике: 1
    • Репутация: 2506
    Foka7,вообще, есть файл ошибок erorr.log - смотрите ошибку в нем, там будет достаточно информации для исправления ее.
    • 0
  5. Сайты на WordPress Аватар для ADvi
    • Регистрация: 22.01.2011
    • Сообщений: 490
    • Репутация: 89
    • Webmoney BL: ?
    Попробуйте временно переименовать файл functions.php темы. Думаю, виновник здесь зарыт. Тогда и будете искать злостную функцию
    Лучший хостинг в рунете | Не делайте людям добро – они вам этого не простят.
    • 1

    Спасибо сказали:

    Foka7(22.11.2013),
  6. Дипломник Аватар для Stendarr
    • Регистрация: 04.09.2013
    • Сообщений: 97
    • Репутация: 29
    • Webmoney BL: ?
    1) смотрите error.log на сервере. Доступ к нему есть?(по фтп например)
    Вариантов может быть множество. Может быть неправильно прописаны права к некоторым папкам, неверный синтаксис в .htaccess
    • 0
  7. Дипломник
    • Регистрация: 01.02.2013
    • Сообщений: 103
    • Репутация: 13
    • Webmoney BL: ?
    Посмотрел error.log там:
    [10-Nov-2013 07:16:34 UTC] PHP Parse error: syntax error, unexpected '<' in /home/login/public_html/site.ru/wp-content/themes/montezuma/functions.php on line 394
    [10-Nov-2013 07:17:21 UTC] PHP Parse error: syntax error, unexpected '<' in /home/login/public_html/site.ru/wp-content/themes/montezuma/functions.php on line 394
    [10-Nov-2013 07:17:22 UTC] PHP Parse error: syntax error, unexpected '<' in /home/login/public_html/site.ru/wp-content/themes/montezuma/functions.php on line 394
    [10-Nov-2013 07:18:15 UTC] PHP Parse error: syntax error, unexpected '%' in /home/login/public_html/site.ru/wp-content/themes/montezuma/functions.php on line 396
    [10-Nov-2013 07:25:01 UTC] PHP Fatal error: Call to undefined function usage() in /home/login/public_html/site.ru/wp-content/themes/montezuma/footer.php on line 12
    [14-Nov-2013 12:35:38 UTC] PHP Fatal error: Call to undefined function bfa_get_virtual_template() in /home/login/public_html/site.ru/wp-content/themes/montezuma/index.php on line 9
    Те что в конце ошибки, это мои попытки восстановить.
    • 0
  8. Сайты на WordPress Аватар для ADvi
    • Регистрация: 22.01.2011
    • Сообщений: 490
    • Репутация: 89
    • Webmoney BL: ?
    Foka7,скиньте под спойлер код из functions.php или ответьте в ЛС
    Лучший хостинг в рунете | Не делайте людям добро – они вам этого не простят.
    • 1

    Спасибо сказали:

    Foka7(22.11.2013),
  9. Дипломник
    • Регистрация: 01.02.2013
    • Сообщений: 103
    • Репутация: 13
    • Webmoney BL: ?

    functions.php

    PHP код:
    <?php 



    /* include all functions */

    foreach ( globget_template_directory() . "/includes/*.php") as $filename) {

        include( 
    $filename );

    }





    $upload_dir wp_upload_dir();



    // 2 db queries

    if( FALSE === ( $bfa_thumb_transient get_transient'bfa_thumb_transient' ) ) )

        
    $bfa_thumb_transient = array();

        

    /*

     * wp-content/uploads is writable and admin page was called at least once = created static css file exists:

     */

    if( is_file$upload_dir['basedir'] . '/montezuma/style.css' ) ) {

        
    $bfa_css '<link rel="stylesheet" type="text/css" media="all" href="' $upload_dir['baseurl'] . '/montezuma/style.css" />';

    /*

     * Fallback: wp-content/uploads not writable or CSS file in wp-uploads not created yet 

     * (The Montezuma admin must be visited at least once for this). 

     */

    } else {

        
    $bfa_css '

    /*************************************************************************

    Default CSS served INLINE because wp-content/uploads is not writable.

    This will change once wp-content/uploads is writable

    **************************************************************************/

    '
    ;

        
    $bfa_css .= implode''fileget_template_directory() . "/admin/default-templates/css/grids/resp12-px-m0px.css" ) );

        foreach ( 
    globget_template_directory() . "/admin/default-templates/css/*.css") as $filename) {

            
    $bfa_css .= implode''file$filename ) );

        }

        
    $bfa_css str_replace'%tpldir%'get_template_directory_uri(), $bfa_css );

        
    $bfa_css "\n<style type='text/css'>\n" $bfa_css "</style>\n";

    }





    /* Enqueuing script with IE *version* condition currently not possible 

     * http://core.trac.wordpress.org/ticket/16024

     * I would print this inline into head.php like Tyenty-twelve but doing it like this to avoid theme review issue

     */

    add_action'wp_head''bfa_add_inline_scripts_head' );

    function 
    bfa_add_inline_scripts_head() {

        global 
    $is_IE; if( $is_IE ): ?>

    <!--[if lt IE 9]>

    <script src="<?php echo get_template_directory_uri(); ?>/javascript/html5.js" type="text/javascript"></script>

    <script src="<?php echo get_template_directory_uri(); ?>/javascript/css3-mediaqueries.js" type="text/javascript"></script>

    <![endif]-->

    <?php endif; 

    }







    /*************************************************************************

    JAVASCRIPT for FRONTEND

    **************************************************************************/

    add_action('wp_enqueue_scripts''bfa_enqueue_scripts'); 

    function 
    bfa_enqueue_scripts() {



        global 
    $montezuma$upload_dir$post;



        if ( 
    is_singular() && comments_open() && get_option'thread_comments' ) )

            
    wp_enqueue_script'comment-reply' );

        

        
    // Check if gallery page

        
    $is_gallery 0;

        if( 
    is_object$post ) && strpos$post->post_content,'[gallery' ) !== false // check if $post is set on error page

             
    $is_gallery 1;

        

        
    $enqu_list = array( 'jquery' );



        
    // Load jquery-ui-core through dependencies, direct wp_enqueue_script('jquery-ui-core') may be broken

        // http://wordpress.org/support/topic/wp_enqueue_script-with-jquery-ui-and-tabs

        // ui-core, ui-.widget and effects-core needed by smooth-menu

        
    $enqu_list[] = 'jquery-ui-core';

        
    $enqu_list[] = 'jquery-ui-widget';

        
    $enqu_list[] = 'jquery-effects-core';

                

        if ( 
    is_singular() && $montezuma['comment_quicktags'] != '' 

            
    $enqu_list[] = 'quicktags';



        if( 
    $is_gallery === ) {

            
    wp_register_script'colorbox'get_template_directory_uri() . '/javascript/jquery.colorbox-min.js', array( 'jquery' ) ); 

            
    $enqu_list[] = 'colorbox';

        }

        

        
    wp_register_script'smooth-menu'get_template_directory_uri() . '/javascript/smooth-menu.js', array( 'jquery' ) ); 

        
    $enqu_list[] = 'smooth-menu';



        

        
    // Premade javascript file if uploads not writable, i.e. first use or WP.org theme viewer:

        
    if( is_file$upload_dir['basedir'] . '/montezuma/javascript.js' ) )

            
    $bfa_base_js_enqueue_url $upload_dir['baseurl'] . '/montezuma/javascript.js';

        else 

            
    $bfa_base_js_enqueue_url get_template_directory_uri() . '/admin/default-templates/javascript/javascript.js';

        

        
    wp_enqueue_script'montezuma-js'$bfa_base_js_enqueue_url$enqu_list );



        
    // wp_enqueue_script('masonry', get_template_directory_uri() . '/javascript/masonry.js');

        // wp_enqueue_script('IE9-html5', get_template_directory_uri() . '/js/ie7/IE8.js'); /* <- JS error in FF? */

        // wp_enqueue_script('css3-mediaqueries', get_template_directory_uri() . '/js/css3-mediaqueries.js');

    }    









    // http://wordpress.stackexchange.com/questions/24851/wp-enqueue-inline-script-due-to-dependancies

    add_action'wp_footer''bfa_print_footer_scripts' );

    if( ! 
    function_exists'bfa_print_footer_scripts' ) ):

        function 
    bfa_print_footer_scripts() {

            global 
    $montezuma;

            if ( 
    $montezuma['comment_quicktags'] != '' && wp_script_is'jquery''done' ) && is_singular() ) {

            
    ?>

    <script type="text/javascript">quicktags({ id: 'comment-form', buttons: '<?php echo $montezuma['comment_quicktags']; ?>' });</script>

            <?php

            
    }

        }

    endif;







    // Remove rel attribute for w3c validator

    #add_filter( 'attachment_link', 'bfa_remove_rel_attr', 10, 2 );

    function bfa_remove_rel_attr$link$id ) {

        
    $link preg_replace'/ rel="(.*?)"/i'''$link );

        return 
    $link;

    }

    #add_filter( 'wp_get_attachment_thumb_URL', 'bfa_remove_rel_attr', 10, 2 );







    function bfa_wp_title$title$sep ) {

        global 
    $paged$page;

        

        if ( 
    is_feed() )

            return 
    $title;



        
    // Add the blog name.

        
    $title .= get_bloginfo'name' );



        
    // Add the blog description for the home/front page.

        
    $site_description get_bloginfo'description''display' );

        if ( 
    $site_description && ( is_home() || is_front_page() ) )

            
    $title "$title $sep $site_description";



        
    // Add a page number if necessary.

        
    if ( $paged >= || $page >= )

            
    $title "$title $sep " sprintf__'Page %s''montezuma' ), max$paged$page ) );

        

        return 
    $title;

    }

    add_filter'wp_title''bfa_wp_title'10);







    /*************************************************************************

    THEME OPTIONS

    new ThemeOptions( $title, $id, $path )

    $path = path to directory of section files containing arrays of option fields

    **************************************************************************/

    if( is_admin() )  {

         new 
    ThemeOptions'Montezuma Options''montezuma'get_template_directory() . '/admin/options' );



    $montezuma get_option'montezuma' );







    # Not used anymore

    #$montezumafilecheck = get_option( 'montezumafilecheck' );



    /**

     * Redirect users to Theme Options after activation, this will also create the 

     * CSS file in the uploads dir, for the first time

     */

    if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )

        
    wp_redirect'themes.php?page=montezuma' );

        







    if( 
    $montezuma['wlwmanifest_link'] != remove_action('wp_head''wlwmanifest_link');

    if( 
    $montezuma['rsd_link'] != remove_action('wp_head''rsd_link');

    if( 
    $montezuma['wp_generator'] != remove_action('wp_head''wp_generator');

    if( 
    $montezuma['feed_links_extra'] != remove_action'wp_head''feed_links_extra');

    if( 
    $montezuma['feed_links'] != remove_action'wp_head''feed_links'); 

    if( 
    $montezuma['adjacent_posts_rel_link_wp_head'] != remove_action('wp_head''adjacent_posts_rel_link_wp_head'100);





        

    // Not used anymore. Would allow to upload .php files to WP upload directory

    /*

    function bfa_add_php_to_upload_mimes( $existing_mimes=array() ) {

        $existing_mimes['php'] = 'application/x-php';

        return $existing_mimes;

    }

    add_filter( 'upload_mimes', 'bfa_add_php_to_upload_mimes' );    

    */

        

        

    // Add category list below "Blog" page item, in page menu 

    if ( ! function_exists'bfa_add_blog_cats_to_menu' ) ):

    function 
    bfa_add_blog_cats_to_menu($str) {

        
    $cats wp_list_categories('title_li=&echo=0');

        
    $title get_the_title(get_option('page_for_posts'));

        return 
    str_replace('">'.$title.'</a>''">'.$title.'</a><ul>'.$cats.'</ul>'$str);

    }

    endif;

    # add_filter('wp_list_pages', 'bfa_add_blog_cats_to_menu', 1);







    // Theme setup

    if ( ! function_exists'montezuma_setup' ) ):

    function 
    montezuma_setup() {



        if ( ! isset( 
    $content_width ) )

        
    $content_width 640;



        
    load_theme_textdomain'montezuma'get_template_directory() . '/languages' );



        
    // Add all 9 WP post formats

        
    add_theme_support'post-formats', array( 'aside''audio''chat''gallery''image''link''quote''status''video' ) );

        
    add_theme_support"post-thumbnails" );

        
    // set_post_thumbnail_size( 320, 180, true );

        
    add_theme_support("automatic-feed-links");

        
    register_nav_menus( array( "menu1" => __"Menu 1""montezuma" ), "menu2" => __"Menu 2""montezuma" ) ) );

    }

    endif;

    add_action'after_setup_theme''montezuma_setup' );







    ####### Link post thumbs to post, not to full size image #####

    function bfa_link_post_thumbnails_to_post$html$post_id$post_image_id ) {

        
    /*

        $html = '<a href="' . get_permalink( $post_id ) . '" title="' . 

            esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';

        */

        
    $html str_replace('width="320" height="180" '''$html);

        return 
    $html;

    }

    add_filter'post_thumbnail_html''bfa_link_post_thumbnails_to_post'10);









    /*

    // Add custom widgets

    add_action( 'widgets_init', function() {

         return register_widget( 'ATA_Widget_Meta' );

    });

    */





    if( ! function_exists'bfa_comments_allowedtags' ) ) :

    function 
    bfa_comments_allowedtags$data ) {

        global 
    $allowedtags$montezuma



        
    $availabletags = array(

            
    'a' => array( 'href' => true'title' => true ),

            
    'abbr' => array( 'title' => true ),

            
    'acronym' => array( 'title' => true ),

            
    'b' => array(),

            
    'blockquote' => array( 'cite' => true ),

            
    'br' => array(),

            
    'cite' => array(),

            
    'code' => array(),

            
    'del' => array( 'datetime' => true ),

            
    'dd' => array(),

            
    'dl' => array(),

            
    'dt' => array(),

            
    'em' => array (), 'i' => array (),

            
    'ins' => array('datetime' => array(), 'cite' => array()),

            
    'li' => array(),

            
    'ol' => array(),

            
    'p' => array(),

            
    'q' => array( 'cite' => true ),

            
    'strike' => array(),

            
    'strong' => array(),

            
    'sub' => array(),

            
    'sup' => array(),

            
    'u' => array(),

            
    'ul' => array(),

        );

        
    $allowednow = array();

        

        foreach( 
    $montezuma['comment_allowed_tags'] as $tag 

            
    $allowednow[$tag] = $availabletags[$tag];



        
    $allowedtags $allowednow;

        return 
    $data;

    }

    endif;

    add_filter'preprocess_comment''bfa_comments_allowedtags' );







    /* filter tagcloud */

    if( ! function_exists'bfa_filter_tag_cloud' ) ) :

    function 
    bfa_filter_tag_cloud$tags ) {

        
    $tags preg_replace_callback("|(class='tag-link-[0-9]+)('.*?)(style='font-size: )(.*?)(pt;')|",

            
    create_function(

                
    '$match',

                
    '$low=1; $high=5; $sz=round(($match[4]-8.0)/(22-8)*($high-$low)+$low); return "{$match[1]} tagsize-{$sz}{$match[2]}";'

            
    ),

            
    $tags);

        return 
    $tags;

    }

    endif;

    add_action('wp_tag_cloud''bfa_filter_tag_cloud');







    function 
    bfa_buffer_callback$buffer ) {

      
    $buffer str_replace

            array( 
    'http://wp331.testing.com'"\t""</a>\n</li>""</ul>\n</li>" ),

            array( 
    '''''</a></li>''</ul></li>' ),

            
    $buffer 

        
    );

      return 
    $buffer;

    }

    function 
    bfa_buffer_start() { 

        
    ob_start'bfa_buffer_callback' ); 

    }

    function 
    bfa_buffer_end() { 

        
    ob_end_flush(); 

    }

    #add_action('wp_head', 'bfa_buffer_start');

    #add_action('wp_footer', 'bfa_buffer_end');







    // Change default Excerpt Length to custom length:



    function bfa_excerpt_length$length ) { 

        return 
    55;

    }

    add_filter'excerpt_length''bfa_excerpt_length' );





    // Build custom Read More link, used for both auto and manual excerpts

    function bfa_read_more_link() {

        return 
    str_replace

            array( 
    '%title%''%url%' ), 

            array( 
    the_title''''FALSE ), esc_urlget_permalink() ) ), 

            
    // ' <strong>... continue reading &raquo;</strong> <a href="%url%">%title%</a>' 

            
    ' ...<a class="post-readmore" href="%url%">' __'read more''montezuma' ) . '</a>' 

        
    );

    }





    // Replace default Read More link with custom one:

    function bfa_excerpt_more$more ) {

        return 
    bfa_read_more_link();

    }

    add_filter'excerpt_more''bfa_excerpt_more' );





    // Add custom Read More link to manual excerpts:

    function bfa_custom_excerpt_more$output ) {

        if ( 
    has_excerpt() && ! is_attachment() ) 

            
    $output .= bfa_read_more_link();

        return 
    $output;

    }

    add_filter'get_the_excerpt''bfa_custom_excerpt_more' );







    function 
    bfa_include_file$file_group$file_name ) {



        global 
    $montezumafilecheck$upload_dir;

        

        
    $time_start microtime(true); // Start timer

        
    $file trailingslashit$upload_dir['basedir'] ) . "montezuma/$file_name.php";



        if( ! 
    file_exists$file ) ) { // Edited file doesn't exist

            
    include trailingslashitget_template_directory() ) . "$file_group/$file_name.php";

        } else {

            
    extract$montezumafilecheck['files'][$file_group][$file_name] ); // Get file info: $time, $size, $md5:

            

            // Edited file exists. These checks should take around 5 ms on an average web server:

            
    $filetime filemtime$file );

            
    $filesize filesize$file );

            
    $filemd5 md5_file$file );



            
    // Include file only if live info matches with saved info:

            
    if( $time == $filetime && $size == $filesize && $filemd5 == $md5 ) {

                include 
    trailingslashit$upload_dir['basedir'] ) . "montezuma/$file_name.php";

            }



            
    $time_end microtime(true); // Stop timer

            
    $time $time_end $time_start;

            echo 
    "<!-- Rendered in $time seconds -->\n";

        }

    }
    [свернуть]
    • 0
  10. Опытный Аватар для doctordick
    • Регистрация: 03.09.2009
    • Сообщений: 302
    • Записей в дневнике: 1
    • Репутация: 60
    Я бы на тестовом вордпрессе по порядку отключал плагины и смотрел результат, тема навороченная и с ней могут конфликтовать плагины (к примеру - Polylang).
    • 0
Страница 1 из 2 12 Последняя

Похожие темы

Темы Раздел Ответов Последний пост
500 Internal Server Error
Joomla 10 21.07.2013 02:12
Parse error: syntax error, unexpected T_VARIABLE in
Joomla 2 06.04.2013 00:56
MySQL Error! Error Number: 1 Что делать???
CMS 4 15.06.2012 18:37
YML-файл Parse error: syntax error
Поисковые системы 0 04.04.2012 02:37
ftp server
Web программирование 3 18.04.2011 09:22

У кого попросить инвайт?

Вы можете попросить инвайт у любого модератора:

Информеры