• I finally figured out why my old template was messing up, so I went through and completley re-installed wp (it was in the wrong directory) and thought it’d be fixed, but now I get this parse error:
    Parse error: parse error in /home/thefad3/public_html/index.php on line 46
    but the line 46 in my template is the call for the comments link?
    The page: https://www.thefad3d.net/index.php
    The code:
    <HTML>
    <head profile="https://gmpg.org/xfn/1">
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    <TITLE>
    TheFad3d.net - With a broken heart and straight face..
    </TITLE>
    <LINK REL="stylesheet" TYPE="text/css" HREF="style.css">
    </HEAD>
    <BODY LFTMARGIN="10" TOPMARGIN="10">
    <TABLE WIDTH="748" cellpadding="0" CELLSPACING="0">
    <TR>
    <TD WIDTH="748" HEIGHT="500">
    <IMG SRC="silver.jpg" WIDTH="748" HEIGHT="500">
    </TD>
    </TR>
    </TABLE>
    <TABLE WIDTH="748" CELLPADDING="10" CELLSPACING="0">
    <TR>
    <TD VALIGN="top" WIDTH="200">
    <? include("left.txt"); ?>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(); ?>
    " title="<?php the_title(); ?>"><?php the_title(); ?>
    <?php _e("In:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time('g.ia', display') ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    </div>
    <center><label for="s"><?php _e('Search:'); ?></label>
    <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
    <div>
    <input type="text" name="s" id="s" size="15" />

    <input type="submit" name="submit" value="<?php _e('Search'); ?>" />
    </div>
    </form>
    <?php _e('Archives:'); ?>
    <?php wp_get_archives('type=monthly'); ?></center>
    /wp-login.php"><?php _e('Login'); ?>
    <?php _e('Meta:'); ?>
    <p class="credit"><!--<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by WordPress"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform")); ?></cite>
    <? include("right.txt"); ?>
    <? include("footer.txt"); ?>

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter thefaded

    (@thefaded)

    er, I get the same parse error when I try to login at https://www.thefad3d.net/wp-admin/index.php

    Umm, where are the required files like wp-blog-header? Also,
    <?php the_time(‘g.ia’, display’) ?>
    is incorrect. I’d suggest you go back to the index template and be a touch more careful.

    Thread Starter thefaded

    (@thefaded)

    I installed WP in the root directory. The index template is all fine and good ( I actually kept it but renamed it for future reference), but my entire WP is messed up ??

    Thread Starter thefaded

    (@thefaded)

    Fixed the time tag, and now I get a different error on index.php, but the parse error is still there when I go to /wp-admin
    new error: <meta http-equiv=”Content-Type” content=”text/html; charset=
    Fatal error: Call to undefined function: bloginfo() in /home/thefad3/public_html/index.php on line 4

    Thread Starter thefaded

    (@thefaded)

    ugh..

    Is this definitely in your index.php ?
    <?php
    /* Don’t remove this line. */
    require(‘./wp-blog-header.php’);
    ?>
    If it is, then the path to that php file above is wrong……

    Thread Starter thefaded

    (@thefaded)

    Wow. I didn’t. That was smart of me..

    Thread Starter thefaded

    (@thefaded)

    I added that, but it didn’t fix anything ??

    If putting that line in did not fix the problem, then the path ‘./wp-blog-header.php’ is wrong.
    Just editing that line alone may not fix the issue though, as other parts of the install may break if they too are not properly referenced.
    If you are installing into 2 directories (I’ve not tried to do this yet so I’m guessing) did you follow the instructions from scratch ?

    Thread Starter thefaded

    (@thefaded)

    I didn’t install it into two places, I installed it in a directory (/wp) and then uninstalled it, cleared out the database, and installed it in the root. I followed the instructions from scractch both times though.
    I’m not sure what to put for the path though? probably just delete the ‘.’, right?

    If all the files are installed in root – or one directory – then I can’t see why it’s not able to get wp-blog-header ?

    Thread Starter thefaded

    (@thefaded)

    do you think I should just re-install again?

    I must remember to look for the other files !
    Good stuff Beel ??

    Thread Starter thefaded

    (@thefaded)

    erm, the index template now works, BUT I still get “
    Parse error: parse error in /home/thefad3/public_html/wp-admin/index.php on line 46″ when I try to log in to wp :/

    I just logged in to your site as “test” user (you will want to delete that). The index file in that directory is nothing more than a redirect page:
    <?php
    require(‘../wp-config.php’);
    require_once(‘auth.php’);
    get_currentuserinfo();
    if (0 == $user_level) {
    $redirect_to = get_settings(‘siteurl’) . ‘/wp-admin/profile.php’;
    } else {
    $redirect_to = get_settings(‘siteurl’) . ‘/wp-admin/post.php’;
    }
    header (“Location: $redirect_to”);
    ?>

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Parse Error’ is closed to new replies.