• Okay… I’ve put something similar up, but I can’t find my old topic…
    Anyway, I’m still having trouble getting the posts that are in the database to show. I do have some text on the page now instead of a completely blank page.

    Posted by at
    Powered by WordPress
    login
    Suffolk County Sheriffs Office
    ???? Copyright. All Rights Reserved

    I still can’t find the problem in my source code that would cause the page not to display.

    <?php /* Don't remove this line. */ require('https://scsoweb/securityweb/wp-blog-header.php'); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head profile="https://gmpg.org/xfn/1">
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
    <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 wp_head(); ?>
    </HEAD>
    <BODY>
    <h1 id="header">"><?php bloginfo('name'); ?></h1>
    <CENTER><p align="center">
    <P align="center">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">
    " title="<?php the_title(); ?>">
    <?php the_title(); ?>

    </h3>
    Posted by <?php the_author(); ?> at <?php the_time(); ?> <?php edit_post_link(); ?>
    <?php the_content(); ?>
    <?php endforeach; else: ?>

    <?php _e('Sorry, no posts matched your criteria.'); ?>

    <?php endif; ?>
    </P>
    <br>
    <cite>Powered by WordPress</cite>

    login<br>
    <br>
    <P><font size="1"><I>Suffolk County Sheriffs Office<BR>
    ???? Copyright. All Rights Reserved<BR>
    </CENTER></I></font></P></P>
    </BODY></HTML>

    The line breaks are a bit weird because of the width of the forum columns, but I don’t have any linebreaks in my tags in the actual code. I already checked that. ^^;;
    Could this be a database issue, too? If so, what would it be?
    And why isn’t this turning out to be as easy as everyone around here says it is??? LOL.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I see that some tags are in CAPITALS. I don’t recognize capital tags from XHTML (and the code will generate XHTML) Does fixing that help?

    Thread Starter duches77

    (@duches77)

    Okay… I take back on the first post. Still getting a blank page…

    Save your file under .phps and give us the link. This is kind of a mess to read.

    Thread Starter duches77

    (@duches77)

    I can’t. It’s an intranet site. I would if I could.

    Thread Starter duches77

    (@duches77)

    The best I can come up with is to maybe save a copy of the file on a public server, but it won’t have access to any of the other stuff.
    I attempted that here: https://www.therealmonline.org/wordpresstest/
    But, as you can see, it doesn’t work because it doesn’t have the databases.

    I say this in the nicest way. That file has been hacked *to death*. It has got all three issues at once, xhtml, php, and css. That is not only a mess but it is exceptionally difficult to isolate, the errors. Quick fix. Get a server. Anywhere. If need be rob the petty cash but get online. Then install WP default. Put in a few posts. Start editing the way you want. Do not edit, php, xhtml and css simaltaneously. If you get stuck post here. When you are ready ftp the index and css back to your location. Get going fast and we can fix this before the Warden does his rounds. Good luck.

    I think the problem is in the first line. You removed the “do not remove this line” by moving it up a line.
    And, of course, see if it runs with the default index.php that shipped with WP before trying to customize anything.

    Actually, I downloaded the code, change the link to wp-blog-header to the location on my server and it ran fine (with the exception that there is no call to a style sheet). If the “Posted at, etc.” is what you are seeing on the page, then I assume wp-blog-header is being called properly, but some settings are incorrect. Do you get any error messages when viewing the *source* of the generated page (not just the page itself, in case error messages are turned off)?.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP Problem?’ is closed to new replies.