I have this script that I made that scans pages that worked fine on PHP 5. But it updated an oscommerce database and I couldn't get oscommerce to run on PHP5. So I downgraded to PHP 4.4.2
Anyway, the script kept crashing PHP 4.4.2 and giving a PHP error, so I thought it might be too complicated or something, so I tried this simple script to see if fopen on urls worked:
<?php
$handle=fopen("http://www.google.co.uk/", "r");
while(!feof($handle))
{
$line=fgets($handle);
echo $line;
}
?>
And that had the same result. Then unistalled PHP, reinstalled it, still did the same thing. Unistalled it, installed Wampserver with the PHP 4.2.2 add-on, same result. Then I went on a completely different computer, same thing.
However, my host has 4.2.2, but on Linux, as opposed to Windows XP on both PCs, and it works on there, so I was wondering if it is actually possible to fopen urls on 4.2.2 on Windows. I definetly have edited the right php.ini, as with allow_fopen_urls set to off, it just says "cannot find a suitable wrapper" or something.
Both PCs are behind the same router, could it be something to do with the firewall on it, although it's currently set to completely off, and for one of the PCs, port 80, which I assume http fopen requests go through is forwarded to it.
I'm completely stumped, I can only think that it just doesn't work on 4.2.2 on XP.