PDA

View Full Version : Moving From Windows -> Linux server....


barkingpenguin
02-19-2004, 07:36 AM
Hello Folks!

I have Win2k Pro with Apache 2, PHP 4, mySQL, etc. on my development machine at home.

I have created a web site using a simple <?php require('header.html'); ?> and everything works splendidly at home. When I upload it to my WebHost the page is being included, but I'm not seeing any of the images. I have maintained the same directory structure on both machines.

If you wanna look, the site is at barkingpenguin (http://rdckc.barkingpenguin.ca)

Any thoughts?

Thanks

dabbler
02-19-2004, 08:46 AM
Hi there and welcome to the forum.

First of all, have a look at the source of your page.

There is a real mix up with html pages within html pages, complete with doctypes within the body.

At first sight I'm sure your problems can be cleared up by sorting that out.

View>Page Source or right click to see what I mean. The include is evidently including so much more than you intend.
Once that is sorted you can look more clearly at what the problems might be.

Hope this helps for a start.

barkingpenguin
02-19-2004, 09:02 AM
Thanks dabbler.

This is weird. Here is the source code for 'index.php' when I view source locally:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<title>Red Deer Canoe &amp; Kayak Club</title>
<link rel=stylesheet type=text/css href=layout.css />
<style type=text/css> <!-- a:Hover {color: red;} --> </style>
</head>
<body>
<?php require('header.html'); ?>
<!--Content-->
<div id=rh-col>
<h3>Red Deer Canoe &amp; Kayak Club</h3><br />
<img src="images/canoe.jpg" border="3" alt="Canoe" />
</div>
</body>
</html>

but when I view source from the internet, it is including the source code for the 'header.html' file.

What's up with that? :confused:

dabbler
02-19-2004, 09:13 AM
The php require is inserting the entire file "header.html" into the body of your index page.
What is "header.html"? Remember evrything in that file is being included.

barkingpenguin
02-19-2004, 09:41 AM
I see now that the entire file gets inserted. Can you tell I'm a n00b? :D

'header.html' contains an imagemap that I created for navigating the site. If you view the source now, it is the first table in the body section. I used Photoshop to create it.

I tried stripping the extraneous html code but still have the same problem.

There's still something wierd with images though, because the 'Canoe' image is supposed to be pulled directly from the 'images' folder, but it's not getting there either.

I've looked at the permissions and compared them with my primary domain (barkingpenguin.ca). They look okay, but I'm really not 100% certain what they should be. If I navigate to the 'images' folder: http://rdckc.barkingpenguin.ca/images everything gets listed, but trying to view an image will get you a permission error.

I really appreciate your help!

MikeParent
02-19-2004, 10:31 AM
Further weirdness...

When I click on an image in the images folder and get the forbidden error, I copy the URL to the clipboard, go file, open and paste the "broken" URL in and press enter and the image comes up... !?!?!

You may want to talk to web hosting company... that is incredibly odd...

If you have the ability to change the image file permissions, try setting them wide open.

barkingpenguin
02-19-2004, 10:39 AM
Thanks Mike.

Halifax...my hometown! How's the weather, hehehe!

Is 'wide open' 0755?

Thanks!

barkingpenguin
02-19-2004, 10:50 AM
Okay, this is freakin' me out! (Not really, hehe!)

I've been trying to use this sub-domain: rdckc.barkingpenguin.ca

Doesn't work. However, if I surf to:

http://barkingpenguin.ca/rdckc

Presto! It works!

I'll talk to my web host.

Thanks everyone!

azlatin2000
02-19-2004, 11:49 AM
Originally posted by MikeParent
Further weirdness...

When I click on an image in the images folder and get the forbidden error, I copy the URL to the clipboard, go file, open and paste the "broken" URL in and press enter and the image comes up... !?!?!

You may want to talk to web hosting company... that is incredibly odd...

If you have the ability to change the image file permissions, try setting them wide open.

I think maybe your host checks the referer of the pages (to prevent hotlinking) and and they made a mistake so it doesn't let your own site get images.

MikeParent
02-19-2004, 03:35 PM
The weather... well, for those not in the know me and DCElliot would be snowed in (we live in the same city) - 30 inches of snow and 60 mile/hour winds... sound like fun?

MikeParent
02-19-2004, 03:36 PM
Technically I guess wide open would be 777 :-)

azlatin2000
02-19-2004, 06:42 PM
Some servers have it set up as 755 some as 777.