Jump to content

Site does not render, what am I missing (novice warning)?


parable

Recommended Posts

I have the php from a operating website on my local server which is running apache and php 5.4.4. The local sites doesn't render properly. It should show a banner image that changes, a simple javascript horizontal menu with a few drop down choices for navigation, and some visual styling via css. However all I get is an outline of links, mimicking the menu structure, the plain text that is in index.php. I'm missing some setting in php.ini, or something else. How can I detect what is not configured right? Here is the content of index.php

 

<?php include('includes/header.php'); ?>
<?php include('includes/header_img.php'); ?>
<?php include('includes/menu.php'); ?>

<?php include('includes/SlideShow.php'); ?>
<br>
<div class="myclass">
<p> This is some text that does render in the browser <br>
</p>
</div>
 
<?php  include('includes/footer.php');  ?>

 

All of the expected folders are present, for example the includes folder, as well as the rest of the content.

Link to comment
Share on other sites

Thanks for the reply. Here is what it shows:

 

Notice: Undefined offset: -1 in D:\xampp\htdocs\mytestsite\includes\header.php on line 6

 

In that page, would that be line 6 from the top, excluding whitespace (first line is blank), and does in count line excluding or including php code (probably counts them).

 

Line 6 from the top is

 

$filebase = $fileparts[count($fileparts)-2]; 

 

which looks fairly innocent?

Edited by parable
Link to comment
Share on other sites

Note, there is no db interaction with this website; the issue is something more fundemental.

 

Also, I've tested in both on my local xampp server, and at my webhost, same result. Both locations render php sites normally...except for this one.

Edited by parable
Link to comment
Share on other sites

View the source of the page, to see if any output is available.

 

Also, check the versions of PHP you are using in the working and non-working environments.

Make sure you keep the PHP code to display errors, no doubt its something trivial.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.