[FX.php List] How do I specify https when I instantiate of the FX object?

jason f. boldt jason_fb at beezwax.net
Tue Mar 6 09:16:30 MST 2007


Bob,
When I tried as you suggest I got this error from the page:

Warning: main(https://localhost/libs/FX/FX.php) [function.main]:  
failed to open stream: No such file or directory in /Library/ 
WebServer/Documents/validation_logInUser.php on line 3

Warning: main() [function.include]: Failed opening 'https://localhost/ 
libs/FX/FX.php' for inclusion (include_path='.:') in /Library/ 
WebServer/Documents/validation_logInUser.php on line 3

Warning: main(https://localhost/fm_server_data.php) [function.main]:  
failed to open stream: No such file or directory in /Library/ 
WebServer/Documents/validation_logInUser.php on line 3

Warning: main() [function.include]: Failed opening 'https://localhost/ 
fm_server_data.php' for inclusion (include_path='.:') in /Library/ 
WebServer/Documents/validation_logInUser.php on line 3

Fatal error: Cannot instantiate non-existent class: fx in /Library/ 
WebServer/Documents/validation_logInUser.php on line 8


The PHP manual says you can only do it this way if URL fopen wrappers  
are compiled with PHP: (see http://us2.php.net/manual/en/ 
function.include.php)

If "URL fopen wrappers" are enabled in PHP (which they are in the  
default configuration), you can specify the file to be included using  
a URL (via HTTP or other supported wrapper - see Appendix N, List of  
Supported Protocols/Wrappers for a list of protocols) instead of a  
local pathname. If the target server interprets the target file as  
PHP code, variables may be passed to the included file using a URL  
request string as used with HTTP GET. This is not strictly speaking  
the same thing as including the file and having it inherit the parent  
file's variable scope; the script is actually being run on the remote  
server and the result is then being included into the local script.

Is this the only way to get FX to make the URL string https://  
instead of http:// ? If so, then I will have my sysadmin re-compile  
PHP (again), but this will take time and it seems like there's got to  
be another way. As I have documented in my previous email to the  
list, even when I include the server_data.php file (which is included  
correctly with the regular include syntax-- from the same folder), I  
do not see where $scheme gets passed to the FX class, and when I  
examine the FX Object that I am creating I can indeed see that the  
dataURL is wrong because it is trying to use http:// instead of https://

Can someone tell me how the FX object itself is told to use the  
proper $scheme? Although it appears in the default configuration  
file, I cannot see where configuration this is passed to the FX object.

-Jason




On Mar 6, 2007, at 6:49 AM, Bob Patin wrote:

> Just include the FX pages like this:
>
> include_once('https://www.server.com/FX/FX.php');
> include_once('https://www.server.com/FX/server_data.php');
>
>
> On Mar 6, 2007, at 12:19 AM, jason f.boldt wrote:
>
>> FX PHP List,
>> I'm having trouble getting the class to work with an HTTPS server.  
>> I have examined my fx Object and found that it has an attribute  
>> for dataURL that is indeed wrong:
>>
>> [dataURL] => http://webbot:******@localhost:443/fmi/xml/ 
>> FMPXMLRESULT.xml?-db=
>>
>>
>> I have obscured the password, but other than that this is what I  
>> see in my FX Object when I print it out for debugging. As you can  
>> see, the port 443 comes through at the end of localhost: but the  
>> URL is for http://
>>
>> this is clearly wrong (and probably why code is returning     
>> [message] => FX: ExecuteQuery XML error: syntax error at line 1 )  
>> because I know my server is operating at https having confirmed  
>> this in the browser.
>>
>> Here's my code.... with passwords obscured....
>>
>> <?php
>> $serverIP = 'localhost';
>> $webCompanionPort = 443;         // for FM7SA, this should we the  
>> web server port
>> $dataSourceType = 'FMPro7';
>>
>> $directqry = new FX($serverIP, $webCompanionPort, $dataSourceType);
>> $directqry->SetDBUserPass($fm_dbuser,$fm_dbpass );
>> $directqry->SetDBData("****","****", 1);
>> $data = $directqry->FMFind();
>> $dataObj = $data['data'];
>>
>> print "<PRE>";
>> print_r($directqry);
>>
>> print "</PRE>";
>>
>> ?>
>>
>> How do I specify https when I instantiate of the FX object?
>>
>> Thanks,
>> Jason
>>
>>
>> --
>>
>> jason f. boldt
>> jason_fb at beezwax.net
>> beezwax datatools inc
>> (510) 835-4483 x 104
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list




--

jason f. boldt
jason_fb at beezwax.net
beezwax datatools inc
(510) 835-4483 x 104


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070306/a92c8b66/attachment.html


More information about the FX.php_List mailing list