Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Imported Upstream version 5.2.2

  • Loading branch information...
commit 2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b 1 parent d29a4fd
Mark A. Hershberger authored
Showing with 60,116 additions and 53,612 deletions.
  1. +91 −104 EXTENSIONS
  2. +446 −393 INSTALL
  3. +1 −1  Makefile.gcov
  4. +1 −1  Makefile.global
  5. +590 −1 NEWS
  6. +2 −2 README.PARAMETER_PARSING_API
  7. +141 −11 README.UPDATE_5_2
  8. +0 −8 TODO
  9. +0 −20 TODO-PHP5
  10. +1 −1  TSRM/TSRM.c
  11. +12 −7 TSRM/TSRM.h
  12. +8 −5 TSRM/readdir.h
  13. +4 −2 TSRM/tsrm_config_common.h
  14. +2 −2 TSRM/tsrm_nw.c
  15. +1 −1  TSRM/tsrm_nw.h
  16. +281 −107 TSRM/tsrm_virtual_cwd.c
  17. +22 −16 TSRM/tsrm_virtual_cwd.h
  18. +19 −10 TSRM/tsrm_win32.c
  19. +2 −2 TSRM/tsrm_win32.h
  20. +1 −1  Zend/Makefile.am
  21. +0 −8 Zend/Zend.dsp
  22. +8 −24 Zend/Zend.m4
  23. +0 −8 Zend/ZendTS.dsp
  24. +2 −2 Zend/acconfig.h
  25. +1 −0  Zend/bench.php
  26. +82 −0 Zend/tests/017.phpt
  27. +36 −0 Zend/tests/018.phpt
  28. +73 −0 Zend/tests/add_001.phpt
  29. +19 −0 Zend/tests/add_002.phpt
  30. +19 −0 Zend/tests/add_003.phpt
  31. +14 −0 Zend/tests/add_004.phpt
  32. +22 −0 Zend/tests/add_005.phpt
  33. +47 −0 Zend/tests/add_006.phpt
  34. +16 −0 Zend/tests/add_007.phpt
  35. +39 −0 Zend/tests/and_001.phpt
  36. +19 −0 Zend/tests/bug33282.phpt
  37. +2 −2 Zend/tests/bug34617.phpt
  38. +14 −0 Zend/tests/bug35106.phpt
  39. +36 −0 Zend/tests/bug35634.phpt
  40. +54 −0 Zend/tests/bug36214.phpt
  41. +1 −1  Zend/tests/bug37212.phpt
  42. +45 −0 Zend/tests/bug39297.phpt
  43. +45 −0 Zend/tests/bug39438.phpt
  44. +16 −0 Zend/tests/bug39445.phpt
  45. +40 −0 Zend/tests/bug39449.phpt
  46. +15 −0 Zend/tests/bug39602.phpt
  47. +30 −0 Zend/tests/bug39721.phpt
  48. +20 −0 Zend/tests/bug39775.phpt
  49. +13 −0 Zend/tests/bug39825.phpt
  50. +88 −0 Zend/tests/bug39944.phpt
  51. +17 −0 Zend/tests/bug39990.phpt
  52. +10 −0 Zend/tests/bug40236.inc
  53. +14 −0 Zend/tests/bug40236.phpt
  54. +25 −0 Zend/tests/bug40261.phpt
  55. +20 −0 Zend/tests/bug40621.phpt
  56. +22 −0 Zend/tests/bug40770.phpt
  57. +24 −0 Zend/tests/bug40784.phpt
  58. +33 −0 Zend/tests/bug40809.phpt
  59. +18 −0 Zend/tests/bug40815.phpt
  60. +72 −0 Zend/tests/bug40833.phpt
  61. +9 −0 Zend/tests/bug40899.phpt
  62. +26 −0 Zend/tests/bug41026.phpt
  63. +31 −0 Zend/tests/bug41075.phpt
  64. +14 −0 Zend/tests/bug41117_1.phpt
  65. +46 −0 Zend/tests/bug41209.phpt
  66. BIN  Zend/tests/cast_to_array.phpt
  67. +53 −0 Zend/tests/cast_to_bool.phpt
  68. +55 −0 Zend/tests/cast_to_double.phpt
  69. +55 −0 Zend/tests/cast_to_int.phpt
  70. BIN  Zend/tests/cast_to_object.phpt
  71. BIN  Zend/tests/cast_to_string.phpt
  72. +78 −0 Zend/tests/concat_001.phpt
  73. +32 −0 Zend/tests/div_001.phpt
  74. +15 −0 Zend/tests/div_002.phpt
  75. +52 −0 Zend/tests/double_to_string.phpt
  76. +56 −0 Zend/tests/double_to_string_64bit.phpt
  77. +16 −0 Zend/tests/errmsg_001.phpt
  78. +14 −0 Zend/tests/errmsg_002.phpt
  79. +19 −0 Zend/tests/errmsg_003.phpt
  80. +15 −0 Zend/tests/errmsg_004.phpt
  81. +18 −0 Zend/tests/errmsg_005.phpt
  82. +12 −0 Zend/tests/errmsg_006.phpt
  83. +12 −0 Zend/tests/errmsg_007.phpt
  84. +12 −0 Zend/tests/errmsg_008.phpt
  85. +13 −0 Zend/tests/errmsg_009.phpt
  86. +13 −0 Zend/tests/errmsg_010.phpt
  87. +16 −0 Zend/tests/errmsg_011.phpt
  88. +11 −0 Zend/tests/errmsg_012.phpt
  89. +14 −0 Zend/tests/errmsg_013.phpt
  90. +17 −0 Zend/tests/errmsg_014.phpt
  91. +14 −0 Zend/tests/errmsg_015.phpt
  92. +14 −0 Zend/tests/errmsg_016.phpt
  93. +14 −0 Zend/tests/errmsg_017.phpt
  94. +15 −0 Zend/tests/errmsg_018.phpt
  95. +14 −0 Zend/tests/errmsg_019.phpt
  96. +14 −0 Zend/tests/errmsg_020.phpt
  97. +17 −0 Zend/tests/errmsg_021.phpt
  98. +14 −0 Zend/tests/errmsg_022.phpt
  99. +17 −0 Zend/tests/errmsg_023.phpt
  100. +17 −0 Zend/tests/errmsg_024.phpt
  101. +20 −0 Zend/tests/errmsg_025.phpt
  102. +12 −0 Zend/tests/errmsg_026.phpt
  103. +16 −0 Zend/tests/errmsg_027.phpt
  104. +12 −0 Zend/tests/errmsg_028.phpt
  105. +12 −0 Zend/tests/errmsg_029.phpt
  106. +12 −0 Zend/tests/errmsg_030.phpt
  107. +12 −0 Zend/tests/errmsg_031.phpt
  108. +15 −0 Zend/tests/errmsg_032.phpt
  109. +15 −0 Zend/tests/errmsg_033.phpt
  110. +15 −0 Zend/tests/errmsg_034.phpt
  111. +12 −0 Zend/tests/errmsg_035.phpt
  112. +12 −0 Zend/tests/errmsg_036.phpt
  113. +13 −0 Zend/tests/errmsg_037.phpt
  114. +13 −0 Zend/tests/errmsg_038.phpt
  115. +14 −0 Zend/tests/errmsg_039.phpt
  116. +13 −0 Zend/tests/errmsg_040.phpt
  117. +11 −0 Zend/tests/errmsg_041.phpt
  118. +13 −0 Zend/tests/errmsg_042.phpt
  119. +12 −0 Zend/tests/errmsg_043.phpt
  120. +25 −0 Zend/tests/foreach.phpt
  121. +15 −0 Zend/tests/globals.inc
  122. +34 −0 Zend/tests/globals_001.phpt
  123. +37 −0 Zend/tests/globals_002.phpt
  124. +43 −0 Zend/tests/globals_003.phpt
  125. +28 −0 Zend/tests/globals_004.phpt
  126. +8 −0 Zend/tests/halt_compiler1.phpt
  127. +23 −0 Zend/tests/halt_compiler2.phpt
  128. +10 −0 Zend/tests/halt_compiler3.phpt
  129. +10 −0 Zend/tests/halt_compiler4.phpt
  130. +29 −0 Zend/tests/hex_overflow_32bit.phpt
  131. +17 −0 Zend/tests/mod_001.phpt
  132. +15 −0 Zend/tests/mul_001.phpt
  133. +22 −0 Zend/tests/not_001.phpt
  134. +15 −0 Zend/tests/not_002.phpt
  135. +31 −0 Zend/tests/oct_overflow_32bit.phpt
  136. +11 −0 Zend/tests/offset_assign.phpt
  137. +29 −0 Zend/tests/or_001.phpt
  138. BIN  Zend/tests/settype_array.phpt
  139. +53 −0 Zend/tests/settype_bool.phpt
  140. +55 −0 Zend/tests/settype_double.phpt
  141. +55 −0 Zend/tests/settype_int.phpt
  142. +53 −0 Zend/tests/settype_null.phpt
  143. BIN  Zend/tests/settype_object.phpt
  144. BIN  Zend/tests/settype_resource.phpt
  145. BIN  Zend/tests/settype_string.phpt
  146. +25 −0 Zend/tests/shift_001.phpt
  147. +25 −0 Zend/tests/shift_002.phpt
  148. +15 −0 Zend/tests/sub_001.phpt
  149. +1 −2  Zend/tests/unset_cv08.phpt
  150. +16 −0 Zend/tests/xor_001.phpt
  151. +39 −0 Zend/tests/xor_002.phpt
  152. +19 −0 Zend/tests/xor_003.phpt
  153. +58 −28 Zend/zend.c
  154. +3 −3 Zend/zend.h
  155. +59 −35 Zend/zend_API.c
  156. +6 −3 Zend/zend_API.h
  157. +1,082 −492 Zend/zend_alloc.c
  158. +46 −12 Zend/zend_alloc.h
  159. +2 −2 Zend/zend_arg_defs.c
  160. +31 −24 Zend/zend_builtin_functions.c
  161. +2 −2 Zend/zend_builtin_functions.h
  162. +116 −54 Zend/zend_compile.c
  163. +11 −8 Zend/zend_compile.h
  164. +2 −2 Zend/zend_config.nw.h
  165. +2 −2 Zend/zend_config.w32.h
  166. +26 −6 Zend/zend_constants.c
  167. +2 −2 Zend/zend_constants.h
  168. +2 −2 Zend/zend_default_classes.c
  169. +2 −2 Zend/zend_dynamic_array.c
  170. +2 −2 Zend/zend_dynamic_array.h
  171. +2 −2 Zend/zend_errors.h
  172. +44 −41 Zend/zend_exceptions.c
  173. +2 −2 Zend/zend_exceptions.h
  174. +28 −25 Zend/zend_execute.c
  175. +10 −4 Zend/zend_execute.h
  176. +29 −19 Zend/zend_execute_API.c
  177. +2 −2 Zend/zend_extensions.c
  178. +2 −2 Zend/zend_extensions.h
  179. +2 −2 Zend/zend_fast_cache.h
  180. +2 −2 Zend/zend_globals.h
  181. +5 −4 Zend/zend_globals_macros.h
  182. +72 −15 Zend/zend_hash.c
  183. +10 −2 Zend/zend_hash.h
  184. +2 −2 Zend/zend_highlight.c
  185. +2 −2 Zend/zend_highlight.h
  186. +2 −2 Zend/zend_indent.c
  187. +2 −2 Zend/zend_indent.h
  188. +29 −6 Zend/zend_ini.c
  189. +3 −2 Zend/zend_ini.h
  190. +2 −2 Zend/zend_ini_scanner.h
  191. +2 −2 Zend/zend_interfaces.c
  192. +2 −2 Zend/zend_interfaces.h
  193. +2 −2 Zend/zend_istdiostream.h
  194. +2 −2 Zend/zend_iterators.c
  195. +2 −2 Zend/zend_iterators.h
  196. +1,342 −1,347 Zend/zend_language_parser.c
  197. +5,243 −5,267 Zend/zend_language_parser.output
  198. +10 −10 Zend/zend_language_parser.y
  199. +2,358 −2,323 Zend/zend_language_scanner.c
  200. +2 −2 Zend/zend_language_scanner.h
  201. +63 −38 Zend/zend_language_scanner.l
  202. +2 −2 Zend/zend_list.c
  203. +2 −2 Zend/zend_list.h
  204. +7 −5 Zend/zend_llist.c
  205. +2 −2 Zend/zend_llist.h
  206. +0 −475 Zend/zend_mm.c
  207. +0 −85 Zend/zend_mm.h
  208. +2 −2 Zend/zend_modules.h
  209. +2 −2 Zend/zend_multibyte.c
  210. +2 −2 Zend/zend_multibyte.h
  211. +4 −4 Zend/zend_multiply.h
  212. +15 −12 Zend/zend_object_handlers.c
  213. +2 −2 Zend/zend_object_handlers.h
  214. +2 −2 Zend/zend_objects.c
  215. +2 −2 Zend/zend_objects.h
  216. +6 −3 Zend/zend_objects_API.c
  217. +2 −2 Zend/zend_objects_API.h
  218. +7 −5 Zend/zend_opcode.c
  219. +81 −55 Zend/zend_operators.c
  220. +142 −55 Zend/zend_operators.h
  221. +2 −2 Zend/zend_ptr_stack.c
  222. +2 −2 Zend/zend_ptr_stack.h
  223. +2 −2 Zend/zend_qsort.c
  224. +2 −2 Zend/zend_qsort.h
  225. +2 −2 Zend/zend_sprintf.c
  226. +2 −2 Zend/zend_stack.c
  227. +2 −2 Zend/zend_stack.h
  228. +2 −2 Zend/zend_static_allocator.c
  229. +2 −2 Zend/zend_static_allocator.h
  230. +2 −2 Zend/zend_stream.c
  231. +2 −2 Zend/zend_stream.h
  232. +1,229 −382 Zend/zend_strtod.c
  233. +8 −2 Zend/zend_strtod.h
  234. +2 −2 Zend/zend_ts_hash.c
  235. +2 −2 Zend/zend_ts_hash.h
  236. +10 −2 Zend/zend_types.h
  237. +2 −2 Zend/zend_variables.c
  238. +2 −2 Zend/zend_variables.h
  239. +2 −2 Zend/zend_vm.h
  240. +33 −14 Zend/zend_vm_def.h
  241. +128 −63 Zend/zend_vm_execute.h
  242. +3 −3 Zend/zend_vm_gen.php
  243. +1 −1  Zend/zend_vm_opcodes.h
  244. +2 −2 acconfig.h
  245. +104 −3 acinclude.m4
  246. +104 −3 aclocal.m4
  247. +3 −3 build/build.mk
  248. +2 −2 build/build2.mk
  249. +2 −2 build/buildcheck.sh
  250. +615 −19 build/shtool
  251. +6,086 −5,211 configure
  252. +36 −6 configure.in
  253. +18 −28 ext/bcmath/bcmath.c
  254. +1 −1  ext/bcmath/libbcmath/src/output.c
  255. +2 −2 ext/bcmath/libbcmath/src/rt.c
  256. +1 −1  ext/bcmath/package.xml
  257. +2 −4 ext/bcmath/php_bcmath.h
  258. +10 −6 ext/bz2/bz2.c
  259. +7 −2 ext/bz2/bz2_filter.c
  260. +2 −2 ext/bz2/php_bz2.h
  261. +1 −1  ext/calendar/cal_unix.c
  262. +9 −9 ext/calendar/calendar.c
  263. +1 −1  ext/calendar/easter.c
  264. +1 −1  ext/calendar/package.xml
  265. +3 −3 ext/calendar/tests/easter_date.phpt
  266. +1 −1  ext/calendar/tests/unixtojd.phpt
  267. +17 −10 ext/com_dotnet/com_com.c
  268. +11 −4 ext/com_dotnet/com_dotnet.c
  269. +4 −2 ext/com_dotnet/com_extension.c
  270. +8 −7 ext/com_dotnet/com_handlers.c
  271. +2 −2 ext/com_dotnet/com_iterator.c
  272. +4 −3 ext/com_dotnet/com_misc.c
  273. +5 −5 ext/com_dotnet/com_olechar.c
  274. +2 −2 ext/com_dotnet/com_persist.c
  275. +4 −4 ext/com_dotnet/com_saproxy.c
  276. +5 −5 ext/com_dotnet/com_typeinfo.c
  277. +173 −12 ext/com_dotnet/com_variant.c
  278. +37 −15 ext/com_dotnet/com_wrapper.c
  279. +1 −1  ext/com_dotnet/package.xml
  280. +3 −2 ext/com_dotnet/php_com_dotnet.h
  281. +7 −5 ext/com_dotnet/php_com_dotnet_internal.h
  282. +40 −0 ext/com_dotnet/tests/bug33386.phpt
  283. +23 −0 ext/com_dotnet/tests/bug39596.phpt
  284. +22 −0 ext/com_dotnet/tests/bug39606.phpt
  285. +1 −11 ext/ctype/ctype.c
  286. +1 −1  ext/ctype/package.xml
  287. +1 −19 ext/ctype/php_ctype.h
  288. +2 −1  ext/curl/config.w32
  289. +45 −24 ext/curl/interface.c
  290. +2 −2 ext/curl/multi.c
  291. +1 −1  ext/curl/package.xml
  292. +2 −2 ext/curl/php_curl.h
  293. +7 −2 ext/curl/streams.c
  294. +2 −2 ext/date/lib/astro.c
  295. +2 −2 ext/date/lib/dow.c
  296. +17,746 −18,127 ext/date/lib/parse_date.c
  297. +17,825 −18,206 ext/date/lib/parse_date.c.orig
  298. +16 −10 ext/date/lib/parse_date.re
  299. +38 −30 ext/date/lib/parse_tz.c
  300. +2 −2 ext/date/lib/timelib.c
