ID:               28029
 Updated by:       [EMAIL PROTECTED]
 Reported By:      coadmin at hostings dot pl
-Status:           Open
+Status:           Feedback
 Bug Type:         URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:      4CVS-2004-04-16 (stable)
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2004-04-20 11:41:04] servers at apandres dot com

I have the same problem, php 4.3.3 on redhat. i am checking for a
reciprocal link of a submitted page. it is working for a few hours and
then nothing can be submitted any more. same error msg. after apache
restart everything is ok again for the next few hours. i did not notice
this in php 4.3.2

------------------------------------------------------------------------

[2004-04-18 00:59:25] coadmin at hostings dot pl

Maybe, old one was unclear, this the easiest way to reproduce this
bug:

<?
if (fopen("http://www.cnn.com",r)) echo "OK";
?>

Online url: http://69.93.217.178/test.php

If fails it shows:
Warning: fopen(http://www.cnn.com): failed to open stream: HTTP request
failed!  in /home/homepage/public_html/test.php on line 2

If works shows:
OK

Please help. Best regards.

------------------------------------------------------------------------

[2004-04-18 00:02:34] coadmin at hostings dot pl

inessential, my solution was wrong. this is not it. please make your
investigations into this problem. thanks.

------------------------------------------------------------------------

[2004-04-17 20:53:19] coadmin at hostings dot com dot pl

Please hold one for one day, maybe I've solution. I must test it. I
will write what about it in 24h. Regards.

------------------------------------------------------------------------

[2004-04-17 19:15:59] coadmin at hostings dot pl

It's code of PHP script which make error [2].

$check is delivered by POST method from HTML form.

sprawdz.php:

<?
$id = 1111;
$code = "x,x,x,x,x";
$type = "sms,c1";

$handle =
fopen("http://allpay.pl/check_code.php?id=".$id."&code=".$code."&c
heck=".$check."&type=".$type."", 'r');
$status = fgets($handle, 8);
$czas_zycia = fgets($handle, 24);
fclose($handle);
$czas_zycia = rtrim($czas_zycia);
if ($status == 0) {print "pass is bad - try again"; exit;}      else
{  # if pass is good:
if (!isset($_COOKIE['ActiveCode']))
{
setcookie('ActiveCode',1, time()+$czas_zycia);
}
else
{
setcookie('ActiveCode',0, time()+2, "/");
setcookie('ActiveCode',1, time()+$czas_zycia, "/");
}
header("Location: index1.php");
}
?>


full error:

Warning:
fopen(http://allpay.pl/check_code.php?id=1111&code=x,x,x,x,x&check=yourpassword8&type=sms,c1):
failed to open stream: HTTP request failed! AeáW in
/home/prospl/public_html/sprawdz.php on line 20
Warning: fgets(): supplied argument is not a valid stream resource in
/home/prospl/public_html/sprawdz.php on line 21
Warning: fgets(): supplied argument is not a valid stream resource in
/home/prospl/public_html/sprawdz.php on line 22
Warning: fclose(): supplied argument is not a valid stream resource in
/home/prospl/public_html/sprawdz.php on line 23


line in error (20) is: "$handle = fopen("http://......";

Online URL: http://www.pros.pl/ (it is working now)

Form is from the left side with button "Wchodze do bazy". You could
give any password there. It should shows "Kod niepoprawny - wpisz
ponownie." - it means bad password. If fails, is timeout and it shows
error message as above.

IMHO, there aren't any mistakes in php code, the problem is to open
sockets with "http://"; url.

I'll provide GDB backtrace asap. I'm not sure if it will be possible,
because PHP still works, and there aren't any crashes. Crash was my
word to describe that these functions stopped to work.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/28029

-- 
Edit this bug report at http://bugs.php.net/?id=28029&edit=1

Reply via email to