|
Posted by Jerry Stuckle on 11/18/05 05:51
David Arden Stevensonn wrote:
> On 'sub1.othercompany.com' there is a simple php file with an include that
> calls a script on my company's server 'sub2.mycompany.com'
>
> The script on my company's server seems to work fine when I test it alone in
> the browser(it generates some xml) but when I attempt to call it from the
> other companies server as an include, I cannot access it. I *can* get to it
> from the include when I use the IP address.
>
> According to my company's IT guy there are no issues with our DNS. According
> to the other company they are not restricting outbound access to
> 'sub2.mycompany.com'.
>
> Testing something along the lines of:
> $socket = fsockopen ($Connection, $Port, $errno, $errstr, $Timeout);
> print "Error $errno: $errstr";
>
> gives:
>
> Warning: fsockopen() [function.fsockopen]: php_network_getaddresses:
> getaddrinfo failed: No address associated with hostname in
> /usr/local/www/sub1.othercompany.com/xml/socket_test.php on line 25
>
> Warning: fsockopen() [function.fsockopen]: unable to connect to
> sub2.mycompany.com:80 (Unknown error) in
> /usr/local/www/sub1.othercompany.com/xml/socket_test.php on line 25
>
> Any thoughts on the issue? Are there any diagnostic methods I can use to
> troubleshoot what the issue is?
>
> TIA
> David
>
>
include() on a file only works if you are on the same server (or have a
shared disk between servers).
When you include from an ip address, the request goes to the web server
which then processes it like it would any other PHP file.
If you change the extension to something not parsed by the server, you
will get the source code and be able to use it - but you'll be operating
on the remote machine and only have the resources (database, etc.) the
other machine has available to it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|