Forum Moderators: coopster
On further investigation, it seems that the fsockopen() command is no longer functioning.
code:
<?php
$fp=fsockopen('ssl://www.paypal.com', 443, $errno, $errstr, 30);
if (!$fp)
{
echo ('error=' . $errno);
echo'<br>';
echo ('errorstr=' . $errstr);
}
?>
Now the weird thing is that I get different output when I run the same exact code on different domains.
In most cases, $errno is 0 (zero) and $errstr is "Success", even though it clearly has failed.
Accoring to PHP.net, this indicates "failure to initialize the socket", although gives no indication of why or how to troubleshoot it.
In other cases, I get "13 - Permission Denied" returned.
I really have no clue how to fix this - hours of searching have turned up nothing conclusive.
Clearly, something in the PHP upgrade has changed a setting somewhere, as the script has not been changed.
(by the way, it says sockets support is compiled in and enabled, and open SSL support is enabled.)
I'm really running out of ideas here. Could it be a permission I need to reset in apache somehow? I'm not running phpsuexec as I only have my accounts on the VPS.
I am going to try restarting my VPS at some point, too.