Apache images.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PanK
Forum Commoner
Posts: 36
Joined: Mon Nov 22, 2004 1:24 pm
Location: Richmond Hill, ON, Canada

Apache images.

Post by PanK »

Hello. I'm using Apache server. PHP code is working fast, but imeges load VERY slow, whatmight be the problem?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Should technically be in the "Apache, IIS, Web Servers" forum of this website.

Have you tried other servers without this problem?... sounds more like a bandwidth issue. I haven't heard of this happening before.

Either way, this isn't PHP :roll:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

want to explain how your pages work, or should we just guess? :P
PanK
Forum Commoner
Posts: 36
Joined: Mon Nov 22, 2004 1:24 pm
Location: Richmond Hill, ON, Canada

Post by PanK »

When you load a page, all text displayes right away, but images, comes later. I think that there is some settings in Apache. Does any body know what should be changed?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

images come in a seperate stream from html.. so they will not always appear at the exact same time.. this is normal behaviour.
PanK
Forum Commoner
Posts: 36
Joined: Mon Nov 22, 2004 1:24 pm
Location: Richmond Hill, ON, Canada

Post by PanK »

I know that images usualy are a bit slower, but in my case thay are too slow.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

where are the images coming from? Maybe you should post your code?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I don't believe there are any settings in Apache to do that.... what would be the point? Does this even happen when running scripts on localhost 127.0.0.1 ?

Post some code... it may be something else.

As already asked... have you noticed performance increases using other web servers?

EDIT: Like feyd is getting at too. Are you're images from relative or absolute URL's? i.e. http:// or /dir/file.jpg ??
PanK
Forum Commoner
Posts: 36
Joined: Mon Nov 22, 2004 1:24 pm
Location: Richmond Hill, ON, Canada

Post by PanK »

Here is some code, but it's plain HTML.

Code: Select all

<td width="8%">
<img src="../images/sil_mtb.gif" width="56" height="56">
</td>
Maybe somebody know about some settings for seperate stream from html??
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

OK so you didn't mention the thumbnail generation script.

Did you write it yourself? What's the code in the displaythumbnail.php file? What library are you using for it?

EDIT: Seems you editted your post to remove the displaythumbnail.php?id=**** part.
PanK
Forum Commoner
Posts: 36
Joined: Mon Nov 22, 2004 1:24 pm
Location: Richmond Hill, ON, Canada

Post by PanK »

I posted a wrong code, the problem accures even with plain images.
I can not try it on localhost, because server is far from me.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

can you post a link so we can look for ourselves?
PanK
Forum Commoner
Posts: 36
Joined: Mon Nov 22, 2004 1:24 pm
Location: Richmond Hill, ON, Canada

Post by PanK »

http://propertysold.ca/
It's slow by itself, but images, when you load page first time comes after everything else.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Images loaded as normal for me. The very first time I viewed the page. The page just showed as a blank white screen and the kaboom, the whole page appeared. OK it took a while but that'll just be bandwidth issue like I mentioned earlier.... shared server by any chance?

I also notice that you link to all your background images like this

http://www.propertysold.ca/img/view_listings_bg.gif

Change these to relative urls (i.e. /img/view_listings_bg.gif etc).... that should shave some time off.

Thumbnail scripts slow things down a bit too.

Doesn't seem too abnormal to me though :wink: :?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

page loads fine for me too.. Are the images pulled from scripts stored in a database? This includes the houses and the ad banner.
Post Reply