cerebrus189 Posted January 31, 2010 Share Posted January 31, 2010 Hi all, Got a relatively simple question here hopefully. I've updated my files to include some new PHP files (html should have been used cuz there's nothing dynamic about the site when it comes to these pages but I'm retaining consistency site-wide) and I'm now testing these on the test server which hosts our intranet and the other server is our web development server, both of which have PHP installed and both of which are rendering the same way. However, when I access the page, the PHP include topstuff.php isn't rendering at all. I'm getting some little x's where the navigation should be but nothing else. The X's give me a title, so the idea of the navigation is being rendered but its not loading completely. The bottom PHP include file is rendered properly but includes only text. Could this be a problem with navigation to the pictures in the PHP file? Or is this something different as far as the PHP client-side files are concerned? Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/ Share on other sites More sharing options...
premiso Posted January 31, 2010 Share Posted January 31, 2010 Make sure the images are on the server where the html file points to, as that is the issue. Nothing to do with PHP from what you have stated so far, it has more to do with the images actually being on the server and in the proper location. Moving to HTML section. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004503 Share on other sites More sharing options...
cerebrus189 Posted January 31, 2010 Author Share Posted January 31, 2010 i moved the entire site over to the test server. so yeah all the files are there and moved into the same exact file structure as the one on our remote server. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004504 Share on other sites More sharing options...
premiso Posted January 31, 2010 Share Posted January 31, 2010 Mis-haps can still happen. Is your server directory structure the exact same? I would just verify the source of the HTML that the images are pointing to the right location and verify that the images are in the correct location. The red x's mean that the image is not at the location it is pointing to. Simple as that. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004505 Share on other sites More sharing options...
PFMaBiSmAd Posted January 31, 2010 Share Posted January 31, 2010 Your URL's on the page probably have the domain hardcoded, rather than using domain-root relative URL's. Have you even examined the HTML source that corresponds to an element that is not working? Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004506 Share on other sites More sharing options...
cerebrus189 Posted January 31, 2010 Author Share Posted January 31, 2010 I have accessed the elements, in this case topstuff.php which is included in the root folder of my website. The index_files references for pictures has also been checked. Now when I render the page, it doesn't render any x's. But at work, I was able to get it to render x's in firefox. That's why I believed it was a problem with php. When I look at the the php files, I see no reference to any domain. Where would I check this otherwise? This is the type of information that is needed because I don't know enough about php to check something like this. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004512 Share on other sites More sharing options...
cerebrus189 Posted January 31, 2010 Author Share Posted January 31, 2010 Are you talking about my site's files such as picture location, etc? If you are, that's not the issue. I've checked everything as far as location goes and my file structure is fine. Its not rendering my php include properly. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004514 Share on other sites More sharing options...
PFMaBiSmAd Posted January 31, 2010 Share Posted January 31, 2010 The only way someone on a forum (someone not standing right beside you) can possibly help you find which one of the half-dozen possible different things that could be causing the symptom you are describing is if you post the code responsible for the symptom and either identify exactly what part of the code is not working or show us where in the resulting output something is not working. You would need to post the code for a page that is not working along with posting the "view source" of that page from your browser and either tell us the name of one of elements in the 'view source" that is not working or post a screen shot identifying one of the elements that is not working. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1004575 Share on other sites More sharing options...
cerebrus189 Posted February 1, 2010 Author Share Posted February 1, 2010 Understood. Here's the PHP code responsible for showing the include file. This bit of code is listed in all my relevant files that I've just created. The '/' is necessary for navigation since these files are contained within a folder named News. <?php include($_SERVER['DOCUMENT_ROOT']. 'topstuff.php'); ?> This is the navigation it should be showing. Attached is a screenshot of my files. The PHP installation folder is just below the file navigation, on the same level as the Inetpub folder. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1005076 Share on other sites More sharing options...
haku Posted February 2, 2010 Share Posted February 2, 2010 Why don't you try showing us the stuff pmfgbisdi mentioned? Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1005255 Share on other sites More sharing options...
cerebrus189 Posted February 3, 2010 Author Share Posted February 3, 2010 It's not a problem with my code. I believe it has more to do with my file structure. I'm able to render the pages perfectly on the remote server (Linux box) but not locally on Windows box using PHP. I included a screenshot of what I'm seeing as well as the index.php file code. All of the websites were recently moved under IIS folder Inetpub/wwwroot/ directory. They are also all listed under the main "Default Web Site" directly in IIS. Could this be the issue? I also checked my scripts to be sure they are enabled in the properties option. It should be noted that our intranet, which is on the same level in IIS and in the file directly runs PHP just fine. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1006218 Share on other sites More sharing options...
premiso Posted February 3, 2010 Share Posted February 3, 2010 You are not listening to anything anyone is telling you. Do a Right Click -> View Source on that localhost page you just put a give image. Inside there you will see the generated HTML Source code, look for the <img tags and look at the src attribute in them. Now, once you have that look at the structure as it will be something like: <img src="/some/url/image.gif"> given that you should be able to see where it is looking for the images at. If there are no images at that location that is your problem. It is as simple as that. The location the image tag is looking for the images is non-existent. The sooner you accept that the sooner you can fix your problem. The only 2 ways for the red x's to appear is the image NOT being at the location, or the image not being an image (or not being served properly by the server). Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1006287 Share on other sites More sharing options...
cerebrus189 Posted February 3, 2010 Author Share Posted February 3, 2010 Okay, I'll try listening better. Sorry about that. I really do appreciate the help. When I tried rendering the page on the server through //localhost/ it displayed the x's so when I inquired about the properties of the images, it was looking for them in the root folder. So I basically took all the files from inside that Opening Doors Folder and went up a few levels to the wwwroot folder where I put everything and voila!! They're all there now but my menus are acting screwy. So it was an issue with the structure and the availability of the images contained in the root folder of the webdev server. Now that I know how to correct it (well mostly until I play around with it a bit more), I can fix the issue. Quote Link to comment https://forums.phpfreaks.com/topic/190430-php-include-not-rendering-on-test-server/#findComment-1006362 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.