Browse files

This commit was manufactured by cvs2svn to create tag

'BEFORE_NEW_PARAMETER_PARSE'.
  • Loading branch information...
1 parent 639d221 commit f8b0c9e17cfe7e1d26cb27296d0879eebb2f86fe SVN Migration committed Jun 15, 2008
Showing with 0 additions and 42,780 deletions.
  1. +0 −542 .gdbinit
  2. +0 −277 CODING_STANDARDS
  3. +0 −2 CREDITS
  4. +0 −14,191 ChangeLog
  5. BIN ChangeLog.1999.gz
  6. BIN ChangeLog.2000.gz
  7. BIN ChangeLog.2001.gz
  8. BIN ChangeLog.2002.gz
  9. BIN ChangeLog.2003.gz
  10. BIN ChangeLog.2004.gz
  11. +0 −519 EXTENSIONS
  12. +0 −2,051 INSTALL
  13. +0 −68 LICENSE
  14. +0 −23 Makefile.frag
  15. +0 −76 Makefile.gcov
  16. +0 −150 Makefile.global
  17. +0 −3,309 NEWS
  18. +0 −141 README.CVS-RULES
  19. +0 −39 README.EXTENSIONS
  20. +0 −194 README.EXT_SKEL
  21. +0 −79 README.MAILINGLIST_RULES
  22. +0 −189 README.PARAMETER_PARSING_API
  23. +0 −155 README.PHP4-TO-PHP5-THIN-CHANGES
  24. +0 −57 README.QNX
  25. +0 −208 README.RELEASE_PROCESS
  26. +0 −155 README.SELF-CONTAINED-EXTENSIONS
  27. +0 −379 README.STREAMS
  28. +0 −126 README.SUBMITTING_PATCH
  29. +0 −179 README.TESTING
  30. +0 −137 README.TESTING2
  31. +0 −123 README.UNIX-BUILD-SYSTEM
  32. +0 −1,022 README.UPDATE_5_2
  33. +0 −174 README.WIN32-BUILD-SYSTEM
  34. +0 −112 README.Zeus
  35. +0 −196 README.input_filter
  36. +0 −174 README.namespaces
  37. +0 −136 TODO
  38. +0 −4 TODO-5.1
  39. +0 −89 TODO-PHP5
  40. +0 −26 TSRM/LICENSE
  41. +0 −6 TSRM/Makefile.am
  42. +0 −2 TSRM/TODO
  43. +0 −778 TSRM/TSRM.c
  44. +0 −186 TSRM/TSRM.dsp
  45. +0 −179 TSRM/TSRM.h
  46. +0 −1 TSRM/acconfig.h
  47. +0 −5 TSRM/acinclude.m4
  48. +0 −43 TSRM/build.mk
  49. +0 −33 TSRM/buildconf
  50. +0 −10 TSRM/config.w32
  51. +0 −31 TSRM/configure.in
  52. +0 −47 TSRM/readdir.h
  53. +0 −173 TSRM/threads.m4
  54. +0 −128 TSRM/tsrm.m4
  55. +0 −20 TSRM/tsrm_config.w32.h
  56. +0 −70 TSRM/tsrm_config_common.h
  57. +0 −240 TSRM/tsrm_nw.c
  58. +0 −29 TSRM/tsrm_nw.h
  59. +0 −63 TSRM/tsrm_strtok_r.c
  60. +0 −6 TSRM/tsrm_strtok_r.h
  61. +0 −1,325 TSRM/tsrm_virtual_cwd.c
  62. +0 −318 TSRM/tsrm_virtual_cwd.h
  63. +0 −397 TSRM/tsrm_win32.c
  64. +0 −106 TSRM/tsrm_win32.h
  65. +0 −548 UPGRADING
  66. +0 −1 acconfig.h.in
  67. +0 −2,788 acinclude.m4
  68. +0 −73 build/build.mk
  69. +0 −60 build/build2.mk
  70. +0 −59 build/buildcheck.sh
  71. +0 −8 build/config-stubs
  72. +0 −41 build/genif.sh
  73. +0 −6,246 build/libtool.m4
  74. +0 −75 build/mkdep.awk
  75. +0 −89 build/order_by_dep.awk
  76. +0 −6 build/print_include.awk
  77. +0 −32 build/scan_makefile_in.awk
  78. +0 −1,719 build/shtool
  79. +0 −69 buildconf
  80. +0 −2 buildconf.bat
  81. +0 −1,466 config.guess
