php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11659 fsockopen and fopen
Submitted: 2001-06-25 09:02 UTC Modified: 2001-06-27 13:31 UTC
From: the_polymorph at rocketmail dot com Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 4.0.6 OS: Red Hat Linux 6.0
Private report: No CVE-ID: None
 [2001-06-25 09:02 UTC] the_polymorph at rocketmail dot com
<?php

 $fd = fopen("http://www.php.net/", "r" );

 if($fd)
 {
   fpassthru($fd);

 }

?>

I am also unable to write *functional* scripts using fsockopen...

My compile line was:

#./configure --with-mysql=/usr/local/mysql-3.22.32-pc-linux-gnu-i686/
--with-apxs=/usr/localapache_1.3.20/bin/apxs

make
make install

I am using Netscape 4.51.

Thanks, Katie.





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-26 05:42 UTC] sniper@php.net
Your example script works just fine. 
Can you please explain what exactly doesn't work?
And preferrably include suck non-working example
script (short one) into this bug report.

 [2001-06-26 11:26 UTC] the_polymorph at rocketmail dot com
Hi.

 It seems I made an error in not securing my machine from the clutches of my roommate. He started 20 seperate httpd processes! When I went through and used kill -9 on all of them and re-started the web server, the php code worked.
Sorry. I did receive the error style/css on found on the server. What does this mean and how can I fix it?

 I am a serious PHP user and your assistance is very much appreciated. Are there any areas I should look for onm own so I won't take up too much of your time? Such as php.ini in case I have another question?

Thanks, Katie.

 [2001-06-26 11:28 UTC] the_polymorph at rocketmail dot com
Hi.

 The error I *was* receiving was the same as Bug i.d. #11058

 Thanks.

 [2001-06-26 12:10 UTC] the_polymorph at rocketmail dot com
Hi. 

 New problem / question.

 The following code generates the following error:

 Not Found

 The requested URL/style.css was not found on this server.

<HTML>
<HEAD>
<TITLE>
</HEAD>
</TITLE>
<BODY>

 <?php

  $webpage = "http://php.net/support.php";

  $fp = fopen( $webpage, "r" ) or die("Couldn't open    $webpage");

while( ! feof($fp ))
 print fgets( $fp, 1024 );

?>

</BODY>
</HTML>


I tried it again with the URL:

 http://www.corrosive.co.uk/php/hello.html
and it wouldn't connect. The output was consistently:

"couldn't open www.corrosive.co.uk/php/hello.html"


Thanks, 

Katie.



 [2001-06-27 09:45 UTC] sniper@php.net
Is the .html suffix regocnized to be run by PHP ?
I get 'file not found' on that url too. Or did you
delete it already? 

And your script works for me just fine.

--Jani

 [2001-06-27 11:10 UTC] the_polymorph at rocketmail dot com
Hi.

 I checked that url ( corrosive.co.... ) and they evidently deleted the hello.html file. My httpd.conf file is set up to recognize these file types:

.php
.php4
.phtml

an error about style/css not found on this server when I attept to open the php.net site. Is this an include?

 Thanks, Katie.

 [2001-06-27 13:31 UTC] sniper@php.net
Obviously you really don't know PHP too well.
Please ask further support questions elsewhere,
e.g. at php-general@lists.php.net 


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC