Forum Moderators: travelin cat
I made a photobook in php 5 running with apache 2.
The problem is that if a visitor clicks on a photo to enlage it
(well, to open the image file in real size in a popup)
the image stops loading after being loaded for 1/10
after refreshing it loads 3/10 then after more refreshing it will load the entire photo. Very strange. Looks like the request died or something to me.
the viewer script imgwindow.php:
<?php
//dunno if this header is needed:
header("HTTP/1.1 202 Accepted");
$image = $_GET['img'];
$echo = "Content-type: image";
$imgtype = substr(mime_content_type($image), 5);
header($echo . $imgtype);
echo readfile($_GET['img']);
?>
so if I go to:
[localhost...]
the picture won't load 100% (well my home PowerMac is the server so I can use localhost but then it just works fine... , external clients have problems only)
I know this is not the best way yo make a image viewer window but I only spent 5 seconds on this simple script only to complete my new photo album.
If someone could tell me why big images arent loading
(they even won't if I go to the images directly without any script, but then I had to turn off the sercurity settings in my apache cfg and thats why I use a script to get them)
John
The only way to fix it is to build Apache2 yourself!
Actually, there are several problems with Apache2 and Mac OS X:
1)
[nagoya.apache.org...]
[nagoya.apache.org...]
[nagoya.apache.org...]
2)
[mail-archives.apache.org...]
I can send you a *.zip file with the necessary files for compiling Apache2 and installing it in /Libray/Apache2 if you are interested.
So, you'll just have to bugger whoever supplies your Apache install for an updated release.
And by the way: I'm compiling my own versions of the whole suite (Apache, PHP5 MySQL4) on some really old hardware without problems:
PowerBook 3400 (180Mhz, 144MB RAM, 30GB HD)
PowerBook G3 (original) (200MHz, 160MB RAM, 30GB HD)
as well as two TiBooks (800Mhz and 1GHz)
One just has to automate the process