parable Posted March 21, 2013 Share Posted March 21, 2013 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. Quote Link to comment Share on other sites More sharing options...
PaulRyan Posted March 21, 2013 Share Posted March 21, 2013 Put the following at the very top of your PHP page. <?PHP error_reporting(E_ALL); ini_set('display_errors', 1); ?> Quote Link to comment Share on other sites More sharing options...
parable Posted March 21, 2013 Author Share Posted March 21, 2013 (edited) 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 March 21, 2013 by parable Quote Link to comment Share on other sites More sharing options...
Jessica Posted March 21, 2013 Share Posted March 21, 2013 Sounds like $fileparts only has one value in it, since, 1-2 = -1. Quote Link to comment Share on other sites More sharing options...
parable Posted March 21, 2013 Author Share Posted March 21, 2013 But, that same code exists in the real live website, which works fine. I think it's a config issue with my local copy, even if that is a coding error, or if the value passed is 'wrong' for the function. Quote Link to comment Share on other sites More sharing options...
parable Posted March 22, 2013 Author Share Posted March 22, 2013 (edited) 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 March 22, 2013 by parable Quote Link to comment Share on other sites More sharing options...
parable Posted March 22, 2013 Author Share Posted March 22, 2013 Now I rem'd all of the php code in the header.php file. No change when I run index.php, which references it, other than the error message is gone. There is still a comlete lack of css or other layout styling. Quote Link to comment Share on other sites More sharing options...
PaulRyan Posted March 22, 2013 Share Posted March 22, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.