Permalink
Browse files

- Add a bitwise flag to phpinfo()

- Import a draft of the new PHP license
  • Loading branch information...
1 parent fec59d3 commit 3e6bce59b3ccbd562b9eb66d71d1313f45480835 @andigutmans andigutmans committed Jul 14, 1999
Showing with 250 additions and 210 deletions.
  1. +50 −51 LICENSE
  2. +1 −1 cgi_main.c
  3. +51 −1 ext/apache/apache.c
  4. +1 −0 ext/standard/basic_functions.c
  5. +130 −152 ext/standard/info.c
  6. +15 −3 ext/standard/info.h
  7. +2 −2 main/php_ini.c
View
101 LICENSE
@@ -1,64 +1,63 @@
- --------------------------------------------------------------------
- Copyright (c) 1998 The PHP Development Team. All rights reserved.
- --------------------------------------------------------------------
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+--------------------------------------------------------------------
+ The PHP License, version 2.0
+Copyright (c) 1999 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
- 1. Commercial redistribution of larger works derived from, or
- works which bundle PHP, requires written permission from the
- PHP Development Team. You may charge a fee for the physical
- act of transferring a copy, and must make it clear that the
- fee being charged is for the distribution, and not for the
- software itself. You may, at your option, offer warranty
- protection in exchange for a fee.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
- 2. Redistributions of source code must retain the above copyright
+ 1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- 3. Redistributions in binary form must reproduce the above
+ 2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- 4. All advertising materials mentioning features or use of this
- software must display the following acknowledgment:
- "This product includes software written by the PHP Development
- Team"
-
- 5. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission
- from the PHP Development Team. This does not apply to add-on
- libraries or tools that work in conjunction with PHP. In such
- a case the PHP name may be used to indicate that the product
- supports PHP.
+ 3. The name "PHP" must not be used to endorse or promote products
+ derived from this software without prior permission from the
+ PHP Group. This does not apply to add-on libraries or tools
+ that work in conjunction with PHP. In such a case the PHP
+ name may be used to indicate that the product supports PHP.
- 6. Redistributions of any form whatsoever must retain the following
+ 4. The PHP Group reserves the right to modify the PHP license at
+ any time and without prior notice, as long as the changes keep
+ the free and open source nature of PHP.
+
+ 5. Redistributions of any form whatsoever must retain the following
acknowledgment:
- "This product includes software written by the PHP Development
- Team".
-
- THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
- ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
- DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- OF THE POSSIBILITY OF SUCH DAMAGE.
+ "This product includes PHP, freely available from
+ http://www.php.net/".
- --------------------------------------------------------------------
+ 6. Permission to freely distribute and use Zend as an integrated
+ part of PHP is granted, under the conditions of version 0.90
+ of the Zend License.
+ The license is bundled with the Zend engine, and is available
+ at http://www.zend.com/license/0_90.txt, or by contacting
+ license@zend.com.
- This software consists of voluntary contributions made by many
- individuals on behalf of the PHP Development Team.
- The PHP Development Team can be contacted via Email at core@php.net.
-
- For more information on the PHP Development Team and the PHP
- project, please see <http://www.php.net>.
-
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at php-group@php.net.
+
+For more information on the PHP Development Group and the PHP
+project, please see <http://www.php.net>.
View
@@ -310,7 +310,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
}
cgi_started=1;
php3_TreatHeaders();
- _php3_info();
+ _php3_info(0xFFFFFFFF);
exit(1);
break;
case 's':
View
@@ -172,7 +172,57 @@ void php3_info_apache(ZEND_MODULE_INFO_FUNC_ARGS)
SLS_FETCH();
serv = ((request_rec *) SG(server_context))->server;
-
+
+ {
+ register int i;
+ array_header *arr;
+ table_entry *elts;
+ request_rec *r;
+ SLS_FETCH();
+
+ r = ((request_rec *) SG(server_context));
+ arr = table_elts(r->subprocess_env);
+ elts = (table_entry *)arr->elts;
+
+ SECTION("Apache Environment");
+ PUTS("<table border=5 width=\"600\">\n");
+ php_info_print_table_header(2, "Variable", "Value");
+ for (i=0; i < arr->nelts; i++) {
+ php_info_print_table_row(2, elts[i].key, elts[i].val);
+ }
+ PUTS("</table>\n");
+ }
+
+ {
+ array_header *env_arr;
+ table_entry *env;
+ int i;
+ request_rec *r;
+ SLS_FETCH();
+
+ r = ((request_rec *) SG(server_context));
+ SECTION("HTTP Headers Information");
+ PUTS("<table border=5 width=\"600\">\n");
+ PUTS(" <tr><th colspan=2 bgcolor=\"" PHP_HEADER_COLOR "\">HTTP Request Headers</th></tr>\n");
+ php_info_print_table_row(2, "HTTP Request", r->the_request);
+ env_arr = table_elts(r->headers_in);
+ env = (table_entry *)env_arr->elts;
+ for (i = 0; i < env_arr->nelts; ++i) {
+ if (env[i].key) {
+ php_info_print_table_row(2, env[i].key, env[i].val);
+ }
+ }
+ PUTS(" <tr><th colspan=2 bgcolor=\"" PHP_HEADER_COLOR "\">HTTP Response Headers</th></tr>\n");
+ env_arr = table_elts(r->headers_out);
+ env = (table_entry *)env_arr->elts;
+ for(i = 0; i < env_arr->nelts; ++i) {
+ if (env[i].key) {
+ php_info_print_table_row(2, env[i].key, env[i].val);
+ }
+ }
+ PUTS("</table>\n\n");
+ }
+
PUTS("<table border=5 width=\"600\">\n");
php_info_print_table_header(2, "Entry", "Value");
#if WIN32|WINNT
@@ -381,6 +381,7 @@ int php3_minit_basic(INIT_FUNC_ARGS)
test_class_startup();
REGISTER_INI_ENTRIES();
+ register_phpinfo_constants(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
Oops, something went wrong.

0 comments on commit 3e6bce5

Please sign in to comment.