Sorry, we could not display the entire diff because too many files (1,708) changed.
View
195 EXTENSIONS
@@ -127,32 +127,14 @@ EXTENSION: dbase
MAINTENANCE: Orphaned
STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: dbx
-PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
-MAINTENANCE: Maintained
-STATUS: Working
-SINCE: 4.0.6
-COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
--------------------------------------------------------------------------------
EXTENSION: fbsql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
-EXTENSION: informix
-PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
-EXTENSION: ingres_ii
-PRIMARY MAINTAINER: David H�not <henot@php.net>
-MAINTENANCE: Maintained
-STATUS: Experimental
-SINCE: 4.0.2
--------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
-MAINTENANCE: Maintained
+MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msql
@@ -187,14 +169,53 @@ MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
-EXTENSION: oracle
-MAINTENANCE: Orphaned
+EXTENSION: pdo
+PRIMARY MAINTAINER: Unknown
+MAINTENANCE: Odd fixes
STATUS: Working
-COMMENT: Using the new OCI8 driver is encouraged where possible.
+SINCE: 5.1
-------------------------------------------------------------------------------
-EXTENSION: ovrimos
-MAINTENANCE: Unknown
-STATUS: Unknown
+EXTENSION: pdo_dblib
+PRIMARY MAINTAINER: Unknown
+MAINTENANCE: Odd fixes
+STATUS: Working
+SINCE: 5.1
+-------------------------------------------------------------------------------
+EXTENSION: pdo_firebird
+PRIMARY MAINTAINER: Unknown
+MAINTENANCE: Odd fixes
+STATUS: Working
+SINCE: 5.1
+-------------------------------------------------------------------------------
+EXTENSION: pdo_mysql
+PRIMARY MAINTAINER: Unknown
+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: Unknown
+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>
@@ -237,11 +258,11 @@ SINCE: 5.0
EXTENSION: soap
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
MAINTENANCE: Maintained
-STATUS: Experimental
+STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
-MAINTENANCE: Maintained
+MAINTENANCE: Orphaned
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
@@ -249,11 +270,21 @@ 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: UNKNOWN
+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
@@ -267,7 +298,7 @@ SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
-STATUS: Unknown
+STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
@@ -286,11 +317,6 @@ MAINTENANCE: Maintained
STATUS: Windows
SINCE: 5.0
-------------------------------------------------------------------------------
-EXTENSION: cpdf
-PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
-MAINTENANCE: Maintained
-STATUS: Working
--------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Maintained
@@ -313,27 +339,19 @@ MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
-------------------------------------------------------------------------------
-EXTENSION: fam
-PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: fdf
-PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
+EXTENSION: filter
+PRIMARY MAINTAINER: Derick Rethans <derick@php.net>, Pierre-Alain Joye <pajoye@php.net>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: filepro
-MAINTENANCE: Unknown
-STATUS: Unknown
+STATUS: Working
+SINCE: 5.2
-------------------------------------------------------------------------------
EXTENSION: ftp
-PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
-MAINTENANCE: Maintained
+PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
+MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gd
-PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
+PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -342,15 +360,11 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gmp
-MAINTENANCE: Unknown
-STATUS: Unknown
+PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net>, Antony Dovgal <tony2001@php.net>
+MAINTENANCE: Maintained
+STATUS: Working
SINCE: 4.0.4
-------------------------------------------------------------------------------
-EXTENSION: hwapi
-PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
EXTENSION: iconv
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
MAINTENANCE: Maintained
@@ -361,13 +375,14 @@ PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: ircg
-PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
-MAINTENANCE: Unknown
-STATUS: Unknown
+EXTENSION: json
+PRIMARY MAINTAINER: Unknown
+MAINTENANCE: Odd fixes
+STATUS: Working
+SINCE: 5.2
-------------------------------------------------------------------------------
EXTENSION: ldap
-PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
+PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -381,14 +396,9 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: mcve
-PRIMARY MAINTAINER: Unknown
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
-MAINTENANCE: Maintained
+MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mime_magic
@@ -402,47 +412,25 @@ PRIMARY MAINTAINER: Frank M. Kromann
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
-EXTENSION: mnogosearch
-PRIMARY MAINTAINER: Sergey Kartashoff <gluke@mail.ru>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: mono
-PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
-MAINTENANCE: Unknown
-STATUS: Unknown
--------------------------------------------------------------------------------
-EXTENSION: msession
-PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@mohawksoft.com>
-MAINTENANCE: Maintained
-STATUS: Working/Experimental
-COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
--------------------------------------------------------------------------------
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>
+PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
MAINTENANCE: Maintained
-STATUS: Experimental
+STATUS: Working
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: pcntl
MAINTENANCE: Unknown
-STATUS: Experimental
--------------------------------------------------------------------------------
-EXTENSION: pcre
-PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
-MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: pfpro
-PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
+EXTENSION: pcre
+PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>, Nuno Lopes <nlopess@php.net>
MAINTENANCE: Maintained
STATUS: Working
-SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian K�hntopp <kris@koehntopp.de>
@@ -477,7 +465,7 @@ STATUS: Working
EXTENSION: shmop
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
-STATUS: Experimental
+STATUS: Working
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: snmp
@@ -488,7 +476,7 @@ STATUS: Working
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
MAINTENANCE: Maintained
-STATUS: Experimental
+STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: spl
@@ -499,31 +487,30 @@ SINCE: 5.0.0
-------------------------------------------------------------------------------
EXTENSION: sysvmsg
MAINTENANCE: Unknown
-STATUS: Unknown
+STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
-STATUS: Unknown
+STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: tidy
-PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>
+PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>, Nuno Lopes <nlopess@php.net>
MAINTENANCE: Maintained
-STATUS: Unknown
+STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: tokenizer
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Unknown
-STATUS: Unknown
+STATUS: Working
-------------------------------------------------------------------------------
-EXTENSION: yaz
-PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
+EXTENSION: zip
+PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
MAINTENANCE: Maintained
-STATUS: Unknown
-SINCE: 4.0.1
+STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
View
839 INSTALL
@@ -1,5 +1,5 @@
Installing PHP
- _________________________________________________________________
+ __________________________________________________________________
Table of Contents
Preface
@@ -11,7 +11,7 @@ Installing PHP
Caudium
fhttpd related notes
Sun, iPlanet and Netscape servers on Sun Solaris
- CGI and commandline setups
+ CGI and command line setups
HP-UX specific installation notes
OpenBSD installation notes
Solaris specific installation tips
@@ -20,6 +20,7 @@ Installing PHP
3. Installation on Mac OS X
Using Packages
+ Using the bundled PHP
Compiling for OS X Server
Compiling for MacOS X Client
@@ -28,7 +29,7 @@ Installing PHP
Introduction to PECL Installations
Downloading PECL extensions
PECL for Windows users
- Compiling shared PECL extensions with PEAR
+ Compiling shared PECL extensions with the pecl command
Compiling shared PECL extensions with phpize
Compiling PECL extensions statically into PHP
@@ -44,14 +45,14 @@ Installing PHP
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
+ 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
@@ -74,36 +75,36 @@ Chapter 1. General Installation Considerations
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.
+ 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.
+ 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
+ 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
+ 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
@@ -120,14 +121,14 @@ Chapter 2. Installation on Unix systems
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 webserver. 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.
+ 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:
@@ -139,7 +140,7 @@ Chapter 2. Installation on Unix systems
* Any module specific components (such as gd, pdf libs, etc.)
The initial PHP setup and configuration process is controlled by the
- use of the commandline options of the configure script. You could get
+ 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
@@ -147,15 +148,15 @@ Chapter 2. Installation on Unix systems
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.
- _________________________________________________________________
+ 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.
+ 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
@@ -268,8 +269,8 @@ Apache 1.3.x on Unix systems
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
-dir if
+ (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
@@ -319,34 +320,33 @@ stop and start:
./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
+ 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
+ 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.
+ 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().
+ 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 webpage on DSO support.
+ 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:
@@ -358,11 +358,11 @@ Group "#-1"
("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.
- _________________________________________________________________
+ 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
@@ -375,8 +375,8 @@ Apache 2.0 on Unix systems
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.
+ 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:
@@ -390,23 +390,21 @@ Apache 2.0 on Unix systems
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.
+ 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)
+ 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
@@ -489,12 +487,12 @@ Apache 2.0 on Unix systems
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 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
@@ -505,7 +503,7 @@ Apache 2.0 on Unix systems
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
@@ -542,7 +540,7 @@ Caudium
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
@@ -554,24 +552,24 @@ fhttpd related notes
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.
+ 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 webservers read the note about subrequests.
+ 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 webservers,
+ 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.
@@ -597,9 +595,9 @@ Sun, iPlanet and Netscape servers on Sun Solaris
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:
+ 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/ \
@@ -613,7 +611,7 @@ Sun, iPlanet and Netscape servers on Sun Solaris
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 webserver. The start script is often located in:
+ 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/.
@@ -624,17 +622,17 @@ Sun, iPlanet and Netscape servers on Sun Solaris
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.
+ 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="/o
-pt/netscape/suitespot/bin/libphp4.so"
-Init fn="php4_init" LateInit="yes" errorString="Failed to initialize PHP!" [php
-_ini="/path/to/php.ini"]
+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 webserver config directory.
+ 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):
@@ -642,10 +640,10 @@ _ini="/path/to/php.ini"]
.
.
.
-.#NOTE this next line should happen after all 'ObjectType' and before all 'AddL
-og' lines
-Service fn="php4_execute" type="magnus-internal/x-httpd-php" [inikey=value inik
-ey=value ...]
+.#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>
@@ -668,8 +666,8 @@ Service fn=php4_execute [inikey=value inikey=value ...]
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
+ 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:
@@ -680,39 +678,37 @@ AuthTrans fn=php4_auth_trans
.
</Object>
- 6. To use PHP Authentication on a single directory, add the
- following:
+ 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 webserver. If you get crashes with very large PHP scripts, it
+ 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
- webserver 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 webserver without any valid CGI
- variables!
+ 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 webserver process from the
- admin server which runs the startup script of the webserver, you
+ 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 webserver has
+ 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 webserver not from the administration server. Use the command
+ 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.
@@ -723,15 +719,15 @@ CGI environment and recommended modifications in php.ini
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 ini
-key=value...]
+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
@@ -740,32 +736,32 @@ key=value...]
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/scr
-ipt.php" [inikey=value inikey=value...]
+ 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 webserver and insert the result
- in the webpage. This function uses some undocumented features from the
+ 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 commandline setups
+CGI and command line setups
- The default is to build PHP as a CGI program. This creates a
- commandline interpreter, which can be used for CGI processing, or for
+ 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
@@ -783,15 +779,15 @@ CGI and commandline setups
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
+ 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
@@ -804,86 +800,41 @@ Benchmarking
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'.
- _________________________________________________________________
+ 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. (Contributed by paul_mckay at clearwater-it dot co dot
- uk).
-
- Note: These tips were written for PHP 4.0.4 and Apache 1.3.9.
-
- 1. You need gzip, download a binary distribution from
- http://hpux.connect.org.uk/ftp/hpux/Gnu/gzip-1.2.4a/gzip-1.2.4a-sd
- -10.20.depot.Z uncompress the file and install using swinstall.
- 2. You need gcc, download a binary distribution from
- http://gatekeep.cs.utah.edu/ftp/hpux/Gnu/gcc-2.95.2/gcc-2.95.2-sd-
- 10.20.depot.gz. uncompress this file and install gcc using
- swinstall.
- 3. You need the GNU binutils, you can download a binary distribution
- from
- http://hpux.connect.org.uk/ftp/hpux/Gnu/binutils-2.9.1/binutils-2.
- 9.1-sd-10.20.depot.gz. uncompress this file and install binutils
- using swinstall.
- 4. You now need bison, you can download a binary distribution from
- http://hpux.connect.org.uk/ftp/hpux/Gnu/bison-1.28/bison-1.28-sd-1
- 0.20.depot.gz, install as above.
- 5. You now need flex, you need to download the source from one of the
- http://www.gnu.org mirrors. It is in the non-gnu directory of the
- ftp site. Download the file, gunzip, then tar -xvf it. Go into the
- newly created flex directory and run ./configure, followed by
- make, and then make install.
- If you have errors here, it's probably because gcc etc. are not in
- your PATH so add them to your PATH.
- 6. Download the PHP and apache sources.
- 7. gunzip and tar -xvf them. We need to hack a couple of files so
- that they can compile OK.
- 8. Firstly the configure file needs to be hacked because it seems to
- lose track of the fact that you are a hpux machine, there will be
- a better way of doing this but a cheap and cheerful hack is to put
- lt_target=hpux10.20 on line 47286 of the configure script.
- 9. Next, the Apache GuessOS file needs to be hacked. Under
- apache_1.3.9/src/helpers change line 89 from echo
- "hp${HPUXMACH}-hpux${HPUXVER}"; exit 0 to: echo
- "hp${HPUXMACH}-hp-hpux${HPUXVER}"; exit 0
- 10. You cannot install PHP as a shared object under HP-UX so you must
- compile it as a static, just follow the instructions at the Apache
- page.
- 11. PHP and Apache should have compiled OK, but Apache won't start.
- you need to create a new user for Apache, e.g. www, or apache. You
- then change lines 252 and 253 of the conf/httpd.conf in Apache so
- that instead of
-
-User nobody
-Group nogroup
+ HP-UX systems.
- you have something like
+ There are two main options for installing PHP on HP-UX systems. Either
+ compile it, or install a pre-compiled binary.
-User www
-Group sys
+ Official pre-compiled packages are located here:
+ http://software.hp.com/
- This is because you can't run Apache as nobody under hp-ux. Apache
- and PHP should then work.
- _________________________________________________________________
+ 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
@@ -917,7 +868,7 @@ Using Binary Packages
Read the packages(7) manual page for more information about binary
packages on OpenBSD.
- _________________________________________________________________
+ __________________________________________________________________
Using Ports
@@ -928,7 +879,7 @@ Using Ports
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
@@ -943,28 +894,26 @@ Common Problems
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.
- _________________________________________________________________
+ * 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).
- _________________________________________________________________
+ 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
@@ -987,19 +936,19 @@ Required software
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.
- _________________________________________________________________
+ 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
@@ -1044,24 +993,23 @@ deb-src http://packages.dotdeb.org stable all
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 :
+ 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
+ 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
+ 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).
@@ -1070,8 +1018,8 @@ Better control on configuration
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
+ 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
@@ -1090,45 +1038,149 @@ 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:
+ 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.
- _________________________________________________________________
+ 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.
- _________________________________________________________________
+ 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.
- _________________________________________________________________
+ 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
+ type the following into the Terminal Application (after, it will
+ prompt for a password): sudo nano /etc/httpd/httpd.conf
+ Noteworthy nano commands: ^w (search), ^o (save), and ^x (exit)
+ where ^ represents the Ctrl key.
+ 2. With a text editor, uncomment the lines (by removing the #) that
+ look similar to the following (these two lines are often not
+ together, locate them both in the file):
+
+# LoadModule php4_module libexec/httpd/libphp4.so
+
+# AddModule mod_php4.c
+
+ Notice the location/path. When building PHP in the future, the
+ above files should be replaced or commented out.
+ 3. Be sure the desired extensions will parse as PHP (examples: .php
+ .html and .inc)
+ Due to the following statement already existing in httpd.conf (as
+ of Mac Panther), once PHP is enabled the .php files will
+ automatically parse as PHP.
+
+<IfModule mod_php4.c>
+ # If php is turned on, we respect .php and .phps files.
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php-source .phps
+
+ # Since most users will want index.php to work we
+ # also automatically enable index.php
+ <IfModule mod_dir.c>
+ DirectoryIndex index.html index.php
+ </IfModule>
+</IfModule>
+
+ 4. Be sure the DirectoryIndex loads the desired default index file
+ This is also set in httpd.conf. Typically index.php and index.html
+ are used. By default index.php is enabled because it's also in the
+ PHP check shown above. Adjust accordingly.
+ 5. Set the php.ini location or use the default
+ A typical default location on Mac OS X is /usr/local/php/php.ini
+ and a call to phpinfo() will reveal this information. If a php.ini
+ is not used, PHP will use all default values. See also the related
+ FAQ on finding php.ini.
+ 6. Locate or set the DocumentRoot
+ This is the root directory for all the web files. Files in this
+ directory are served from the web server so the PHP files will
+ parse as PHP before outputting them to the browser. A typical
+ default path is /Library/WebServer/Documents but this can be set to
+ anything in httpd.conf. Alternatively, the default DocumentRoot for
+ individual users is /Users/yourusername/Sites
+ 7. Create a phpinfo() file
+ The phpinfo() function will display information about PHP. Consider
+ creating a file in the DocumentRoot with the following PHP code:
+
+<?php phpinfo(); ?>
+
+ 8. Restart Apache, and load the PHP file created above
+ To restart, either execute sudo apachectl graceful in the shell or
+ stop/start the "Personal Web Server" option in the OS X System
+ Preferences. By default, loading local files in the browser will
+ have an URL like so: http://localhost/info.php Or using the
+ DocumentRoot in the user directory is another option and would end
+ up looking like: http://localhost/~yourusername/info.php
+
+ The CLI (or CGI in older versions) is appropriately named php and
+ likely exists as /usr/bin/php. Open up the terminal, read the command
+ line section of the PHP manual, and execute php -v to check the PHP
+ version of this PHP binary. A call to phpinfo() will also reveal this
+ information.
+ __________________________________________________________________
Compiling for OS X Server
@@ -1147,8 +1199,8 @@ Compiling for OS X Server
--enable-module=most \
--target=apache
- 3. If you want the compiler to do some optimization, you may also
- want to add this line:
+ 3. If you want the compiler to do some optimization, you may also want
+ to add this line:
setenv OPTIM=-O2
@@ -1179,17 +1231,17 @@ setenv OPTIM=-O2
--target=apache \
--activate-module=src/modules/php4/libphp4.a
- You may get a message telling you that libmodphp4.a is out of
- date. If so, go to the src/modules/php4 directory inside your
- Apache source directory and run this command: ranlib libmodphp4.a.
- Then go back to the root of the Apache source directory and run
- the above configure command again. That'll bring the link table up
- to date. Run make and make install again.
+ You may get a message telling you that libmodphp4.a is out of date.
+ If so, go to the src/modules/php4 directory inside your Apache
+ source directory and run this command: ranlib libmodphp4.a. Then go
+ back to the root of the Apache source directory and run the above
+ configure command again. That'll bring the link table up to date.
+ Run make and make install again.
7. Copy and rename the php.ini-dist file to your bin directory from
- your PHP 4 source directory: cp php.ini-dist
- /usr/local/bin/php.ini or (if your don't have a local directory)
- cp php.ini-dist /usr/bin/php.ini.
- _________________________________________________________________
+ your PHP 4 source directory: cp php.ini-dist /usr/local/bin/php.ini
+ or (if your don't have a local directory) cp php.ini-dist
+ /usr/bin/php.ini.
+ __________________________________________________________________
Compiling for MacOS X Client
@@ -1200,8 +1252,7 @@ Compiling for MacOS X Client
Warning
- Be careful when you do this, you could screw up your Apache web
- server!
+ Be careful when you do this, you could screw up your Apache web server!
Do this to install:
@@ -1211,9 +1262,9 @@ Compiling for MacOS X Client
wait for the download to finish.
3. Type gunzip libphp4.so.gz.
4. Type sudo apxs -i -a -n php4 libphp4.so
- 5. Now type sudo open -a TextEdit /etc/httpd/httpd.conf. TextEdit
- will open with the web server configuration file. Locate these two
- lines towards the end of the file: (Use the Find command)
+ 5. Now type sudo open -a TextEdit /etc/httpd/httpd.conf. TextEdit will
+ open with the web server configuration file. Locate these two lines
+ towards the end of the file: (Use the Find command)
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
@@ -1228,7 +1279,7 @@ Compiling for MacOS X Client
Now open up 127.0.0.1/~your_username/test.php in your web browser. You
should see a status table with information about the PHP module.
- _________________________________________________________________
+ __________________________________________________________________
Chapter 4. Installation of PECL extensions
@@ -1241,7 +1292,8 @@ Introduction to PECL Installations
These instructions assume /your/phpsrcdir/ is the path to the PHP
source distribution, and that extname is the name of the PECL
extension. Adjust accordingly. These instructions also assume a
- familiarity with the pear command.
+ familiarity with the pear command. The information in the PEAR manual
+ for the pear command also applies to the pecl command.
To be useful, a shared extension must be built, installed, and loaded.
The methods described below provide you with various instructions on
@@ -1253,7 +1305,7 @@ Introduction to PECL Installations
of the required tools (autoconf, automake, libtool, etc.) See the
Anonymous CVS Instructions for details on the required tools, and
required versions.
- _________________________________________________________________
+ __________________________________________________________________
Downloading PECL extensions
@@ -1264,9 +1316,9 @@ Downloading PECL extensions
extensions that are offered by the PHP Development Team. The
information available here includes: ChangeLog, release notes,
requirements and other similar details.
- * pear download extname
+ * pecl download extname
PECL extensions that have releases listed on the PECL web site are
- available for download and installation using the pear command.
+ available for download and installation using the pecl command.
Specific revisions may also be specified.
* CVS
Most PECL extensions also reside in CVS. A web-based view may be
@@ -1279,10 +1331,10 @@ $ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
* Windows downloads
Windows users may find compiled PECL binaries by downloading the
- Collection of PECL modules from the PHP Downloads page, and by
- retrieving a PECL Snapshot. To compile PHP under Windows, read the
- appropriate chapter.
- _________________________________________________________________
+ Collection of PECL modules from the PHP Downloads page, or by
+ retrieving a PECL Snapshot or an extension DLL on PECL4WIN. To
+ compile PHP under Windows, read the appropriate chapter.
+ __________________________________________________________________
PECL for Windows users
@@ -1294,42 +1346,42 @@ PECL for Windows users
extension=php_extname.dll
After doing this, restart the web server.
- _________________________________________________________________
+ __________________________________________________________________
-Compiling shared PECL extensions with PEAR
+Compiling shared PECL extensions with the pecl command
- PEAR makes it easy to create shared PHP extensions. Using the pear
+ PECL makes it easy to create shared PHP extensions. Using the pecl
command, do the following:
- $ pear install extname
+ $ pecl install extname
This will download the source for extname, compile, and install
extname.so into your extension_dir. extname.so may then be loaded via
php.ini
- By default, the pear command will not install packages that are marked
+ By default, the pecl command will not install packages that are marked
with the alpha or beta state. If no stable packages are available, you
may install a beta package using the following command:
- $ pear install extname-beta
+ $ pecl install extname-beta
You may also install a specific version using this variant:
- $ pear install extname-0.1
- _________________________________________________________________
+ $ pecl install extname-0.1
+ __________________________________________________________________
Compiling shared PECL extensions with phpize
- Sometimes, using the pear installer is not an option. This could be
+ Sometimes, using the pecl installer is not an option. This could be
because you're behind a firewall, or it could be because the extension
- you want to install is not available as a PEAR compatible package,
- such as unreleased extensions from CVS. If you need to build such an
- extension, you can use the lower-level build tools to perform the
- build manually.
+ you want to install is not available as a PECL compatible package, such
+ as unreleased extensions from CVS. If you need to build such an
+ extension, you can use the lower-level build tools to perform the build
+ manually.
The phpize command is used to prepare the build environment for a PHP
- extension. In the following sample, the sources for an extension are
- in a directory named extname:
+ extension. In the following sample, the sources for an extension are in
+ a directory named extname:
$ cd extname
$ phpize
@@ -1348,7 +1400,7 @@ $ make
extensions.
Execute phpize --help to display additional usage information.
- _________________________________________________________________
+ __________________________________________________________________
Compiling PECL extensions statically into PHP
@@ -1358,7 +1410,7 @@ Compiling PECL extensions statically into PHP
regenerate its configure script.
$ cd /your/phpsrcdir/ext
-$ pear download extname
+$ pecl download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
@@ -1383,11 +1435,10 @@ $ make install
Whether --enable-extname or --with-extname is used depends on the
extension. Typically an extension that does not require external
- libraries uses --enable. To be sure, run the following after
- buildconf:
+ libraries uses --enable. To be sure, run the following after buildconf:
$ ./configure --help | grep extname
- _________________________________________________________________
+ __________________________________________________________________
Chapter 5. Problems?
@@ -1395,7 +1446,7 @@ Read the FAQ
Some problems are more common than others. The most common ones are
listed in the PHP FAQ, part of this manual.
- _________________________________________________________________
+ __________________________________________________________________
Other problems
@@ -1413,7 +1464,7 @@ Other problems
system, what PHP version, what web server, if you are running PHP as
CGI or a server module, safe mode, etc...), and preferably enough code
to make others able to reproduce and test your problem.
- _________________________________________________________________
+ __________________________________________________________________
Bug reports
@@ -1426,16 +1477,16 @@ Bug reports
Read the How to report a bug document before submitting any bug
reports!
- _________________________________________________________________
+ __________________________________________________________________
Chapter 6. Runtime Configuration
The configuration file
- The configuration file (called php3.ini in PHP 3, and simply php.ini
- as of PHP 4) is read when PHP starts up. For the server module
- versions of PHP, this happens only once when the web server is
- started. For the CGI and CLI version, it happens on every invocation.
+ The configuration file (called php3.ini in PHP 3, and simply php.ini as
+ of PHP 4) is read when PHP starts up. For the server module versions of
+ PHP, this happens only once when the web server is started. For the CGI
+ and CLI version, it happens on every invocation.
php.ini is searched in these locations (in order):
@@ -1444,25 +1495,30 @@ The configuration file
PHP_INI_PATH environment variable in THTTPD)
* The PHPRC environment variable. Before PHP 5.2.0 this was checked
after the registry key mentioned below.
+ * As of PHP 5.2.0, the following registry locations are searched in
+ order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath,
+ HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and
+ HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z
+ mean the PHP major, minor and release versions.
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry
location)
- * Current working directory (for CLI)
+ * Current working directory (except CLI)
* The web server's directory (for SAPI modules), or directory of PHP
(otherwise in Windows)
* Windows directory (C:\windows or C:\winnt) (for Windows), or
--with-config-file-path compile time option
If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
- e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini.
- SAPI name can be determined by php_sapi_name().
+ e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini. SAPI
+ name can be determined by php_sapi_name().
- Note: The Apache web server changes the directory to root at
- startup causing PHP to attempt to read php.ini from the root
- filesystem if it exists.
+ Note: The Apache web server changes the directory to root at startup
+ causing PHP to attempt to read php.ini from the root filesystem if
+ it exists.
The php.ini directives handled by extensions are documented
- respectively on the pages of the extensions themselves. The list of
- the core directives is available in the appendix. Probably not all PHP
+ respectively on the pages of the extensions themselves. The list of the
+ core directives is available in the appendix. Probably not all PHP
directives are documented in the manual though. For a complete list of
directives available in your PHP version, please read your well
commented php.ini file. Alternatively, you may find the the latest
@@ -1486,7 +1542,7 @@ include_path = ".;c:\php\lib"
Since PHP 5.1.0, it is possible to refer to existing .ini variables
from within .ini files. Example: open_basedir = ${open_basedir}
":/new/dir".
- _________________________________________________________________
+ __________________________________________________________________
How to change configuration settings
@@ -1499,17 +1555,17 @@ Running PHP as an Apache module
With PHP 4 and PHP 5, there are several Apache directives that allow
you to change the PHP configuration from within the Apache
- configuration files. For a listing of which directives are
- PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the
- List of php.ini directives appendix.
+ configuration files. For a listing of which directives are PHP_INI_ALL,
+ PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the List of php.ini
+ directives appendix.
Note: With PHP 3, there are Apache directives that correspond to
each configuration setting in the php3.ini name, except the name is
prefixed by "php3_".
php_value name value
- Sets the value of the specified directive. Can be used only
- with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a
+ Sets the value of the specified directive. Can be used only with
+ PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a
previously set value use none as the value.
Note: Don't use php_value to set boolean values. php_flag (see
@@ -1522,14 +1578,14 @@ Running PHP as an Apache module
php_admin_value name value
Sets the value of the specified directive. This can not be used
in .htaccess files. Any directive type set with php_admin_value
- can not be overridden by .htaccess or virtualhost directives.
- To clear a previously set value use none as the value.
+ can not be overridden by .htaccess or virtualhost directives. To
+ clear a previously set value use none as the value.
php_admin_flag name on|off
Used to set a boolean configuration directive. This can not be
used in .htaccess files. Any directive type set with
- php_admin_flag can not be overridden by .htaccess or
- virtualhost directives.
+ php_admin_flag can not be overridden by .htaccess or virtualhost
+ directives.
Example 6-2. Apache configuration example
<IfModule mod_php5.c>
@@ -1552,7 +1608,7 @@ Running PHP as an Apache module
error_reporting directive as they will have no meaning and will
evaluate to 0. Use the associated bitmask values instead. These
constants can be used in php.ini
- _________________________________________________________________
+ __________________________________________________________________
Changing PHP configuration via the Windows registry
@@ -1566,28 +1622,28 @@ Changing PHP configuration via the Windows registry
active for any script running from this directory or any subdirectory
of it. The values under the key should have the name of the PHP
configuration directive and the string value. PHP constants in the
- values are not parsed. However, only configuration values changeable
- in PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.
- _________________________________________________________________
+ values are not parsed. However, only configuration values changeable in
+ PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.
+ __________________________________________________________________
Other interfaces to PHP
- Regardless of how you run PHP, you can change certain values at
- runtime of your scripts through ini_set(). See the documentation on
- the ini_set() page for more information.
+ Regardless of how you run PHP, you can change certain values at runtime
+ of your scripts through ini_set(). See the documentation on the
+ ini_set() page for more information.
If you are interested in a complete list of configuration settings on
your system with their current values, you can execute the phpinfo()
- function, and review the resulting page. You can also access the
- values of individual configuration directives at runtime using
- ini_get() or get_cfg_var().
- _________________________________________________________________
+ function, and review the resulting page. You can also access the values
+ of individual configuration directives at runtime using ini_get() or
+ get_cfg_var().
+ __________________________________________________________________
Chapter 7. Installation FAQ
This section holds common questions about the way to install PHP. PHP
- is available for almost any OS (except maybe for MacOS before OSX),
- and almost any web server.
+ is available for almost any OS (except maybe for MacOS before OSX), and
+ almost any web server.
To install PHP, follow the instructions in Installing PHP.
@@ -1654,21 +1710,20 @@ cgi error:
sticking dozens of 3rd-party libraries together and making it all
appear as one coherent entity through an intuitive and easy to learn
language interface. The flexibility and power of PHP relies on the
- stability and robustness of the underlying platform. It needs a
- working OS, a working web server and working 3rd-party libraries to
- glue together. When any of these stop working PHP needs ways to
- identify the problems and fix them quickly. When you make the
- underlying framework more complex by not having completely separate
- execution threads, completely separate memory segments and a strong
- sandbox for each request to play in, feet of clay are introduced into
- PHP's system.
+ stability and robustness of the underlying platform. It needs a working
+ OS, a working web server and working 3rd-party libraries to glue
+ together. When any of these stop working PHP needs ways to identify the
+ problems and fix them quickly. When you make the underlying framework
+ more complex by not having completely separate execution threads,
+ completely separate memory segments and a strong sandbox for each
+ request to play in, feet of clay are introduced into PHP's system.
If you feel you have to use a threaded MPM, look at a FastCGI
configuration where PHP is running in its own memory space.
- And finally, this warning against using a threaded MPM is not as
- strong for Windows systems because most libraries on that platform
- tend to be threadsafe.
+ And finally, this warning against using a threaded MPM is not as strong
+ for Windows systems because most libraries on that platform tend to be
+ threadsafe.
2. Unix/Windows: Where should my php.ini file be located?
@@ -1684,9 +1739,9 @@ cgi error:
On Windows the default path for the php.ini file is the Windows
directory. If you're using the Apache webserver, php.ini is first
- searched in the Apaches install directory, e.g. c:\program
- files\apache group\apache. This way you can have different php.ini
- files for different versions of Apache on the same machine.
+ searched in the Apaches install directory, e.g. c:\program files\apache
+ group\apache. This way you can have different php.ini files for
+ different versions of Apache on the same machine.
See also the chapter about the configuration file.
@@ -1694,9 +1749,9 @@ cgi error:
message 'Document Contains No Data'! What's going on here?
This probably means that PHP is having some sort of problem and is
- core-dumping. Look in your server error log to see if this is the
- case, and then try to reproduce the problem with a small test case. If
- you know how to use 'gdb', it is very helpful when you can provide a
+ core-dumping. Look in your server error log to see if this is the case,
+ and then try to reproduce the problem with a small test case. If you
+ know how to use 'gdb', it is very helpful when you can provide a
backtrace with your bug report to help the developers pinpoint the
problem. If you are using PHP as an Apache module try something like:
@@ -1737,30 +1792,30 @@ LoadModule perl_module modules/libperl.so
AddType application/x-httpd-php3 .php3 # for PHP 3
AddType application/x-httpd-php .php # for PHP 4
- ... to the global properties, or to the properties of the
- VirtualDomain you want to have PHP support added to.
+ ... to the global properties, or to the properties of the VirtualDomain
+ you want to have PHP support added to.
5. Unix: I installed PHP 3 using RPMS, but it doesn't compile with the
database support I need! What's going on here?
- Due to the way PHP 3 built, it is not easy to build a complete
- flexible PHP RPM. This issue is addressed in PHP 4. For PHP 3, we
- currently suggest you use the mechanism described in the
- INSTALL.REDHAT file in the PHP distribution. If you insist on using an
- RPM version of PHP 3, read on...
+ Due to the way PHP 3 built, it is not easy to build a complete flexible
+ PHP RPM. This issue is addressed in PHP 4. For PHP 3, we currently
+ suggest you use the mechanism described in the INSTALL.REDHAT file in
+ the PHP distribution. If you insist on using an RPM version of PHP 3,
+ read on...
The RPM packagers are setting up the RPMS to install without database
- support to simplify installations and because RPMS use /usr/ instead
- of the standard /usr/local/ directory for files. You need to tell the
- RPM spec file which databases to support and the location of the
- top-level of your database server.
+ support to simplify installations and because RPMS use /usr/ instead of
+ the standard /usr/local/ directory for files. You need to tell the RPM
+ spec file which databases to support and the location of the top-level
+ of your database server.
- This example will explain the process of adding support for the
- popular MySQL database server, using the mod installation for Apache.
+ This example will explain the process of adding support for the popular
+ MySQL database server, using the mod installation for Apache.
Of course all of this information can be adjusted for any database
- server that PHP supports. We will assume you installed MySQL and
- Apache completely with RPMS for this example as well.
+ server that PHP supports. We will assume you installed MySQL and Apache
+ completely with RPMS for this example as well.
* First remove mod_php3 :
@@ -1794,28 +1849,28 @@ rpm -bb /usr/src/redhat/SPECS/mod_php3.spec
rpm -ivh /usr/src/redhat/RPMS/i386/mod_php3-3.0.5-2.i386.rpm