I'm filing this under Newbies because really I'm mostly a designer - I only dabble in PHP and that's usually using other people's canned stuff. I wish I understood more, but I'm much better at drawing pictures. 😉
Backstory: we have a legacy Oracle app that I want to include in a Post-Nuke PHP block, and we don't have the resources to redo this app in PHP (like we should), but that doesn't really address our problem. I did this successfully last year in an older Post-Nuke prototype intranet site on a Windows box but I don't have access to the code I used before.
I'm using the HTTP Class from http://www.hotscripts.com/Detailed/12810.html
I'm starting to think that it's a problem with our AMP installation on Netware 6, like there's another piece missing. Anyway, here is the code (in a file on our intranet, sorry). I turned on debugging in the client.php file, and I'm using a simpler file for inclusion for testing purposes:
include "/includes/Net/HTTP/Client.php";
$http = new Net_HTTP_Client();
$http->Connect("http://158.114.110.90", 80 ) or die("Connect problem");
$status = $http->Get("index.php");
echo "status: ". $http->getStatusMessage();
if( $status != 200 )
die("Problem Status: " .$status . " Error:".$http->getStatusMessage() );
else
echo $http->getBody();
$http->Disconnect();
And here is the output (at this point it's not in a Post-Nuke PHP block - it's in a separate file called test.php):
Net_HTTP_Client( , ) Connect( [url]http://158.114.110.90,[/url] 80 ) Get( index.php ) status: Problem Status: 0 Error:
If I change the HTTP code from 200 to 0, the script completes fine, but no included page displays:
Net_HTTP_Client( , ) Connect( [url]http://158.114.110.90,[/url] 80 ) Get( index.php ) status: getBody() Disconnect()
As you can see it's returning each step but not actually executing any of it. Any direction would be helpful in this matter.
Thanks,
John