[PHP-DEV] PHP 4.0 Bug #9286 Updated: fopen fails to open "http://...." requests.
ID: 9286 Updated by: sbergmann Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Filesystem function related Assigned To: Comments: Previous Comments: --- [2001-02-15 14:11:08] [EMAIL PROTECTED] I saw that I tested some versions of: allow_url_fopen and my php.ini I sent contained allow_url_fopen = Off But the Problem also persists with allow_url_fopen = On Regards, Andreas --- [2001-02-15 14:05:21] [EMAIL PROTECTED] Hi fopen fails to open files from an http: location (mightbe an ftp: location fails too!) I run Apache 1.3.17 on Windows-NT and PHP 4.0.4pl1. I tested it with the Apache-Module and as a CGI Script: Both Versions fail. I also disabled the rewrite module completely and the fopen fails. With pure PHP 4.0 everything works fine. Regards, Andreas Short Script: php test php test "; $fp=fopen("http://nt-server:81/tmp","r"); if ( $fp ){ while (! feof($fp)) { $buffer=fgets($fp,256); echo $buffer;echo ""; } $fclstat=fclose($fp); } ?> - List of Modules Apache Server Information Server Settings, mod_jserv.c, mod_php4.c, mod_usertrack.c, mod_status.c, mod_info.c, mod_speling.c, mod_rewrite.c, mod_proxy.c, mod_headers.c, mod_expires.c, mod_digest.c, mod_cern_meta.c, mod_auth_digest.c, mod_auth_dbm.c, mod_auth_anon.c, mod_isapi.c, mod_setenvif.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_log_config.c, mod_env.c, mod_alias.c, mod_userdir.c, mod_cgi.c, mod_dir.c, mod_autoindex.c, mod_include.c, mod_negotiation.c, mod_auth.c, mod_access.c, mod_mime.c, mod_so.c, http_core.c Server Version: Apache/1.3.17 (Win32) ApacheJServ/1.1.2 PHP/4.0.4pl1 Server Built: Jan 29 2001 22:00:19 API Version: 19990320:10 Run Mode: standalone User/Group: #-1(1)/1 Hostname/port: nt-server.gremm.de:81 Daemons: start: 5min idle: 5max idle: 10max: 1024 Max Requests: per child: 0keep alive: onmax per connection: 100 Threads: per child: 50 Excess requests: per child: 0 Timeouts: connection: 300keep-alive: 15 Server Root: g:/program files/apache group/apache Config File: g:/program files/apache group/apache/conf/httpd.conf PID File: logs/httpd.pid Scoreboard File: logs/apache_status - Error Message: php test Hello World Warning: fopen("http://nt-server:81/tmp","r") - Invalid argument in g:/program files/apache group/apache/htdocs/testfopen.php on line 10 -PHP INI [PHP] ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overriden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo"). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: ; | bitwise OR ; & bitwise AND ; ~ bitwise NOT ; ! boolean NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; ; foo = ; sets foo to an empty string ; foo = none ; sets foo to an empty string ; foo = "none"; sets foo to the string 'none' ; ; If you use constants in your value, and these constants belong to a dynamically ; loaded extension (either a PHP extension or a Zend extension), you may only ; use these constants *after* the line that loads the extension. ; ; All the values in the php.ini-dist file c
[PHP-DEV] PHP 4.0 Bug #9286 Updated: fopen fails to open "http://...." requests.
ID: 9286 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Filesystem function related Description: fopen fails to open "http://" requests. Oh, Oh! After reading some of the duplicate cases I went on testing (leaving the port-number off) etc. Then I found out that without Port-Number I could read the pages. Then I remarked that just http://nt-server:81/ also works. Then I tested againg http://nt-server:81/tmp which does not work (although it did with php-versions before!!!) Then I tested http://nt-server:81/tmp/ which works!!! (merde!) What a mess! Something is changed in APACHE which changes the ALIAS behavior or something else In the Configuration of Apache I always had: Alias /tmp "J:/bmc/control-d/tmp" Which worked fine for fopen("http://nt-server:81/tmp","r") all the time! Maybe all the other cases are the same because all the guys tried to build the new apache with the new php 4.0.3 or 4.0.4 and got this error (due to a change in apaches behavior!?!). So what to do now? For me this case could be closed but how to communicate and check it? Regards, Andreas Previous Comments: --- [2001-02-15 14:11:08] [EMAIL PROTECTED] I saw that I tested some versions of: allow_url_fopen and my php.ini I sent contained allow_url_fopen = Off But the Problem also persists with allow_url_fopen = On Regards, Andreas --- [2001-02-15 14:05:21] [EMAIL PROTECTED] Hi fopen fails to open files from an http: location (mightbe an ftp: location fails too!) I run Apache 1.3.17 on Windows-NT and PHP 4.0.4pl1. I tested it with the Apache-Module and as a CGI Script: Both Versions fail. I also disabled the rewrite module completely and the fopen fails. With pure PHP 4.0 everything works fine. Regards, Andreas Short Script: php test php test "; $fp=fopen("http://nt-server:81/tmp","r"); if ( $fp ){ while (! feof($fp)) { $buffer=fgets($fp,256); echo $buffer;echo ""; } $fclstat=fclose($fp); } ?> - List of Modules Apache Server Information Server Settings, mod_jserv.c, mod_php4.c, mod_usertrack.c, mod_status.c, mod_info.c, mod_speling.c, mod_rewrite.c, mod_proxy.c, mod_headers.c, mod_expires.c, mod_digest.c, mod_cern_meta.c, mod_auth_digest.c, mod_auth_dbm.c, mod_auth_anon.c, mod_isapi.c, mod_setenvif.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_log_config.c, mod_env.c, mod_alias.c, mod_userdir.c, mod_cgi.c, mod_dir.c, mod_autoindex.c, mod_include.c, mod_negotiation.c, mod_auth.c, mod_access.c, mod_mime.c, mod_so.c, http_core.c Server Version: Apache/1.3.17 (Win32) ApacheJServ/1.1.2 PHP/4.0.4pl1 Server Built: Jan 29 2001 22:00:19 API Version: 19990320:10 Run Mode: standalone User/Group: #-1(1)/1 Hostname/port: nt-server.gremm.de:81 Daemons: start: 5min idle: 5max idle: 10max: 1024 Max Requests: per child: 0keep alive: onmax per connection: 100 Threads: per child: 50 Excess requests: per child: 0 Timeouts: connection: 300keep-alive: 15 Server Root: g:/program files/apache group/apache Config File: g:/program files/apache group/apache/conf/httpd.conf PID File: logs/httpd.pid Scoreboard File: logs/apache_status - Error Message: php test Hello World Warning: fopen("http://nt-server:81/tmp","r") - Invalid argument in g:/program files/apache group/apache/htdocs/testfopen.php on line 10 -PHP INI [PHP] ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overriden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g.
[PHP-DEV] PHP 4.0 Bug #9286 Updated: fopen fails to open "http://...." requests.
ID: 9286 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Filesystem function related Description: fopen fails to open "http://" requests. I saw that I tested some versions of: allow_url_fopen and my php.ini I sent contained allow_url_fopen = Off But the Problem also persists with allow_url_fopen = On Regards, Andreas Previous Comments: --- [2001-02-15 14:05:21] [EMAIL PROTECTED] Hi fopen fails to open files from an http: location (mightbe an ftp: location fails too!) I run Apache 1.3.17 on Windows-NT and PHP 4.0.4pl1. I tested it with the Apache-Module and as a CGI Script: Both Versions fail. I also disabled the rewrite module completely and the fopen fails. With pure PHP 4.0 everything works fine. Regards, Andreas Short Script: php test php test "; $fp=fopen("http://nt-server:81/tmp","r"); if ( $fp ){ while (! feof($fp)) { $buffer=fgets($fp,256); echo $buffer;echo ""; } $fclstat=fclose($fp); } ?> - List of Modules Apache Server Information Server Settings, mod_jserv.c, mod_php4.c, mod_usertrack.c, mod_status.c, mod_info.c, mod_speling.c, mod_rewrite.c, mod_proxy.c, mod_headers.c, mod_expires.c, mod_digest.c, mod_cern_meta.c, mod_auth_digest.c, mod_auth_dbm.c, mod_auth_anon.c, mod_isapi.c, mod_setenvif.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_log_config.c, mod_env.c, mod_alias.c, mod_userdir.c, mod_cgi.c, mod_dir.c, mod_autoindex.c, mod_include.c, mod_negotiation.c, mod_auth.c, mod_access.c, mod_mime.c, mod_so.c, http_core.c Server Version: Apache/1.3.17 (Win32) ApacheJServ/1.1.2 PHP/4.0.4pl1 Server Built: Jan 29 2001 22:00:19 API Version: 19990320:10 Run Mode: standalone User/Group: #-1(1)/1 Hostname/port: nt-server.gremm.de:81 Daemons: start: 5min idle: 5max idle: 10max: 1024 Max Requests: per child: 0keep alive: onmax per connection: 100 Threads: per child: 50 Excess requests: per child: 0 Timeouts: connection: 300keep-alive: 15 Server Root: g:/program files/apache group/apache Config File: g:/program files/apache group/apache/conf/httpd.conf PID File: logs/httpd.pid Scoreboard File: logs/apache_status - Error Message: php test Hello World Warning: fopen("http://nt-server:81/tmp","r") - Invalid argument in g:/program files/apache group/apache/htdocs/testfopen.php on line 10 -PHP INI [PHP] ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overriden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo"). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: ; | bitwise OR ; & bitwise AND ; ~ bitwise NOT ; ! boolean NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; ; foo = ; sets foo to an empty string ; foo = none ; sets foo to an empty string ; foo = "none"; sets foo to the string 'none' ; ; If you use constants in your value, and these constants belong to a dynamically ; loaded extension (either a PHP extension or a Zend extension), you may only ; use these constants *after* the line that loads the extension. ; ; All the values in the php.ini-dist file correspond to the builtin ; defaults (that is, if no php.ini is used, or if you delete these lines, ; the builtin defaults