Sorry, we could not display the entire diff because too many files (6,830) changed.
View
542 .gdbinit
@@ -1,542 +0,0 @@
-define ____executor_globals
- if basic_functions_module.zts
- set $tsrm_ls = ts_resource_ex(0, 0)
- set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1])
- else
- set $eg = executor_globals
- end
-end
-
-document ____executor_globals
- portable way of accessing executor_globals, set $eg
- ZTS detection is automatically based on ext/standard module struct
-end
-
-define dump_bt
- set $t = $arg0
- while $t
- printf "[0x%08x] ", $t
- if $t->function_state.function->common.function_name
- printf "%s() ", $t->function_state.function->common.function_name
- else
- printf "??? "
- end
- if $t->op_array != 0
- printf "%s:%d ", $t->op_array->filename, $t->opline->lineno
- end
- set $t = $t->prev_execute_data
- printf "\n"
- end
-end
-
-document dump_bt
- dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data
-end
-
-define printzv
- set $ind = 1
- ____printzv $arg0 0
-end
-
-document printzv
- prints zval contents
-end
-
-define ____printzv_contents
- set $zvalue = $arg0
- set $type = $zvalue->type
-
- printf "(refcount=%d", $zvalue->refcount__gc
- if $zvalue->is_ref__gc
- printf ",is_ref"
- end
- printf ") "
- if $type == 0
- printf "NULL"
- end
- if $type == 1
- printf "long: %ld", $zvalue->value.lval
- end
- if $type == 2
- printf "double: %lf", $zvalue->value.dval
- end
- if $type == 3
- printf "bool: "
- if $zvalue->value.lval
- printf "true"
- else
- printf "false"
- end
- end
- if $type == 4
- printf "array(%d): ", $zvalue->value.ht->nNumOfElements
- if ! $arg1
- printf "{\n"
- set $ind = $ind + 1
- ____print_ht $zvalue->value.ht 1
- set $ind = $ind - 1
- set $i = $ind
- while $i > 0
- printf " "
- set $i = $i - 1
- end
- printf "}"
- end
- set $type = 0
- end
- if $type == 5
- printf "object"
- ____executor_globals
- set $handle = $zvalue->value.obj.handle
- set $handlers = $zvalue->value.obj.handlers
- if basic_functions_module.zts
- set $zobj = zend_objects_get_address($zvalue, $tsrm_ls)
- else
- set $zobj = zend_objects_get_address($zvalue)
- end
- if $handlers->get_class_entry == &zend_std_object_get_class
- set $cname = $zobj->ce.name
- else
- set $cname = "Unknown"
- end
- printf "(%s) #%d", $cname, $handle
- if ! $arg1
- if $handlers->get_properties == &zend_std_get_properties
- set $ht = $zobj->properties
- if $ht
- printf "(%d): ", $ht->nNumOfElements
- printf "{\n"
- set $ind = $ind + 1
- ____print_ht $ht 1
- set $ind = $ind - 1
- set $i = $ind
- while $i > 0
- printf " "
- set $i = $i - 1
- end
- printf "}"
- else
- echo "no properties found"
- end
- end
- end
- set $type = 0
- end
- if $type == 6
- printf "string(%d): ", $zvalue->value.str.len
- ____print_str $zvalue->value.str.val $zvalue->value.str.len
- end
- if $type == 7
- printf "resource: #%d", $zvalue->value.lval
- end
- if $type == 8
- printf "constant"
- end
- if $type == 9
- printf "const_array"
- end
- if $type > 9
- printf "unknown type %d", $type
- end
- printf "\n"
-end
-
-define ____printzv
- ____executor_globals
- set $zvalue = $arg0
-
- printf "[0x%08x] ", $zvalue
-
- if $zvalue == $eg.uninitialized_zval_ptr
- printf "*uninitialized* "
- end
-
- set $zcontents = (zval*) $zvalue
- if $arg1
- ____printzv_contents $zcontents $arg1
- else
- ____printzv_contents $zcontents 0
- end
-end
-
-define ____print_const_table
- set $ht = $arg0
- set $p = $ht->pListHead
-
- while $p != 0
- set $const = (zend_constant *) $p->pData
-
- set $i = $ind
- while $i > 0
- printf " "
- set $i = $i - 1
- end
-
- if $p->nKeyLength > 0
- ____print_str $p->arKey $p->nKeyLength
- printf " => "
- else
- printf "%d => ", $p->h
- end
-
- ____printzv_contents &$const->value 0
- set $p = $p->pListNext
- end
-end
-
-define print_const_table
- set $ind = 1
- printf "[0x%08x] {\n", $arg0
- ____print_const_table $arg0
- printf "}\n"
-end
-
-define ____print_ht
- set $ht = (HashTable*)$arg0
- set $p = $ht->pListHead
-
- while $p != 0
- set $i = $ind
- while $i > 0
- printf " "
- set $i = $i - 1
- end
-
- if $p->nKeyLength > 0
- ____print_str $p->arKey $p->nKeyLength
- printf " => "
- else
- printf "%d => ", $p->h
- end
-
- if $arg1 == 0
- printf "%p\n", (void*)$p->pData
- end
- if $arg1 == 1
- set $zval = *(zval **)$p->pData
- ____printzv $zval 1
- end
- if $arg1 == 2
- printf "%s\n", (char*)$p->pData
- end
-
- set $p = $p->pListNext
- end
-end
-
-define print_ht
- set $ind = 1
- printf "[0x%08x] {\n", $arg0
- ____print_ht $arg0 1
- printf "}\n"
-end
-
-document print_ht
- dumps elements of HashTable made of zval
-end
-
-define print_htptr
- set $ind = 1
- printf "[0x%08x] {\n", $arg0
- ____print_ht $arg0 0
- printf "}\n"
-end
-
-document print_htptr
- dumps elements of HashTable made of pointers
-end
-
-define print_htstr
- set $ind = 1
- printf "[0x%08x] {\n", $arg0
- ____print_ht $arg0 2
- printf "}\n"
-end
-
-document print_htstr
- dumps elements of HashTable made of strings
-end
-
-define ____print_ft
- set $ht = $arg0
- set $p = $ht->pListHead
-
- while $p != 0
- set $func = (zend_function*)$p->pData
-
- set $i = $ind
- while $i > 0
- printf " "
- set $i = $i - 1
- end
-
- if $p->nKeyLength > 0
- ____print_str $p->arKey $p->nKeyLength
- printf " => "
- else
- printf "%d => ", $p->h
- end
-
- printf "\"%s\"\n", $func->common.function_name
- set $p = $p->pListNext
- end
-end
-
-define print_ft
- set $ind = 1
- printf "[0x%08x] {\n", $arg0
- ____print_ft $arg0
- printf "}\n"
-end
-
-document print_ft
- dumps a function table (HashTable)
-end
-
-define ____print_inh_class
- set $ce = $arg0
- if $ce->ce_flags & 0x10 || $ce->ce_flags & 0x20
- printf "abstract "
- else
- if $ce->ce_flags & 0x40
- printf "final "
- end
- end
- printf "class %s", $ce->name
- if $ce->parent != 0
- printf " extends %s", $ce->parent->name
- end
- if $ce->num_interfaces != 0
- printf " implements"
- set $tmp = 0
- while $tmp < $ce->num_interfaces
- printf " %s", $ce->interfaces[$tmp]->name
- set $tmp = $tmp + 1
- if $tmp < $ce->num_interfaces
- printf ","
- end
- end
- end
- set $ce = $ce->parent
-end
-
-define ____print_inh_iface
- set $ce = $arg0
- printf "interface %s", $ce->name
- if $ce->num_interfaces != 0
- set $ce = $ce->interfaces[0]
- printf " extends %s", $ce->name
- else
- set $ce = 0
- end
-end
-
-define print_inh
- set $ce = $arg0
- set $depth = 0
- while $ce != 0
- set $tmp = $depth
- while $tmp != 0
- printf " "
- set $tmp = $tmp - 1
- end
- set $depth = $depth + 1
- if $ce->ce_flags & 0x80
- ____print_inh_iface $ce
- else
- ____print_inh_class $ce
- end
- printf " {\n"
- end
- while $depth != 0
- set $tmp = $depth
- while $tmp != 1
- printf " "
- set $tmp = $tmp - 1
- end
- printf "}\n"
- set $depth = $depth - 1
- end
-end
-
-define print_pi
- set $pi = $arg0
- printf "[0x%08x] {\n", $pi
- printf " h = %lu\n", $pi->h
- printf " flags = %d (", $pi->flags
- if $pi->flags & 0x100
- printf "ZEND_ACC_PUBLIC"
- else
- if $pi->flags & 0x200
- printf "ZEND_ACC_PROTECTED"
- else
- if $pi->flags & 0x400
- printf "ZEND_ACC_PRIVATE"
- else
- if $pi->flags & 0x800
- printf "ZEND_ACC_CHANGED"
- end
- end
- end
- end
- printf ")\n"
- printf " name = "
- ____print_str $pi->name $pi->name_length
- printf "\n}\n"
-end
-
-define ____print_str
- set $tmp = 0
- set $str = $arg0
- printf "\""
- while $tmp < $arg1
- if $str[$tmp] > 32 && $str[$tmp] < 127
- printf "%c", $str[$tmp]
- else
- printf "\\%o", $str[$tmp]
- end
- set $tmp = $tmp + 1
- end
- printf "\""
-end
-
-define printzn
- ____executor_globals
- set $ind = 0
- set $znode = $arg0
- if $znode->op_type == 1
- set $optype = "IS_CONST"
- end
- if $znode->op_type == 2
- set $optype = "IS_TMP_VAR"
- end
- if $znode->op_type == 4
- set $optype = "IS_VAR"
- end
- if $znode->op_type == 8
- set $optype = "IS_UNUSED"
- end
-
- printf "[0x%08x] %s", $znode, $optype
-
- if $znode->op_type == 1
- printf ": "
- ____printzv &$znode->u.constant 0
- end
- if $znode->op_type == 2
- printf ": "
- set $tvar = (union _temp_variable *)((char *)$eg.current_execute_data->Ts + $znode->u.var)
- ____printzv ((union _temp_variable *)$tvar)->tmp_var 0
- end
- if $znode->op_type == 4
- printf ": "
- set $tvar = (union _temp_variable *)((char *)$eg.current_execute_data->Ts + $znode->u.var)
- ____printzv *$tvar->var.ptr_ptr 0
- end
- if $znode->op_type == 8
- printf "\n"
- end
-end
-
-document printzn
- print type and content of znode.
- usage: printzn &opline->op1
-end
-
-define printzops
- printf "op1 => "
- printzn &execute_data->opline.op1
- printf "op2 => "
- printzn &execute_data->opline.op2
- printf "result => "
- printzn &execute_data->opline.result
-end
-
-document printzops
- dump operands of the current opline
-end
-
-define zbacktrace
- ____executor_globals
- dump_bt $eg.current_execute_data
-end
-
-document zbacktrace
- prints backtrace.
- This command is almost a short cut for
- > (gdb) ____executor_globals
- > (gdb) dump_bt $eg.current_execute_data
-end
-
-define zmemcheck
- set $p = alloc_globals.head
- set $stat = "?"
- set $total_size = 0
- if $arg0 != 0
- set $not_found = 1
- else
- set $not_found = 0
- end
- printf " block size status file:line\n"
- printf "-------------------------------------------------------------------------------\n"
- while $p
- set $aptr = $p + sizeof(struct _zend_mem_header) + sizeof(align_test)
- if $arg0 == 0 || (void *)$aptr == (void *)$arg0
- if $p->magic == 0x7312f8dc
- set $stat = "OK"
- end
- if $p->magic == 0x99954317
- set $stat = "FREED"
- end
- if $p->magic == 0xfb8277dc
- set $stat = "CACHED"
- end
- set $filename = strrchr($p->filename, '/')
- if !$filename
- set $filename = $p->filename
- else
- set $filename = $filename + 1
- end
- printf " 0x%08x ", $aptr
- if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10
- printf "ZVAL?(%-2d) ", $p->size
- else
- printf "%-9d ", $p->size
- end
- set $total_size = $total_size + $p->size
- printf "%-06s %s:%d", $stat, $filename, $p->lineno
- if $p->orig_filename
- set $orig_filename = strrchr($p->orig_filename, '/')
- if !$orig_filename
- set $orig_filename = $p->orig_filename
- else
- set $orig_filename = $orig_filename + 1
- end
- printf " <= %s:%d\n", $orig_filename, $p->orig_lineno
- else
- printf "\n"
- end
- if $arg0 != 0
- set $p = 0
- set $not_found = 0
- else
- set $p = $p->pNext
- end
- else
- set $p = $p->pNext
- end
- end
- if $not_found
- printf "no such block that begins at 0x%08x.\n", $aptr
- end
- if $arg0 == 0
- printf "-------------------------------------------------------------------------------\n"
- printf " total: %d bytes\n", $total_size
- end
-end
-
-document zmemcheck
- show status of a memory block.
- usage: zmemcheck [ptr].
- if ptr is 0, all blocks will be listed.
-end
View
277 CODING_STANDARDS
@@ -1,277 +0,0 @@
-========================
- PHP Coding Standards
-========================
-
-This file lists several standards that any programmer, adding or changing
-code in PHP, should follow. Since this file was added at a very late
-stage of the development of PHP v3.0, the code base does not (yet) fully
-follow it, but it's going in that general direction. Since we are now
-well into the version 4 releases, many sections have been recoded to use
-these rules.
-
-Code Implementation
--------------------
-
-0. Document your code in source files and the manual. [tm]
-
-1. Functions that are given pointers to resources should not free them
-
-For instance, ``function int mail(char *to, char *from)`` should NOT free
-to and/or from.
-Exceptions:
-
-- The function's designated behavior is freeing that resource. E.g. efree()
-
-- The function is given a boolean argument, that controls whether or not
- the function may free its arguments (if true - the function must free its
- arguments, if false - it must not)
-
-- Low-level parser routines, that are tightly integrated with the token
- cache and the bison code for minimum memory copying overhead.
-
-2. Functions that are tightly integrated with other functions within the
- same module, and rely on each other non-trivial behavior, should be
- documented as such and declared 'static'. They should be avoided if
- possible.
-
-3. Use definitions and macros whenever possible, so that constants have
- meaningful names and can be easily manipulated. The only exceptions
- to this rule are 0 and 1, when used as false and true (respectively).
- Any other use of a numeric constant to specify different behavior
- or actions should be done through a #define.
-
-4. When writing functions that deal with strings, be sure to remember
- that PHP holds the length property of each string, and that it
- shouldn't be calculated with strlen(). Write your functions in a such
- a way so that they'll take advantage of the length property, both
- for efficiency and in order for them to be binary-safe.
- Functions that change strings and obtain their new lengths while
- doing so, should return that new length, so it doesn't have to be
- recalculated with strlen() (e.g. php_addslashes())
-
-5. NEVER USE strncat(). If you're absolutely sure you know what you're doing,
- check its man page again, and only then, consider using it, and even then,
- try avoiding it.
-
-6. Use ``PHP_*`` macros in the PHP source, and ``ZEND_*`` macros in the Zend
- part of the source. Although the ``PHP_*`` macro's are mostly aliased to the
- ``ZEND_*`` macros it gives a better understanding on what kind of macro
- you're calling.
-
-7. When commenting out code using a #if statement, do NOT use 0 only. Instead
- use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
- cvs user foo. This allows easier tracking of why code was commented out,
- especially in bundled libraries.
-
-8. Do not define functions that are not available. For instance, if a
- library is missing a function, do not define the PHP version of the
- function, and do not raise a run-time error about the function not
- existing. End users should use function_exists() to test for the
- existence of a function
-
-9. Prefer emalloc(), efree(), estrdup(), etc. to their standard C library
- counterparts. These functions implement an internal "safety-net"
- mechanism that ensures the deallocation of any unfreed memory at the
- end of a request. They also provide useful allocation and overflow
- information while running in debug mode.
-
- In almost all cases, memory returned to the engine must be allocated
- using emalloc().
-
- The use of malloc() should be limited to cases where a third-party
- library may need to control or free the memory, or when the memory in
- question needs to survive between multiple requests.
-
-Naming Conventions
-------------------
-
-1. Function names for user-level functions should be enclosed with in
- the PHP_FUNCTION() macro. They should be in lowercase, with words
- underscore delimited, with care taken to minimize the letter count.
- Abbreviations should not be used when they greatly decrease the
- readability of the function name itself::
-
- Good:
- 'mcrypt_enc_self_test'
- 'mysql_list_fields'
-
- Ok:
- 'mcrypt_module_get_algo_supported_key_sizes'
- (could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
- 'get_html_translation_table'
- (could be 'html_get_trans_table'?)
-
- Bad:
- 'hw_GetObjectByQueryCollObj'
- 'pg_setclientencoding'
- 'jf_n_s_i'
-
-2. If they are part of a "parent set" of functions, that parent should
- be included in the user function name, and should be clearly related
- to the parent program or function family. This should be in the form
- of ``parent_*``::
-
- A family of 'foo' functions, for example:
- Good:
- 'foo_select_bar'
- 'foo_insert_baz'
- 'foo_delete_baz'
-
- Bad:
- 'fooselect_bar'
- 'fooinsertbaz'
- 'delete_foo_baz'
-
-3. Function names used by user functions should be prefixed
- with ``_php_``, and followed by a word or an underscore-delimited list of
- words, in lowercase letters, that describes the function. If applicable,
- they should be declared 'static'.
-
-4. Variable names must be meaningful. One letter variable names must be
- avoided, except for places where the variable has no real meaning or
- a trivial meaning (e.g. for (i=0; i<100; i++) ...).
-
-5. Variable names should be in lowercase. Use underscores to separate
- between words.
-
-6. Method names follow the 'studlyCaps' (also referred to as 'bumpy case'
- or 'camel caps') naming convention, with care taken to minimize the
- letter count. The initial letter of the name is lowercase, and each
- letter that starts a new 'word' is capitalized::
-
- Good:
- 'connect()'
- 'getData()'
- 'buildSomeWidget()'
-
- Bad:
- 'get_Data()'
- 'buildsomewidget'
- 'getI()'
-
-7. Classes should be given descriptive names. Avoid using abbreviations where
- possible. Each word in the class name should start with a capital letter,
- without underscore delimiters (CampelCaps starting with a capital letter).
- The class name should be prefixed with the name of the 'parent set' (e.g.
- the name of the extension)::
-
- Good:
- 'Curl'
- 'FooBar'
-
- Bad:
- 'foobar'
- 'foo_bar'
-
-Syntax and indentation
-----------------------
-
-1. Never use C++ style comments (i.e. // comment). Always use C-style
- comments instead. PHP is written in C, and is aimed at compiling
- under any ANSI-C compliant compiler. Even though many compilers
- accept C++-style comments in C code, you have to ensure that your
- code would compile with other compilers as well.
- The only exception to this rule is code that is Win32-specific,
- because the Win32 port is MS-Visual C++ specific, and this compiler
- is known to accept C++-style comments in C code.
-
-2. Use K&R-style. Of course, we can't and don't want to
- force anybody to use a style he or she is not used to, but,
- at the very least, when you write code that goes into the core
- of PHP or one of its standard modules, please maintain the K&R
- style. This applies to just about everything, starting with
- indentation and comment styles and up to function declaration
- syntax. Also see Indentstyle_.
-
-.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
-
-3. Be generous with whitespace and braces. Keep one empty line between the
- variable declaration section and the statements in a block, as well as
- between logical statement groups in a block. Maintain at least one empty
- line between two functions, preferably two. Always prefer::
-
- if (foo) {
- bar;
- }
-
- to:
-
- if(foo)bar;
-
-4. When indenting, use the tab character. A tab is expected to represent
- four spaces. It is important to maintain consistency in indenture so
- that definitions, comments, and control structures line up correctly.
-
-5. Preprocessor statements (#if and such) MUST start at column one. To
- indent preprocessor directives you should put the # at the beginning
- of a line, followed by any number of whitespace.
-
-Testing
--------
-
-1. Extensions should be well tested using *.phpt tests. Read about that
- in README.TESTING.
-
-Documentation and Folding Hooks
--------------------------------
-
-In order to make sure that the online documentation stays in line with
-the code, each user-level function should have its user-level function
-prototype before it along with a brief one-line description of what the
-function does. It would look like this::
-
- /* {{{ proto int abs(int number)
- Returns the absolute value of the number */
- PHP_FUNCTION(abs)
- {
- ...
- }
- /* }}} */
-
-The {{{ symbols are the default folding symbols for the folding mode in
-Emacs and vim (set fdm=marker). Folding is very useful when dealing with
-large files because you can scroll through the file quickly and just unfold
-the function you wish to work on. The }}} at the end of each function marks
-the end of the fold, and should be on a separate line.
-
-The "proto" keyword there is just a helper for the doc/genfuncsummary script
-which generates a full function summary. Having this keyword in front of the
-function prototypes allows us to put folds elsewhere in the code without
-messing up the function summary.
-
-Optional arguments are written like this::
-
- /* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
- Returns a header object with the defined parameters */
-
-And yes, please keep the prototype on a single line, even if that line
-is massive.
-
-New and Experimental Functions
------------------------------------
-To reduce the problems normally associated with the first public
-implementation of a new set of functions, it has been suggested
-that the first implementation include a file labeled 'EXPERIMENTAL'
-in the function directory, and that the functions follow the
-standard prefixing conventions during their initial implementation.
-
-The file labelled 'EXPERIMENTAL' should include the following
-information::
-
- Any authoring information (known bugs, future directions of the module).
- Ongoing status notes which may not be appropriate for CVS comments.
-
-Aliases & Legacy Documentation
------------------------------------
-You may also have some deprecated aliases with close to duplicate
-names, for example, somedb_select_result and somedb_selectresult. For
-documentation purposes, these will only be documented by the most
-current name, with the aliases listed in the documentation for
-the parent function. For ease of reference, user-functions with
-completely different names, that alias to the same function (such as
-highlight_file and show_source), will be separately documented. The
-proto should still be included, describing which function is aliased.
-
-Backwards compatible functions and names should be maintained as long
-as the code can be reasonably be kept as part of the codebase. See
-/phpdoc/README for more information on documentation.
View
2 CREDITS
@@ -1,2 +0,0 @@
-For the list of people who've put work into PHP, please see
-http://www.php.net/credits.php
View
14,191 ChangeLog
0 additions, 14,191 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN ChangeLog.1999.gz
Binary file not shown.
View
BIN ChangeLog.2000.gz
Binary file not shown.
View
BIN ChangeLog.2001.gz
Binary file not shown.
View
BIN ChangeLog.2002.gz
Binary file not shown.
View
BIN ChangeLog.2003.gz
Binary file not shown.
View
BIN ChangeLog.2004.gz
Binary file not shown.
View
519 EXTENSIONS
@@ -1,519 +0,0 @@
- List of PHP maintainers
- =======================
-
-Maintenance legend
-------------------
- Supported: Someone is actually paid to look after this.
- Maintained: Someone actually looks after it.
- Odd Fixes: It has a maintainer but they don't have time to do
- much other than throw the odd patch in. See below.
- Orphan: No current maintainer [but maybe you could take the
- role as you write your new code].
- Obsolete: Old code. Something tagged obsolete generally means
- it has been replaced by a better system and you
- should be using that.
- Unknown: Not known at this time.
-
-Status legend
--------------
- Working: Working under both Windows and Unix.
- Windows: Working only under Windows.
- Unix: Working only under Unix.
- Experimental: Under development or initial release.
- Not Working: Not working.
- Unknown: Status unknown.
-
-
-== Server APIs ==
-
--------------------------------------------------------------------------------
-EXTENSION: aolserver
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: apache
-PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: apache_hooks
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: apache2filter
-PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
-MAINTENANCE: Maintained
-STATUS: Experimental
--------------------------------------------------------------------------------
-EXTENSION: apache2handler
-PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>, Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: caudium
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: cgi
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: cli
-MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.net>
-STATUS: Working
-SINCE: 4.3.0
--------------------------------------------------------------------------------
-EXTENSION: continuity
-PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: embed
-PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: isapi
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: milter
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: nsapi
-PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: phttpd
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: pi3web
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: roxen
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: thttpd
-PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
-MAINTENANCE: Odd fixes
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: tux
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: webjames
-PRIMARY MAINTAINER: Alex Waugh <alex@alexwaugh.com>
-MAINTENANCE: Maintained
-STATUS: Experimental
--------------------------------------------------------------------------------
-
-
-== Database extensions ==
-
--------------------------------------------------------------------------------
-EXTENSION: dba
-PRIMARY MAINTAINER: Marcus B�rger <helly@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-COMMENT: DBM abstraction for db2, db3, db4, dbm, ndbm, gdbm, ini
--------------------------------------------------------------------------------
-EXTENSION: dbase
-MAINTENANCE: Orphaned
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: fbsql
-PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: interbase
-PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
-MAINTENANCE: Odd fixes
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: msql
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: mssql
-PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
-MAINTENANCE: Maintained
-STATUS: Working
-COMMENT: Tested on phpts and isapi versions
--------------------------------------------------------------------------------
-EXTENSION: mysql
-PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: mysqli
-PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.0
--------------------------------------------------------------------------------
-EXTENSION: oci8
-PRIMARY MAINTAINER: Christopher Jones <sixd@php.net>, Antony Dovgal <tony2001@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: odbc
-PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-COMMENT: Working
--------------------------------------------------------------------------------
-EXTENSION: pdo
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_dblib
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_firebird
-PRIMARY MAINTAINER: Lars Westermann <lwe@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_mysql
-PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_odbc
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_oci
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_pgsql
-PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pdo_sqlite
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.1
--------------------------------------------------------------------------------
-EXTENSION: pgsql
-PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
--------------------------------------------------------------------------------
-EXTENSION: sqlite
-PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Wez Furlong <wez@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.0 (Since 4.3.2 in PECL)
-COMMENT: Integrates SQLite embeddable SQL database engine.
--------------------------------------------------------------------------------
-EXTENSION: sybase
-MAINTENANCE: Unknown
-STATUS: Not Working
--------------------------------------------------------------------------------
-EXTENSION: sybase_ct
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-
-
-== XML extensions ==
-
--------------------------------------------------------------------------------
-EXTENSION: dom
-PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>, Marcus Boerger <helly@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.0
--------------------------------------------------------------------------------
-EXTENSION: simplexml
-PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.0
--------------------------------------------------------------------------------
-EXTENSION: soap
-PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: wddx
-PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
-MAINTENANCE: Orphaned
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: xml
-PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: xmlreader
-PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: xmlrpc
-PRIMARY MAINTAINER: Dan Libby
-MAINTENANCE: Orphaned
-STATUS: Experimental
--------------------------------------------------------------------------------
-EXTENSION: xmlwriter
-PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Pierre-Alain Joye <pajoye@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: xsl
-PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.0
--------------------------------------------------------------------------------
-
-
-== Other extensions ==
-
--------------------------------------------------------------------------------
-EXTENSION: bcmath
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: bz2
-PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
-MAINTENANCE: Odd Fixes
-STATUS: Working
-SINCE: 4.0.3
--------------------------------------------------------------------------------
-EXTENSION: calendar
-PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
-MAINTENANCE: Odd Fixes
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: com_dotnet
-PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
-MAINTENANCE: Maintained
-STATUS: Windows
-SINCE: 5.0
--------------------------------------------------------------------------------
-EXTENSION: ctype
-PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: curl
-PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>,Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.0.2
--------------------------------------------------------------------------------
-EXTENSION: date
-PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: exif
-PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.2
--------------------------------------------------------------------------------
-EXTENSION: filter
-PRIMARY MAINTAINER: Derick Rethans <derick@php.net>, Pierre-Alain Joye <pajoye@php.net>, Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.2
--------------------------------------------------------------------------------
-EXTENSION: ftp
-PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
-MAINTENANCE: Odd fixes
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: gd
-PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: gettext
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: gmp
-PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net>, Antony Dovgal <tony2001@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.0.4
--------------------------------------------------------------------------------
-EXTENSION: iconv
-PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: imap
-PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: json
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Odd fixes
-STATUS: Working
-SINCE: 5.2
--------------------------------------------------------------------------------
-EXTENSION: ldap
-PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: mbstring
-PRIMARY MAINTAINER: Rui Hirokawa <hirokawa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: mcrypt
-PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: mhash
-PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: mime_magic
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Deprecated
-STATUS: Experimental
-COMMENT: Use PECL's fileinfo extension instead
--------------------------------------------------------------------------------
-EXTENSION: ming
-PRIMARY MAINTAINER: Frank M. Kromann
-MAINTENANCE: Unknown
-STATUS: Experimental
--------------------------------------------------------------------------------
-EXTENSION: ncurses
-PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
-MAINTENANCE: Unknown
-STATUS: Experimental
--------------------------------------------------------------------------------
-EXTENSION: openssl
-PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.0.4
--------------------------------------------------------------------------------
-EXTENSION: pcntl
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: pcre
-PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>, Nuno Lopes <nlopess@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: posix
-PRIMARY MAINTAINER: Kristian K�hntopp <kris@koehntopp.de>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: pspell
-PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
-MAINTENANCE: Unknown
-STATUS: Working
-SINCE: 4.0.2
--------------------------------------------------------------------------------
-EXTENSION: readline
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: recode
-PRIMARY MAINTAINER: Kristian K�hntopp <kris@koehntopp.de>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: reflection
-PRIMARY MAINTAINER: Marcus B�rger <helly@php.net>, Johannes Schl�ter <johannes@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: session
-PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>, Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: shmop
-PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.0.3
--------------------------------------------------------------------------------
-EXTENSION: snmp
-PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
-MAINTENANCE: Odd Fixes
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: sockets
-PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.0.2
--------------------------------------------------------------------------------
-EXTENSION: spl
-PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 5.0.0
--------------------------------------------------------------------------------
-EXTENSION: sysvmsg
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: sysvsem
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: sysvshm
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: tidy
-PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>, Nuno Lopes <nlopess@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: tokenizer
-PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
-MAINTENANCE: Unknown
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: zip
-PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: zlib
-PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
View
2,051 INSTALL
@@ -1,2051 +0,0 @@
-Installing PHP
- __________________________________________________________________
-
- Table of Contents
- Preface
- 1. General Installation Considerations
- 2. Installation on Unix systems
-
- Apache 1.3.x on Unix systems
- Apache 2.0 on Unix systems
- Caudium
- fhttpd related notes
- Sun, iPlanet and Netscape servers on Sun Solaris
- CGI and command line setups
- HP-UX specific installation notes
- OpenBSD installation notes
- Solaris specific installation tips
- Debian GNU/Linux installation notes
-
- 3. Installation on Mac OS X
-
- Using Packages
- Using the bundled PHP
- Compiling for OS X Server
- Compiling for MacOS X Client
-
- 4. Installation of PECL extensions
-
- Introduction to PECL Installations
- Downloading PECL extensions
- PECL for Windows users
- Compiling shared PECL extensions with the pecl command
- Compiling shared PECL extensions with phpize
- Compiling PECL extensions statically into PHP
-
- 5. Problems?
-
- Read the FAQ
- Other problems
- Bug reports
-
- 6. Runtime Configuration
-
- The configuration file
- How to change configuration settings
-
- 7. Installation FAQ
- __________________________________________________________________
-
-Preface
-
- These installation instructions were generated from the HTML version of
- the PHP Manual so formatting and linking have been altered. See the
- online and updated version at: http://php.net/install.unix
- __________________________________________________________________
-
-Chapter 1. General Installation Considerations
-
- Before starting the installation, first you need to know what do you
- want to use PHP for. There are three main fields you can use PHP, as
- described in the What can PHP do? section:
-
- * Websites and web applications (server-side scripting)
- * Command line scripting
- * Desktop (GUI) applications
-
- For the first and most common form, you need three things: PHP itself,
- a web server and a web browser. You probably already have a web
- browser, and depending on your operating system setup, you may also
- have a web server (e.g. Apache on Linux and MacOS X; IIS on Windows).
- You may also rent webspace at a company. This way, you don't need to
- set up anything on your own, only write your PHP scripts, upload it to
- the server you rent, and see the results in your browser.
-
- In case of setting up the server and PHP on your own, you have two
- choices for the method of connecting PHP to the server. For many
- servers PHP has a direct module interface (also called SAPI). These
- servers include Apache, Microsoft Internet Information Server, Netscape
- and iPlanet servers. Many other servers have support for ISAPI, the
- Microsoft module interface (OmniHTTPd for example). If PHP has no
- module support for your web server, you can always use it as a CGI or
- FastCGI processor. This means you set up your server to use the CGI
- executable of PHP to process all PHP file requests on the server.
-
- If you are also interested to use PHP for command line scripting (e.g.
- write scripts autogenerating some images for you offline, or processing
- text files depending on some arguments you pass to them), you always
- need the command line executable. For more information, read the
- section about writing command line PHP applications. In this case, you
- need no server and no browser.
-
- With PHP you can also write desktop GUI applications using the PHP-GTK
- extension. This is a completely different approach than writing web
- pages, as you do not output any HTML, but manage Windows and objects
- within them. For more information about PHP-GTK, please visit the site
- dedicated to this extension. PHP-GTK is not included in the official
- PHP distribution.
-
- From now on, this section deals with setting up PHP for web servers on
- Unix and Windows with server module interfaces and CGI executables. You
- will also find information on the command line executable in the
- following sections.
-
- PHP source code and binary distributions for Windows can be found at
- http://www.php.net/downloads.php. We recommend you to choose a mirror
- nearest to you for downloading the distributions.
- __________________________________________________________________
-
-Chapter 2. Installation on Unix systems
-
- This section will guide you through the general configuration and
- installation of PHP on Unix systems. Be sure to investigate any
- sections specific to your platform or web server before you begin the
- process.
-
- As our manual outlines in the General Installation Considerations
- section, we are mainly dealing with web centric setups of PHP in this
- section, although we will cover setting up PHP for command line usage
- as well.
-
- There are several ways to install PHP for the Unix platform, either
- with a compile and configure process, or through various pre-packaged
- methods. This documentation is mainly focused around the process of
- compiling and configuring PHP. Many Unix like systems have some sort of
- package installation system. This can assist in setting up a standard
- configuration, but if you need to have a different set of features
- (such as a secure server, or a different database driver), you may need
- to build PHP and/or your web server. If you are unfamiliar with
- building and compiling your own software, it is worth checking to see
- whether somebody has already built a packaged version of PHP with the
- features you need.
-
- Prerequisite knowledge and software for compiling:
-
- * Basic Unix skills (being able to operate "make" and a C compiler)
- * An ANSI C compiler
- * flex: Version 2.5.4
- * bison: Version 1.28 (preferred), 1.35, or 1.75
- * A web server
- * Any module specific components (such as gd, pdf libs, etc.)
-
- The initial PHP setup and configuration process is controlled by the
- use of the command line options of the configure script. You could get
- a list of all available options along with short explanations running
- ./configure --help. Our manual documents the different options
- separately. You will find the core options in the appendix, while the
- different extension specific options are descibed on the reference
- pages.
-
- When PHP is configured, you are ready to build the module and/or
- executables. The command make should take care of this. If it fails and
- you can't figure out why, see the Problems section.
- __________________________________________________________________
-
-Apache 1.3.x on Unix systems
-
- This section contains notes and hints specific to Apache installs of
- PHP on Unix platforms. We also have instructions and notes for Apache 2
- on a separate page.
-
- You can select arguments to add to the configure on line 10 below from
- the list of core configure options and from extension specific options
- described at the respective places in the manual. The version numbers
- have been omitted here, to ensure the instructions are not incorrect.
- You will need to replace the 'xxx' here with the correct values from
- your files.
-
- Example 2-1. Installation Instructions (Apache Shared Module Version)
- for PHP
-1. gunzip apache_xxx.tar.gz
-2. tar -xvf apache_xxx.tar
-3. gunzip php-xxx.tar.gz
-4. tar -xvf php-xxx.tar
-5. cd apache_xxx
-6. ./configure --prefix=/www --enable-module=so
-7. make
-8. make install
-9. cd ../php-xxx
-
-10. Now, configure your PHP. This is where you customize your PHP
- with various options, like which extensions will be enabled. Do a
- ./configure --help for a list of available options. In our example
- we'll do a simple configure with Apache 1 and MySQL support. Your
- path to apxs may differ from our example.
-
- ./configure --with-mysql --with-apxs=/www/bin/apxs
-
-11. make
-12. make install
-
- If you decide to change your configure options after installation,
- you only need to repeat the last three steps. You only need to
- restart apache for the new module to take effect. A recompile of
- Apache is not needed.
-
- Note that unless told otherwise, 'make install' will also install PEAR,
- various PHP tools such as phpize, install the PHP CLI, and more.
-
-13. Setup your php.ini file:
-
- cp php.ini-dist /usr/local/lib/php.ini
-
- You may edit your .ini file to set PHP options. If you prefer your
- php.ini in another location, use --with-config-file-path=/some/path in
- step 10.
-
- If you instead choose php.ini-recommended, be certain to read the list
- of changes within, as they affect how PHP behaves.
-
-14. Edit your httpd.conf to load the PHP module. The path on the right hand
- side of the LoadModule statement must point to the path of the PHP
- module on your system. The make install from above may have already
- added this for you, but be sure to check.
-
- For PHP 4:
-
- LoadModule php4_module libexec/libphp4.so
-
- For PHP 5:
-
- LoadModule php5_module libexec/libphp5.so
-
-15. And in the AddModule section of httpd.conf, somewhere under the
- ClearModuleList, add this:
-
- For PHP 4:
-
- AddModule mod_php4.c
-
- For PHP 5:
-
- AddModule mod_php5.c
-
-16. Tell Apache to parse certain extensions as PHP. For example,
- let's have Apache parse the .php extension as PHP. You could
- have any extension(s) parse as PHP by simply adding more, with
- each separated by a space. We'll add .phtml to demonstrate.
-
- AddType application/x-httpd-php .php .phtml
-
- It's also common to setup the .phps extension to show highlighted PHP
- source, this can be done with:
-
- AddType application/x-httpd-php-source .phps
-
-17. Use your normal procedure for starting the Apache server. (You must
- stop and restart the server, not just cause the server to reload by
- using a HUP or USR1 signal.)
-
- Alternatively, to install PHP as a static object:
-
- Example 2-2. Installation Instructions (Static Module Installation for
- Apache) for PHP
-1. gunzip -c apache_1.3.x.tar.gz | tar xf -
-2. cd apache_1.3.x
-3. ./configure
-4. cd ..
-
-5. gunzip -c php-5.x.y.tar.gz | tar xf -
-6. cd php-5.x.y
-7. ./configure --with-mysql --with-apache=../apache_1.3.x
-8. make
-9. make install
-
-10. cd ../apache_1.3.x
-
-11. ./configure --prefix=/www --activate-module=src/modules/php5/libphp5.a
- (The above line is correct! Yes, we know libphp5.a does not exist at this
- stage. It isn't supposed to. It will be created.)
-
-12. make
- (you should now have an httpd binary which you can copy to your Apache bin d
-ir if
- it is your first install then you need to "make install" as well)
-
-13. cd ../php-5.x.y
-14. cp php.ini-dist /usr/local/lib/php.ini
-
-15. You can edit /usr/local/lib/php.ini file to set PHP options.
- Edit your httpd.conf or srm.conf file and add:
- AddType application/x-httpd-php .php
-
- Note: Replace php-5 by php-4 and php5 by php4 in PHP 4.
-
- Depending on your Apache install and Unix variant, there are many
- possible ways to stop and restart the server. Below are some typical
- lines used in restarting the server, for different apache/unix
- installations. You should replace /path/to/ with the path to these
- applications on your systems.
-
- Example 2-3. Example commands for restarting Apache
-1. Several Linux and SysV variants:
-/etc/rc.d/init.d/httpd restart
-
-2. Using apachectl scripts:
-/path/to/apachectl stop
-/path/to/apachectl start
-
-3. httpdctl and httpsdctl (Using OpenSSL), similar to apachectl:
-/path/to/httpsdctl stop
-/path/to/httpsdctl start
-
-4. Using mod_ssl, or another SSL server, you may want to manually
-stop and start:
-/path/to/apachectl stop
-/path/to/apachectl startssl
-
- The locations of the apachectl and http(s)dctl binaries often vary. If
- your system has locate or whereis or which commands, these can assist
- you in finding your server control programs.
-
- Different examples of compiling PHP for apache are as follows:
-
- ./configure --with-apxs --with-pgsql
-
- This will create a libphp5.so (or libphp4.so in PHP 4) shared library
- that is loaded into Apache using a LoadModule line in Apache's
- httpd.conf file. The PostgreSQL support is embedded into this library.
-
- ./configure --with-apxs --with-pgsql=shared
-
- This will create a libphp4.so shared library for Apache, but it will
- also create a pgsql.so shared library that is loaded into PHP either by
- using the extension directive in php.ini file or by loading it
- explicitly in a script using the dl() function.
-
- ./configure --with-apache=/path/to/apache_source --with-pgsql
-
- This will create a libmodphp5.a library, a mod_php5.c and some
- accompanying files and copy this into the src/modules/php5 directory in
- the Apache source tree. Then you compile Apache using
- --activate-module=src/modules/php5/libphp5.a and the Apache build
- system will create libphp5.a and link it statically into the httpd
- binary (replace php5 by php4 in PHP 4). The PostgreSQL support is
- included directly into this httpd binary, so the final result here is a
- single httpd binary that includes all of Apache and all of PHP.
-
- ./configure --with-apache=/path/to/apache_source --with-pgsql=shared
-
- Same as before, except instead of including PostgreSQL support directly
- into the final httpd you will get a pgsql.so shared library that you
- can load into PHP from either the php.ini file or directly using dl().
-
- When choosing to build PHP in different ways, you should consider the
- advantages and drawbacks of each method. Building as a shared object
- will mean that you can compile apache separately, and don't have to
- recompile everything as you add to, or change, PHP. Building PHP into
- apache (static method) means that PHP will load and run faster. For
- more information, see the Apache web page on DSO support.
-
- Note: Apache's default httpd.conf currently ships with a section
- that looks like this:
-
-User nobody
-Group "#-1"
-
- Unless you change that to "Group nogroup" or something like that
- ("Group daemon" is also very common) PHP will not be able to open
- files.
-
- Note: Make sure you specify the installed version of apxs when using
- --with-apxs=/path/to/apxs. You must NOT use the apxs version that is
- in the apache sources but the one that is actually installed on your
- system.
- __________________________________________________________________
-
-Apache 2.0 on Unix systems
-
- This section contains notes and hints specific to Apache 2.0 installs
- of PHP on Unix systems.
-
- Warning
-
- We do not recommend using a threaded MPM in production with Apache2.
- Use the prefork MPM instead, or use Apache1. For information on why,
- read the related FAQ entry on using Apache2 with a threaded MPM
-
- You are highly encouraged to take a look at the Apache Documentation to
- get a basic understanding of the Apache 2.0 Server.
-
- PHP and Apache 2.0.x compatibility notes: The following versions of
- PHP are known to work with the most recent version of Apache 2.0.x:
-
- * PHP 4.3.0 or later available at http://www.php.net/downloads.php.
- * the latest stable development version. Get the source code
- http://snaps.php.net/php5-latest.tar.gz or download binaries for
- Windows http://snaps.php.net/win32/php5-win32-latest.zip.
- * a prerelease version downloadable from http://qa.php.net/.
- * you have always the option to obtain PHP through anonymous CVS.
-
- These versions of PHP are compatible to Apache 2.0.40 and later.
-
- Apache 2.0 SAPI-support started with PHP 4.2.0. PHP 4.2.3 works with
- Apache 2.0.39, don't use any other version of Apache with PHP 4.2.3.
- However, the recommended setup is to use PHP 4.3.0 or later with the
- most recent version of Apache2.
-
- All mentioned versions of PHP will work still with Apache 1.3.x.
-
- Download the most recent version of Apache 2.0 and a fitting PHP
- version from the above mentioned places. This quick guide covers only
- the basics to get started with Apache 2.0 and PHP. For more information
- read the Apache Documentation. The version numbers have been omitted
- here, to ensure the instructions are not incorrect. You will need to
- replace the 'NN' here with the correct values from your files.
-
- Example 2-4. Installation Instructions (Apache 2 Shared Module Version)
-1. gzip -d httpd-2_0_NN.tar.gz
-2. tar xvf httpd-2_0_NN.tar
-3. gunzip php-NN.tar.gz
-4. tar -xvf php-NN.tar
-5. cd httpd-2_0_NN
-6. ./configure --enable-so
-7. make
-8. make install
-
- Now you have Apache 2.0.NN available under /usr/local/apache2,
- configured with loadable module support and the standard MPM prefork.
- To test the installation use your normal procedure for starting
- the Apache server, e.g.:
- /usr/local/apache2/bin/apachectl start
- and stop the server to go on with the configuration for PHP:
- /usr/local/apache2/bin/apachectl stop.
-
-9. cd ../php-NN
-
-10. Now, configure your PHP. This is where you customize your PHP
- with various options, like which extensions will be enabled. Do a
- ./configure --help for a list of available options. In our example
- we'll do a simple configure with Apache 2 and MySQL support. Your
- path to apxs may differ, in fact, the binary may even be named apxs2 on
- your system.
-
- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
-
-11. make
-12. make install
-
- If you decide to change your configure options after installation,
- you only need to repeat the last three steps. You only need to
- restart apache for the new module to take effect. A recompile of
- Apache is not needed.
-
- Note that unless told otherwise, 'make install' will also install PEAR,
- various PHP tools such as phpize, install the PHP CLI, and more.
-
-13. Setup your php.ini
-
- cp php.ini-dist /usr/local/lib/php.ini
-
- You may edit your .ini file to set PHP options. If you prefer having
- php.ini in another location, use --with-config-file-path=/some/path in
- step 10.
-
- If you instead choose php.ini-recommended, be certain to read the list
- of changes within, as they affect how PHP behaves.
-
-14. Edit your httpd.conf to load the PHP module. The path on the right hand
- side of the LoadModule statement must point to the path of the PHP
- module on your system. The make install from above may have already
- added this for you, but be sure to check.
-
- For PHP 4:
-
- LoadModule php4_module modules/libphp4.so
-
- For PHP 5:
-
- LoadModule php5_module modules/libphp5.so
-
-15. Tell Apache to parse certain extensions as PHP. For example,
- let's have Apache parse the .php extension as PHP. You could
- have any extension(s) parse as PHP by simply adding more, with
- each separated by a space. We'll add .phtml to demonstrate.
-
- AddType application/x-httpd-php .php .phtml
-
- It's also common to setup the .phps extension to show highlighted PHP
- source, this can be done with:
-
- AddType application/x-httpd-php-source .phps
-
-16. Use your normal procedure for starting the Apache server, e.g.:
-
- /usr/local/apache2/bin/apachectl start
-
- Following the steps above you will have a running Apache 2.0 with
- support for PHP as SAPI module. Of course there are many more
- configuration options available for both, Apache and PHP. For more
- information use ./configure --help in the corresponding source tree. In
- case you wish to build a multithreaded version of Apache 2.0 you must
- overwrite the standard MPM-Module prefork either with worker or
- perchild. To do so append to your configure line in step 6 above either
- the option --with-mpm=worker or --with-mpm=perchild. Take care about
- the consequences and understand what you are doing. For more
- information read the Apache documentation about the MPM-Modules.
-
- Note: If you want to use content negotiation, read the Apache
- MultiViews FAQ.
-
- Note: To build a multithreaded version of Apache your system must
- support threads. This also implies to build PHP with experimental
- Zend Thread Safety (ZTS). Therefore not all extensions might be
- available. The recommended setup is to build Apache with the
- standard prefork MPM-Module.
- __________________________________________________________________
-
-Caudium
-
- PHP 4 can be built as a Pike module for the Caudium webserver. Note
- that this is not supported with PHP 3. Follow the simple instructions
- below to install PHP 4 for Caudium.
-
- Example 2-5. Caudium Installation Instructions
-1. Make sure you have Caudium installed prior to attempting to
- install PHP 4. For PHP 4 to work correctly, you will need Pike
- 7.0.268 or newer. For the sake of this example we assume that
- Caudium is installed in /opt/caudium/server/.
-2. Change directory to php-x.y.z (where x.y.z is the version number).
-3. ./configure --with-caudium=/opt/caudium/server
-4. make
-5. make install
-6. Restart Caudium if it's currently running.
-7. Log into the graphical configuration interface and go to the
- virtual server where you want to add PHP 4 support.
-8. Click Add Module and locate and then add the PHP 4 Script Support module.
-9. If the documentation says that the 'PHP 4 interpreter isn't
- available', make sure that you restarted the server. If you did
- check /opt/caudium/logs/debug/default.1 for any errors related to
- <filename>PHP4.so</filename>. Also make sure that
- <filename>caudium/server/lib/[pike-version]/PHP4.so</filename>
- is present.
-10. Configure the PHP Script Support module if needed.
-
- You can of course compile your Caudium module with support for the
- various extensions available in PHP 4. See the reference pages for
- extension specific configure options.
-
- Note: When compiling PHP 4 with MySQL support you must make sure
- that the normal MySQL client code is used. Otherwise there might be
- conflicts if your Pike already has MySQL support. You do this by
- specifying a MySQL install directory the --with-mysql option.
- __________________________________________________________________
-
-fhttpd related notes
-
- To build PHP as an fhttpd module, answer "yes" to "Build as an fhttpd
- module?" (the --with-fhttpd=DIR option to configure) and specify the
- fhttpd source base directory. The default directory is
- /usr/local/src/fhttpd. If you are running fhttpd, building PHP as a
- module will give better performance, more control and remote execution
- capability.
-
- Note: Support for fhttpd is no longer available as of PHP 4.3.0.
- __________________________________________________________________
-
-Sun, iPlanet and Netscape servers on Sun Solaris
-
- This section contains notes and hints specific to Sun Java System Web
- Server, Sun ONE Web Server, iPlanet and Netscape server installs of PHP
- on Sun Solaris.
-
- From PHP 4.3.3 on you can use PHP scripts with the NSAPI module to
- generate custom directory listings and error pages. Additional
- functions for Apache compatibility are also available. For support in
- current web servers read the note about subrequests.
-
- You can find more information about setting up PHP for the Netscape
- Enterprise Server (NES) here:
- http://benoit.noss.free.fr/php/install-php4.html
-
- To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
- enter the proper install directory for the --with-nsapi=[DIR] option.
- The default directory is usually /opt/netscape/suitespot/. Please also
- read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
-
- 1. Install the following packages from http://www.sunfreeware.com/ or
- another download site:
-
- autoconf-2.13
- automake-1.4
- bison-1_25-sol26-sparc-local
- flex-2_5_4a-sol26-sparc-local
- gcc-2_95_2-sol26-sparc-local
- gzip-1.2.4-sol26-sparc-local
- m4-1_4-sol26-sparc-local
- make-3_76_1-sol26-sparc-local
- mysql-3.23.24-beta (if you want mysql support)
- perl-5_005_03-sol26-sparc-local
- tar-1.13 (GNU tar)
- 2. Make sure your path includes the proper directories
- PATH=.:/usr/local/bin:/usr/sbin:/usr/bin:/usr/ccs/bin and make it
- available to your system export PATH.
- 3. gunzip php-x.x.x.tar.gz (if you have a .gz dist, otherwise go to
- 4).
- 4. tar xvf php-x.x.x.tar
- 5. Change to your extracted PHP directory: cd ../php-x.x.x
- 6. For the following step, make sure /opt/netscape/suitespot/ is where
- your netscape server is installed. Otherwise, change to the correct
- path and run:
-
-./configure --with-mysql=/usr/local/mysql \
---with-nsapi=/opt/netscape/suitespot/ \
---enable-libgcc
-
- 7. Run make followed by make install.
-
- After performing the base install and reading the appropriate readme
- file, you may need to perform some additional configuration steps.
-
- Configuration Instructions for Sun/iPlanet/Netscape. Firstly you may
- need to add some paths to the LD_LIBRARY_PATH environment for the
- server to find all the shared libs. This can best done in the start
- script for your web server. The start script is often located in:
- /path/to/server/https-servername/start. You may also need to edit the
- configuration files that are located in:
- /path/to/server/https-servername/config/.
-
- 1. Add the following line to mime.types (you can do that by the
- administration server):
-
-type=magnus-internal/x-httpd-php exts=php
-
- 2. Edit magnus.conf (for servers >= 6) or obj.conf (for servers < 6)
- and add the following, shlib will vary depending on your system, it
- will be something like /opt/netscape/suitespot/bin/libphp4.so. You
- should place the following lines after mime types init.
-
-Init fn="load-modules" funcs="php4_init,php4_execute,php4_auth_trans" shlib="/op
-t/netscape/suitespot/bin/libphp4.so"
-Init fn="php4_init" LateInit="yes" errorString="Failed to initialize PHP!" [php_
-ini="/path/to/php.ini"]
-
- (PHP >= 4.3.3) The php_ini parameter is optional but with it you
- can place your php.ini in your web server config directory.
- 3. Configure the default object in obj.conf (for virtual server
- classes [version 6.0+] in their vserver.obj.conf):
-
-<Object name="default">
-.
-.
-.
-.#NOTE this next line should happen after all 'ObjectType' and before all 'AddLo
-g' lines
-Service fn="php4_execute" type="magnus-internal/x-httpd-php" [inikey=value inike
-y=value ...]
-.
-.
-</Object>
-
- (PHP >= 4.3.3) As additional parameters you can add some special
- php.ini-values, for example you can set a
- docroot="/path/to/docroot" specific to the context php4_execute is
- called. For boolean ini-keys please use 0/1 as value, not
- "On","Off",... (this will not work correctly), e.g.
- zlib.output_compression=1 instead of zlib.output_compression="On"
- 4. This is only needed if you want to configure a directory that only
- consists of PHP scripts (same like a cgi-bin directory):
-
-<Object name="x-httpd-php">
-ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
-Service fn=php4_execute [inikey=value inikey=value ...]
-</Object>
-
- After that you can configure a directory in the Administration
- server and assign it the style x-httpd-php. All files in it will
- get executed as PHP. This is nice to hide PHP usage by renaming
- files to .html.
- 5. Setup of authentication: PHP authentication cannot be used with any
- other authentication. ALL AUTHENTICATION IS PASSED TO YOUR PHP
- SCRIPT. To configure PHP Authentication for the entire server, add
- the following line to your default object:
-
-<Object name="default">
-AuthTrans fn=php4_auth_trans
-.
-.
-.
-</Object>
-
- 6. To use PHP Authentication on a single directory, add the following:
-
-<Object ppath="d:\path\to\authenticated\dir\*">
-AuthTrans fn=php4_auth_trans
-</Object>
-
- Note: The stacksize that PHP uses depends on the configuration of
- the web server. If you get crashes with very large PHP scripts, it
- is recommended to raise it with the Admin Server (in the section
- "MAGNUS EDITOR").
- __________________________________________________________________
-
-CGI environment and recommended modifications in php.ini
-
- Important when writing PHP scripts is the fact that Sun JSWS/Sun ONE
- WS/iPlanet/Netscape is a multithreaded web server. Because of that all
- requests are running in the same process space (the space of the web
- server itself) and this space has only one environment. If you want to
- get CGI variables like PATH_INFO, HTTP_HOST etc. it is not the correct
- way to try this in the old PHP 3.x way with getenv() or a similar way
- (register globals to environment, $_ENV). You would only get the
- environment of the running web server without any valid CGI variables!
-
- Note: Why are there (invalid) CGI variables in the environment?
-
- Answer: This is because you started the web server process from the
- admin server which runs the startup script of the web server, you
- wanted to start, as a CGI script (a CGI script inside of the admin
- server!). This is why the environment of the started web server has
- some CGI environment variables in it. You can test this by starting
- the web server not from the administration server. Use the command
- line as root user and start it manually - you will see there are no
- CGI-like environment variables.
-
- Simply change your scripts to get CGI variables in the correct way for
- PHP 4.x by using the superglobal $_SERVER. If you have older scripts
- which use $HTTP_HOST, etc., you should turn on register_globals in
- php.ini and change the variable order too (important: remove "E" from
- it, because you do not need the environment here):
-variables_order = "GPCS"
-register_globals = On
- __________________________________________________________________
-
-Special use for error pages or self-made directory listings (PHP >= 4.3.3)
-
- You can use PHP to generate the error pages for "404 Not Found" or
- similar. Add the following line to the object in obj.conf for every
- error page you want to overwrite:
-Error fn="php4_execute" code=XXX script="/path/to/script.php" [inikey=value inik
-ey=value...]
-
- where XXX is the HTTP error code. Please delete any other Error
- directives which could interfere with yours. If you want to place a
- page for all errors that could exist, leave the code parameter out.
- Your script can get the HTTP status code with $_SERVER['ERROR_TYPE'].
-
- Another possibility is to generate self-made directory listings. Just
- create a PHP script which displays a directory listing and replace the
- corresponding default Service line for type="magnus-internal/directory"
- in obj.conf with the following:
-Service fn="php4_execute" type="magnus-internal/directory" script="/path/to/scri
-pt.php" [inikey=value inikey=value...]
-
- For both error and directory listing pages the original URI and
- translated URI are in the variables $_SERVER['PATH_INFO'] and
- $_SERVER['PATH_TRANSLATED'].
- __________________________________________________________________
-
-Note about nsapi_virtual() and subrequests (PHP >= 4.3.3)
-
- The NSAPI module now supports the nsapi_virtual() function (alias:
- virtual()) to make subrequests on the web server and insert the result
- in the web page. This function uses some undocumented features from the
- NSAPI library. On Unix the module automatically looks for the needed
- functions and uses them if available. If not, nsapi_virtual() is
- disabled.
-
- Note: But be warned: Support for nsapi_virtual() is EXPERIMENTAL!!!
- __________________________________________________________________
-
-CGI and command line setups
-
- The default is to build PHP as a CGI program. This creates a command
- line interpreter, which can be used for CGI processing, or for
- non-web-related PHP scripting. If you are running a web server PHP has
- module support for, you should generally go for that solution for
- performance reasons. However, the CGI version enables users to run
- different PHP-enabled pages under different user-ids.
-
- Warning
-
- By using the CGI setup, your server is open to several possible
- attacks. Please read our CGI security section to learn how to defend
- yourself from those attacks.
-
- As of PHP 4.3.0, some important additions have happened to PHP. A new
- SAPI named CLI also exists and it has the same name as the CGI binary.
- What is installed at {PREFIX}/bin/php depends on your configure line
- and this is described in detail in the manual section named Using PHP
- from the command line. For further details please read that section of
- the manual.
- __________________________________________________________________
-
-Testing
-
- If you have built PHP as a CGI program, you may test your build by
- typing make test. It is always a good idea to test your build. This way
- you may catch a problem with PHP on your platform early instead of
- having to struggle with it later.
- __________________________________________________________________
-
-Benchmarking
-
- If you have built PHP 3 as a CGI program, you may benchmark your build
- by typing make bench. Note that if safe mode is on by default, the
- benchmark may not be able to finish if it takes longer then the 30
- seconds allowed. This is because the set_time_limit() can not be used
- in safe mode. Use the max_execution_time configuration setting to
- control this time for your own scripts. make bench ignores the
- configuration file.
-
- Note: make bench is only available for PHP 3.
- __________________________________________________________________
-
-Using Variables
-
- Some server supplied environment variables are not defined in the
- current CGI/1.1 specification. Only the following variables are defined
- there: AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE, GATEWAY_INTERFACE,
- PATH_INFO, PATH_TRANSLATED, QUERY_STRING, REMOTE_ADDR, REMOTE_HOST,
- REMOTE_IDENT, REMOTE_USER, REQUEST_METHOD, SCRIPT_NAME, SERVER_NAME,
- SERVER_PORT, SERVER_PROTOCOL, and SERVER_SOFTWARE. Everything else
- should be treated as 'vendor extensions'.
- __________________________________________________________________
-
-HP-UX specific installation notes
-
- This section contains notes and hints specific to installing PHP on
- HP-UX systems.
-
- There are two main options for installing PHP on HP-UX systems. Either
- compile it, or install a pre-compiled binary.
-
- Official pre-compiled packages are located here:
- http://software.hp.com/
-
- Until this manual section is rewritten, the documentation about
- compiling PHP (and related extensions) on HP-UX systems has been
- removed. For now, consider reading the following external resource:
- Building Apache and PHP on HP-UX 11.11
- __________________________________________________________________
-
-OpenBSD installation notes
-
- This section contains notes and hints specific to installing PHP on
- OpenBSD 3.6.
- __________________________________________________________________
-
-Using Binary Packages
-
- Using binary packages to install PHP on OpenBSD is the recommended and
- simplest method. The core package has been separated from the various
- modules, and each can be installed and removed independently from the
- others. The files you need can be found on your OpenBSD CD or on the
- FTP site.
-
- The main package you need to install is php4-core-4.3.8.tgz, which
- contains the basic engine (plus gettext and iconv). Next, take a look
- at the module packages, such as php4-mysql-4.3.8.tgz or
- php4-imap-4.3.8.tgz. You need to use the phpxs command to activate and
- deactivate these modules in your php.ini.
-
- Example 2-6. OpenBSD Package Install Example
-# pkg_add php4-core-4.3.8.tgz
-# /usr/local/sbin/phpxs -s
-# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
- (add in mysql)
-# pkg_add php4-mysql-4.3.8.tgz
-# /usr/local/sbin/phpxs -a mysql
- (add in imap)
-# pkg_add php4-imap-4.3.8.tgz
-# /usr/local/sbin/phpxs -a imap
- (remove mysql as a test)
-# pkg_delete php4-mysql-4.3.8
-# /usr/local/sbin/phpxs -r mysql
- (install the PEAR libraries)
-# pkg_add php4-pear-4.3.8.tgz
-
- Read the packages(7) manual page for more information about binary
- packages on OpenBSD.
- __________________________________________________________________
-
-Using Ports
-
- You can also compile up PHP from source using the ports tree. However,
- this is only recommended for users familiar with OpenBSD. The PHP 4
- port is split into two sub-directories: core and extensions. The
- extensions directory generates sub-packages for all of the supported
- PHP modules. If you find you do not want to create some of these
- modules, use the no_* FLAVOR. For example, to skip building the imap
- module, set the FLAVOR to no_imap.
- __________________________________________________________________
-
-Common Problems
-
- * The default install of Apache runs inside a chroot(2) jail, which
- will restrict PHP scripts to accessing files under /var/www. You
- will therefore need to create a /var/www/tmp directory for PHP
- session files to be stored, or use an alternative session backend.
- In addition, database sockets need to be placed inside the jail or
- listen on the localhost interface. If you use network functions,
- some files from /etc such as /etc/resolv.conf and /etc/services
- will need to be moved into /var/www/etc. The OpenBSD PEAR package
- automatically installs into the correct chroot directories, so no
- special modification is needed there. More information on the
- OpenBSD Apache is available in the OpenBSD FAQ.
- * The OpenBSD 3.6 package for the gd extension requires XFree86 to be
- installed. If you do not wish to use some of the font features that
- require X11, install the php4-gd-4.3.8-no_x11.tgz package instead.
- __________________________________________________________________
-
-Older Releases
-
- Older releases of OpenBSD used the FLAVORS system to compile up a
- statically linked PHP. Since it is hard to generate binary packages
- using this method, it is now deprecated. You can still use the old
- stable ports trees if you wish, but they are unsupported by the OpenBSD
- team. If you have any comments about this, the current maintainer for
- the port is Anil Madhavapeddy (avsm at openbsd dot org).
- __________________________________________________________________
-
-Solaris specific installation tips
-
- This section contains notes and hints specific to installing PHP on
- Solaris systems.
- __________________________________________________________________
-
-Required software
-
- Solaris installs often lack C compilers and their related tools. Read
- this FAQ for information on why using GNU versions for some of these
- tools is necessary. The required software is as follows:
-
- * gcc (recommended, other C compilers may work)
- * make
- * flex
- * bison
- * m4
- * autoconf
- * automake
- * perl
- * gzip
- * tar
- * GNU sed
-
- In addition, you will need to install (and possibly compile) any
- additional software specific to your configuration, such as Oracle or
- MySQL.
- __________________________________________________________________
-
-Using Packages
-
- You can simplify the Solaris install process by using pkgadd to install
- most of your needed components.
- __________________________________________________________________
-
-Debian GNU/Linux installation notes
-
- This section contains notes and hints specific to installing PHP on
- Debian GNU/Linux.
- __________________________________________________________________
-
-Using APT
-
- While you can just download the PHP source and compile it yourself,
- using Debian's packaging system is the simplest and cleanest method of
- installing PHP. If you are not familiar with building software on
- Linux, this is the way to go.
-
- The first decision you need to make is whether you want to install
- Apache 1.3.x or Apache 2.x. The corresponding PHP packages are
- respectively named libapache-mod-php* and libapache2-mod-php*. The
- steps given below will use Apache 1.3.x. Please note that, as of this
- writing, there is no official Debian packages of PHP 5. Then the steps
- given below will install PHP 4.
-
- PHP is available in Debian as CGI or CLI flavour too, named
- respectively php4-cgi and php4-cli. If you need them, you'll just have
- to reproduce the following steps with the good package names. Another
- special package you'd want to install is php4-pear. It contains a
- minimal PEAR installation and the pear commandline utility.
-
- If you need more recent packages of PHP than the Debian's stable ones
- or if some PHP modules lacks the Debian official repository, perhaps
- you should take a look at http://www.apt-get.org/. One of the results
- found should be Dotdeb. This unofficial repository is maintained by
- Guillaume Plessis and contains Debian packages of the most recent
- versions of PHP 4 and PHP 5. To use it, just add the to following two
- lines to your /etc/apt/sources.lists and run apt-get update :
-
- Example 2-7. The two Dotdeb related lines
-deb http://packages.dotdeb.org stable all
-deb-src http://packages.dotdeb.org stable all
-
- The last thing to consider is whether your list of packages is up to
- date. If you have not updated it recently, you need to run apt-get
- update before anything else. This way, you will be using the most
- recent stable version of the Apache and PHP packages.
-
- Now that everything is in place, you can use the following example to
- install Apache and PHP:
-
- Example 2-8. Debian Install Example with Apache 1.3
- # apt-get install libapache-mod-php4
-
- APT will automatically install the PHP 4 module for Apache 1.3, and all
- its dependencies and then activate it. If you're not asked to restart
- Apache during the install process, you'll have to do it manually :
-
- Example 2-9. Stopping and starting Apache once PHP 4 is installed
-# /etc/init.d/apache stop
-# /etc/init.d/apache start
- __________________________________________________________________
-
-Better control on configuration
-
- In the last section, PHP was installed with only core modules. This may
- not be what you want and you will soon discover that you need more
- activated modules, like MySQL, cURL, GD, etc.
-
- When you compile PHP from source yourself, you need to activate modules
- via the configure command. With APT, you just have to install
- additional packages. They're all named 'php4-*' (or 'php5-*' if you
- installed PHP 5 from a third party repository).
-
- Example 2-10. Getting the list of PHP additional packages
- # dpkg -l 'php4-*'
-
- As you can see from the last output, there's a lot of PHP modules that
- you can install (excluding the php4-cgi, php4-cli or php4-pear special
- packages). Look at them closely and choose what you need. If you choose
- a module and you do not have the proper libraries, APT will
- automatically install all the dependencies for you.
-
- If you choose to add the MySQL, cURL and GD support to PHP the command
- will look something like this:
-
- Example 2-11. Install PHP with MySQL, cURL and GD
- # apt-get install php4-mysql php4-curl php4-gd
-
- APT will automatically add the appropriate lines to your different
- php.ini (/etc/php4/apache/php.ini, /etc/php4/cgi/php.ini, etc).
-
- Example 2-12. These lines activate MySQL, cURL and GD into PHP
-extension=mysql.so
-extension=curl.so
-extension=gd.so
-
- You'll only have to stop/start Apache as previously to activate the
- modules.
- __________________________________________________________________
-
-Common Problems
-
- * If you see the PHP source instead of the result the script should
- produce, APT has probably not included /etc/apache/conf.d/php4 in
- your Apache 1.3 configuration. Please ensure that the following
- line is present in your /etc/apache/httpd.conf file then stop/start
- Apache:
-
- Example 2-13. This line activates PHP 4 into Apache
-# Include /etc/apache/conf.d/
-
- * If you installed an additional module and if its functions are not
- available in your scripts, please ensure that the appropriate line
- is present in your php.ini, as seen before. APT may fail during the
- installation of the additional module, due to a confusing debconf
- configuration.
- __________________________________________________________________
-
-Chapter 3. Installation on Mac OS X
-
- This section contains notes and hints specific to installing PHP on Mac
- OS X. There are two slightly different versions of Mac OS X, Client and
- Server, our manual deals with installing PHP on both systems. Note that
- PHP is not available for MacOS 9 and earlier versions.
- __________________________________________________________________
-
-Using Packages
-
- There are a few pre-packaged and pre-compiled versions of PHP for Mac
- OS X. This can help in setting up a standard configuration, but if you
- need to have a different set of features (such as a secure server, or a
- different database driver), you may need to build PHP and/or your web
- server yourself. If you are unfamiliar with building and compiling your
- own software, it's worth checking whether somebody has already built a
- packaged version of PHP with the features you need.
-
- The following resources offer easy to install packages and precompiled
- binaries for PHP on Mac OS:
-
- * Darwin: http://darwinports.opendarwin.org/
- * Entropy: http://www.entropy.ch/software/macosx/php/
- * Fink: http://fink.sourceforge.net/
- __________________________________________________________________
-
-Using the bundled PHP
-
- PHP has come standard with Macs since OS X version 10.0.0. Enabling PHP
- with the default web server requires uncommenting a few lines in the
- Apache configuration file httpd.conf whereas the CGI and/or CLI are
- enabled by default (easily accessible via the Terminal program).
-
- Enabling PHP using the instructions below is meant for quickly setting
- up a local development environment. It's highly recommended to always
- upgrade PHP to the newest version. Like most live software, newer
- versions are created to fix bugs and add features and PHP being is no
- different. See the appropriate MAC OS X installation documentation for
- further details. The following instructions are geared towards a
- beginner with details provided for getting a default setup to work. All
- users are encouraged to compile, or install a new packaged version.
-
- The standard installation type is using mod_php, and enabling the
- bundled mod_php on Mac OS X for the Apache web server (the default web
- server, that is accessible via System Preferences) involves the
- following steps:
-
- 1. Locate and open the Apache configuration file. By default, the
- location is as follows: /etc/httpd/httpd.conf
- Using Finder or Spotlight to find this file may prove difficult as
- by default it's private and owned by the root user.
-
- Note: One way to open this is by using a Unix based text editor in
- the Terminal, for example nano, and because the file is owned by
- root we'll use the sudo command to open it (as root) so for example