Jump to content

Recommended Posts

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?

 

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.

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.

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.

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.

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]

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]

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).

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.

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.