[FX.php List] Major problems with image_proxy.php
Ben Rollins
ben at eldertreks.com
Mon Nov 7 20:37:20 MST 2005
Hi all,
I am having some major problems with image_proxy.php.
When I create a very simple page to a very simple database:
<?php
include_once('FX/FX.php');
include_once('FX/server_data.php');
$show_all = new FX($serverIP, $webCompanionPort);
$show_all->setDBData('imagetest.fp7','web');
$show_all->setDBPassword('','web');
$show=$show_all->FMFindall();
foreach ($show['data'] as $key=>$showData);
?>
<html>
<head>
<title>Test Page</title>
</head>
<body>
Error Code: <?php echo $show['errorCode']; ?> <br>
Found Count: <?php echo $show['foundCount']; ?> <br>
<table width="250" bgcolor="#888888">
<tr>
<td><strong>Image Test</strong></td></tr>
<?php
foreach ($show['data'] as $key=>$showData) {
?>
<tr>
<td>
Image ID: <?php echo $showData['imageid'][0]; ?> <br>
</td>
<td>
Image: <img src="image_proxy.php?FXimage=<?php echo
vignereEncryptURL($showData['image'][0]); ?>">
</td>
</tr>
<?php
}
?>
</table>
</body>
</html>
I get no image, or a missing image icon. The source returned is:
Image: <img src="image_proxy.php?FXimage=
and that is the last thing that shows up in the source code.
If I omit the vignereEncryptURL, I get what looks like a correct string to
the image:
Image: <img
src="image_proxy.php?FXimage=/fmi/xml/cnt/data.jpg?-db=imagetest.fp7&-lay=web&-recid=1&-field=image(1)">
But I get a missing image icon.
Even if I add the $serverIP to the call:
Image: <img src="image_proxy.php?FXimage=<?php echo
"http://".$serverIP.($showData['image'][0]); ?>">
I get something else that looks right:
Image: <img
src="image_proxy.php?FXimage=http://216.191.146.43/fmi/xml/cnt/data.jpg?-db=imagetest.fp7&-lay=web&-recid=1&-field=image(1)">
But no image. (If I copy and past the URL from "http" on, it returns the
correct image).
So it looks like image_proxy.php is not working for me at all. I have
tried pointing it at specific instances of the FX folder (<img
src="../FX/image_proxy.php...) etc, but I cannot get it to work at all.
I can get the image to display by using:
Image: <img src= "<?php echo
"http://".$serverIP.$showData['imagelink'][0]; ?>">
Where "imagelink" is a calculated field in the database nominating the xml
string and the current -recid:
imagelink=
"/fmi/xml/cnt/data.jpg?-db=imagetest.fp7&-lay=web&-field=image&-recid=" &
Get ( RecordID )
However: the browser asks for authentication each session via a username
and password dialog box.
My application doesn't require security particularly: I would not be
concerned if a recognisable URL shows up, or even if it were possible to
determine the database name and password, as all the information in it is
public. But I need images to display painlessly.
Anyone have any thoughts?
Ben Rollins
More information about the FX.php_List
mailing list