ID: 47630 User updated by: metala at metala dot org Reported By: metala at metala dot org -Status: Feedback +Status: Closed Bug Type: Network related Operating System: Windows XP SP2 PHP Version: 5.2.9 New Comment:
I don't think "bug" need a fix. A note in the PHP manual, in proc_open() function or elsewhere, would be OK. Previous Comments: ------------------------------------------------------------------------ [2009-03-18 12:50:34] metala at metala dot org OK, problem solved. The problem is in the Environment variables of the new process: $env = array ( 'SCRIPT_FILENAME' => dirname(__FILE__).'\\child.php', ); The missing variable is SystemRoot, which in my case is "C:\WINDOWS". So with the final settings: $env = array ( 'SCRIPT_FILENAME' => dirname(__FILE__).'\\child.php', 'SystemRoot' => $_ENV['SystemRoot'], ); Network functionality is working perfectly. ------------------------------------------------------------------------ [2009-03-16 21:04:30] metala at metala dot org It failed again. As I wrote in the description "any network function fails". What I did was: $fp = fsockopen('google.com', 80, $errno, $errstr); And the result was: H:\test\php>php parent.php X-Powered-By: PHP/5.2.9-1 Content-type: text/html <br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a >]: php_network_getaddresses: getaddrinfo failed: No such host is known. in <b> H:\test\php\child.php</b> on line <b>2</b><br /> <br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a >]: unable to connect to google.com:80 (php_network_getaddresses: getaddrinfo fa iled: No such host is known. ) in <b>H:\test\php\child.php</b> on line <b>2</b>< br /> int(0) string(69) "php_network_getaddresses: getaddrinfo failed: No such host is known. " When I run it in DOS: >SET SCRIPT_FILENAME=child.php >php-cgi There appears to be no error. ------------------------------------------------------------------------ [2009-03-16 20:37:06] metala at metala dot org I disabled it before testing. I have another Windows XP machine I can test on. Results coming soon. ------------------------------------------------------------------------ [2009-03-16 19:53:11] johan...@php.net Are you sure there is no firewall blocking? ------------------------------------------------------------------------ [2009-03-12 13:01:43] metala at metala dot org I tested it on another Windows XP machine and got the same result. On the other hand with Debian GNU/Linux Squeeze I have no problems. ------------------------------------------------------------------------ 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/47630 -- Edit this bug report at http://bugs.php.net/?id=47630&edit=1