[FX.php List] I need help with image_proxy...

Chris Hansen chris at iViking.org
Tue Nov 9 18:58:39 MST 2004


Jim,

I have a thought on this.  I was looking at image_proxy.php the other  
day and had a thought that may be related to what you're seeing.   
Basically, the file expects to receive the FileMaker user name and  
password as part of the url (see lines 116-120 of image_proxy).  When I  
programmed this, the idea was that this would allow users with  
different permissions to only see the appropriate images.  However, if  
you're using a single user name and password, this isn't such a good  
idea (I probably need to rethink the process anyway =)  At any rate,  
I'd suggest using an include or something similar to store the user  
name and password on the server, then set the $userPass variable using  
those settings rather than based on a $_GET parameter.  Does that make  
sense?  HTH

--Chris Hansen
   creator of FX.php
   "The best way from FileMaker to the Web."
   www.iViking.org

On Nov 9, 2004, at 8:34 AM, Jim Bowser wrote:

> Okay, I need help.  I am using FXphp with Filemaker Server Advanced 7.
> Using the image_proxy, I am able to display images from the sample FMP7
> database that came with FXphp.  However, I am not able to display  
> images
> from my web_data database that I prepared.  By making a copy of it and
> breaking the database down to its simplest form, I got the copy to  
> work.
> What am I missing?  Do I need a different image_proxy file for each
> database?  Below, I am including the code and the source code for both  
> the
> page that works and the one that doesn't.
>
> If anybody has a guess as to what to check, please let me know.   
> Thanks!
>
>
> This works:
>
> <?php
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/FX.php");
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] .  
> "/FX/server_data.php");
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] .  
> "/FX/image_proxy.php");
>
> $BookQuery = new FX($serverIP, $webCompanionPort);
> $BookQuery->SetDBData("New_Web_Supplier.fp7", "Suppliers_Web");
> $BookQuery->SetDBPassword('xxxx','admin');
> $BookQuery->AddDBParam('Supplier_RecID', '2093', 'eq');
> $BookData = $BookQuery->FMFind();
> $currentKey = key($BookData['data']);
> ?>
>
> <html>
>     <body bgcolor="#FFFFFF">
>         <table cellspacing="0" cellpadding="2" border="0"  
> bgcolor="#CCCCCC">
>             <tr>
>                 <td>
>                 <img src="image_proxy.php?FXimage=<?php echo
> vignereEncryptURL($BookData['data'][$currentKey]['Supplier_Logo'][0]);  
> ?>">
>
>                 <p><b>Company Name:</b> <?php echo
> $BookData['data'][$currentKey]['Supplier_Company'][0]; ?>
>
>                 <br><b>ID#:</b> <?php echo
> $BookData['data'][$currentKey]['Supplier_RecID'][0]; ?>
>
>                 <br><b>Description:</b> <?php echo
> $BookData['data'][$currentKey]['Supplier_Description'][0]; ?>
>
>                 </td>
>             </tr>
>         </table>
>     </body>
> </html>
>
> And this is the source code I get:
>
> <html>
>     <body bgcolor="#FFFFFF">
>         <table cellspacing="0" cellpadding="2" border="0"  
> bgcolor="#CCCCCC">
>             <tr>
>                 <td>
>                 <img
> src="image_proxy.php? 
> FXimage=%D1%80%C3%5B%C2%99%3F%29%E8T%BC%7E%26%8CQIO%3D0
> 5l%B4bK%E4%81%803%CE%C5%F7_%BDT%F5cb%BE%CD%ED%81%FC%97S%FEl%9F%86%8A%7E 
> y%3C%
> C0%840_%996%D7%D2%82q%8C%A9D%D7%3B%FCe%ACxY%ED%85%CBw%988%9F%C0s%B1%9F% 
> B4t%F
> E%90%AE%C2%D3%E3%A1%C6%E8%A8%82%A1%B3%A0F%93">
>
>                 <p><b>Company Name:</b> Mississippi Gulf Coast CVB
>                 <br><b>ID#:</b> 2093
>                 <br><b>Description:</b> The Mississippi Gulf Coast is  
> one of
> the fastest growing destinations in the country...
>                 </td>
>             </tr>
>         </table>
>     </body>
> </html>
>
> -------------------------------------------
> Now, by changing the name of the database to it's big brother, I am  
> able to
> pull everything but the image.  Only the image is missing.  Here's the  
> code:
>
> <?php
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/FX.php");
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] .  
> "/FX/server_data.php");
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] .  
> "/FX/image_proxy.php");
>
> $BookQuery = new FX($serverIP, $webCompanionPort);
> $BookQuery->SetDBData("Web_Data.fp7", "Suppliers_Web");
> $BookQuery->SetDBPassword('xxxx','admin');
> $BookQuery->AddDBParam('Supplier_RecID', '2093', 'eq');
> $BookData = $BookQuery->FMFind();
> $currentKey = key($BookData['data']);
> ?>
> <html>
>     <body bgcolor="#FFFFFF">
>         <table cellspacing="0" cellpadding="2" border="0"  
> bgcolor="#CCCCCC">
>             <tr>
>                 <td>
>                 <img src="image_proxy.php?FXimage=<?php echo
> vignereEncryptURL($BookData['data'][$currentKey]['Supplier_Logo'][0]);  
> ?>">
>
>                 <p><b>Company Name:</b> <?php echo
> $BookData['data'][$currentKey]['Supplier_Company'][0]; ?>
>
>                 <br><b>ID#:</b> <?php echo
> $BookData['data'][$currentKey]['Supplier_RecID'][0]; ?>
>
>                 <br><b>Description:</b> <?php echo
> $BookData['data'][$currentKey]['Supplier_Description'][0]; ?>
>
>                 </td>
>             </tr>
>         </table>
>     </body>
> </html>
>
> and this is the resulting source code:
>
> <html>
>     <body bgcolor="#FFFFFF">
>         <table cellspacing="0" cellpadding="2" border="0"  
> bgcolor="#CCCCCC">
>             <tr>
>                 <td>
>                 <img
> src="image_proxy.php? 
> FXimage=%D1%80%C3%5B%C2%99%3F%29%E8T%BC%7E%26%8CQIO%3D0
> 5l%B4bK%E4%81%893%B9%C5%E4Z%CFV%D0Sb%86%88%B2%88%EB%E1%2B%E2%A9%E8%C8%8 
> A%86e
> q%DFn%F3S%8F%CF%A0%D2tu%9D%A8%FB%E2E%B1- 
> %AFxZ%40%B6%D6%92%D6%82%E1%C6s%B1%A5
> %AF%83%3E%82%AD%7B%99%A4">
>
>                 <p><b>Company Name:</b> Mississippi Gulf Coast CVB
>                 <br><b>ID#:</b> 2093
>                 <br><b>Description:</b> The Mississippi Gulf Coast is  
> one of
> the fastest growing destinations in the country...
>                 </td>
>             </tr>
>         </table>
>     </body>
> </html>
>
>
> Thanks for any input!
> Jim Bowser
> Network Manager
> Shoreline Creations Ltd.
> Publisher of:
>   GROUP TOUR MAGAZINE
>   STUDENT GROUP TOUR MAGAZINE
>
> 616-393-2077 x120
> 800-767-3489 x120
> jim at grouptour.com
> www.grouptour.com
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>



More information about the FX.php_List mailing list