| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 
 | 
 <reference id="ref.info">
  <title>PHP options & information</title>
  <titleabbrev>PHP options/info</titleabbrev>
  <refentry id="function.error-log">
   <refnamediv>
    <refname>error_log</refname>
    <refpurpose>send an error message somewhere</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>error_log</function></funcdef>
     <paramdef>string <parameter>message</parameter></paramdef>
     <paramdef>int <parameter>message_type</parameter></paramdef>
     <paramdef>string <parameter><optional>destination</optional></parameter></paramdef>
     <paramdef>string <parameter><optional>extra_headers</optional></parameter></paramdef>
    </funcsynopsis>
    <para>
     Sends an error message to the web server's error log, a
     <acronym>TCP</acronym> port or to a file.  The first parameter,
     <parameter>message</parameter>, is the error message that should
     be logged.  The second parameter,
     <parameter>message_type</parameter> says where the message should
     go:
     <table>
      <title><function>error_log</function> log types</title>
      <tgroup cols="2">
       <tbody>
	<row>
	 <entry>0</entry>
	 <entry>
	  <parameter>message</parameter> is sent to PHP's system
	  logger, using the Operating System's system logging
	  mechanism or a file, depending on what the <link
	   linkend="ini.error-log">error_log</link> configuration
	  directive is set to.
	 </entry>
	</row>
	<row>
	 <entry>1</entry>
	 <entry>
	  <parameter>message</parameter> is sent by email to the
	  address in the <parameter>destination</parameter> parameter.
	  This is the only message type where the fourth parameter,
	  <parameter>extra_headers</parameter> is used.  This message
	  type uses the same internal function as
	  <function>Mail</function> does.
	 </entry>
	</row>
	<row>
	 <entry>2</entry>
	 <entry>
	  <parameter>message</parameter> is sent through the PHP
	  debugging connection.  This option is only available if
	  <link linkend="enable-debugger">remote debugging has been
	  enabled</link>.  In this case, the
	  <parameter>destination</parameter> parameter specifies the
	  host name or IP address and optionally, port number, of the
	  socket receiving the debug information.
	 </entry>
	</row>
	<row>
	 <entry>3</entry>
	 <entry>
	  <parameter>message</parameter> is appended to the file
	  <parameter>destination</parameter>.
	 </entry>
	</row>
       </tbody>
      </tgroup>
     </table>
    <para>
     <example>
      <title><function>error_log</function> examples</title>
      <programlisting role=php>
// Send notification through the server log if we can not
// connect to the database.
if (!Ora_Logon($username, $password)) {
    error_log("Oracle database not available!", 0);
}
// Notify administrator by email if we run out of FOO
if (!($foo = allocate_new_foo()) {
    error_log("Big trouble, we're all out of FOOs!", 1,
              "operator@mydomain.com");
}
// other ways of calling error_log():
error_log("You messed up!", 2, "127.0.0.1:7000");
error_log("You messed up!", 2, "loghost");
error_log("You messed up!", 3, "/var/tmp/my-errors.log");
</programlisting>
     </example>
   </refsect1>
  </refentry>
  <refentry id="function.error-reporting">
   <refnamediv>
    <refname>error_reporting</refname>
    <refpurpose>set which PHP errors are reported</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>error_reporting</function></funcdef>
     <paramdef>int <parameter><optional>level</optional></parameter></paramdef>
    </funcsynopsis>
    <para>
     Sets PHP's error reporting level and returns the old level.  The
     error reporting level is a bitmask of the following values
     (follow the links for the internal values to get their meanings):
     <table>
      <title><function>error_reporting</function> bit values</title>
      <tgroup cols="2">
       <thead>
	<row>
	 <entry>value</entry>
	 <entry>internal name</entry>
	</row>
       </thead>
       <tbody>
	<row>
	 <entry>1</entry>
	 <entry><link linkend="internal.e-error">E_ERROR</link></entry>
	</row>
	<row>
	 <entry>2</entry>
	 <entry><link linkend="internal.e-warning">E_WARNING</link></entry>
	</row>
	<row>
	 <entry>4</entry>
	 <entry><link linkend="internal.e-parse">E_PARSE</link></entry>
	</row>
	<row>
	 <entry>8</entry>
	 <entry><link linkend="internal.e-notice">E_NOTICE</link></entry>
	</row>
	<row>
	 <entry>16</entry>
	 <entry><link linkend="internal.e-core-error">E_CORE_ERROR</link></entry>
	</row>
	<row>
	 <entry>32</entry>
	 <entry><link linkend="internal.e-core-warning">E_CORE_WARNING</link></entry>
	</row>
       </tbody>
      </tgroup>
     </table>
   </refsect1>
  </refentry>
  <refentry id="function.getenv">
   <refnamediv>
    <refname>getenv</refname>
    <refpurpose>Get the value of an environment variable.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>string <function>getenv</function></funcdef>
     <paramdef>string <parameter>varname</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the value of the environment variable
     <parameter>varname</parameter>, or false on an error.
   </refsect1>
  </refentry>
  <refentry id="function.get-cfg-var">
   <refnamediv>
    <refname>get_cfg_var</refname>
    <refpurpose>Get the value of a PHP configuration option.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>string <function>get_cfg_var</function></funcdef>
     <paramdef>string <parameter>varname</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the current value of the PHP configuration variable
     specified by <parameter>varname</parameter>, or false if an error
     occurs.
   </refsect1>
  </refentry>
  <refentry id="function.get-current-user">
   <refnamediv>
    <refname>get_current_user</refname>
    <refpurpose>Get the name of the owner of the current PHP script.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>string <function>get_current_user</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <simpara>
     Returns the name of the owner of the current PHP script.
    <simpara>
     See also <function>getmyuid</function>,
     <function>getmypid</function>, <function>getmyinode</function>,
     and <function>getlastmod</function>.
   </refsect1>
  </refentry>
  <refentry id="function.getlastmod">
   <refnamediv>
    <refname>getlastmod</refname>
    <refpurpose>Get time of last page modification.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>getlastmod</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <para>
     Returns the time of the last modification of the current
     page. The value returned is a Unix timestamp, suitable for
     feeding to <function>date</function>. Returns
     false on error.
     <example>
      <title>getlastmod() example</title>
      <programlisting>
// outputs e.g. 'Last modified: March 04 1998 20:43:59.'
echo "Last modified: ".date( "F d Y H:i:s.", getlastmod() );
      </programlisting>
     </example>
    <para>
     See alse <function>date</function>,
     <function>getmyuid</function>,
     <function>get_current_user</function>,
     <function>getmyinode</function>, and
     <function>getmypid</function>.
   </refsect1>
  </refentry>
  <refentry id="function.getmyinode">
   <refnamediv>
    <refname>getmyinode</refname>
    <refpurpose>Get the inode of the current script.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>getmyinode</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <para>
     Returns the current script's inode, or false on error.
    <para>
     See also <function>getmyuid</function>,
     <function>get_current_user</function>,
     <function>getmypid</function>, and
     <function>getlastmod</function>.
   </refsect1>
  </refentry>
  <refentry id="function.getmypid">
   <refnamediv>
    <refname>getmypid</refname>
    <refpurpose>Get PHP's process ID.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>getmypid</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <para>
     Returns the current PHP process ID, or false on error.
    <para>
     Note that when running as a server module, separate invocations
     of the script are not guaranteed to have distinct pids.
    <para>
     See also <function>getmyuid</function>,
     <function>get_current_user</function>,
     <function>getmyinode</function>, and
     <function>getlastmod</function>.
   </refsect1>
  </refentry>
  <refentry id="function.getmyuid">
   <refnamediv>
    <refname>getmyuid</refname>
    <refpurpose>Get PHP script owner's UID.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>getmyuid</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <simpara>
     Returns the user ID of the current script, or false on error.
    <simpara>
     See also <function>getmypid</function>,
     <function>get_current_user</function>,
     <function>getmyinode</function>, and
     <function>getlastmod</function>.
   </refsect1>
  </refentry>
  <refentry id="function.phpinfo">
   <refnamediv>
    <refname>phpinfo</refname>
    <refpurpose>Output lots of PHP information.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>phpinfo</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <para>
     Outputs a large amount of information about the current state of
     PHP. This includes information about PHP compilation options and
     extensions, the PHP version, server information and environment
     (if compiled as a module), the PHP environment, OS version
     information, paths, master and local values of configuration
     options, HTTP headers, and the GNU Public License.
    <para>
     See also <function>phpversion</function>.
   </refsect1>
  </refentry>
  <refentry id="function.phpversion">
   <refnamediv>
    <refname>phpversion</refname>
    <refpurpose>Get the current PHP version.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>string <function>phpversion</function></funcdef>
     <paramdef>void</paramdef>
    </funcsynopsis>
    <para>
     Returns a string containing the version of the currently running
     PHP parser.
     <example>
      <title>phpversion() example</title>
      <programlisting>
// prints e.g. 'Current PHP version: 3.0rel-dev'
echo "Current PHP version: ".phpversion();
      </programlisting>
     </example>
    <para>
     See also <function>phpinfo</function>.
   </refsect1>
  </refentry>
  <refentry id="function.putenv">
   <refnamediv>
    <refname>putenv</refname>
    <refpurpose>Set the value of an environment variable.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>putenv</function></funcdef>
     <paramdef>string <parameter>setting</parameter></paramdef>
    </funcsynopsis>
    <para>
     Adds <parameter>setting</parameter> to the environment.
    <para>
     <example>
      <title>Setting an Environment Variable</title>
      <programlisting>
putenv("UNIQID=$uniqid");
      </programlisting>
     </example>
   </refsect1>
  </refentry>
  <refentry id="function.set-time-limit">
   <refnamediv>
    <refname>set_time_limit</refname>
    <refpurpose>limit the maximum execution time</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>set_time_limit</function></funcdef>
     <paramdef>int <parameter>seconds</parameter></paramdef>
    </funcsynopsis>
    <simpara>
     Set the number of seconds a script is allowed to run.  If this is
     reached, the script returns a fatal error.  The default limit is 30
     seconds or, if it exists, the max_execution_time value defined in
     php3.ini.  If seconds is set to zero, no time limit is imposed.
    <simpara>
     When called, <function>set_time_limit</function> restarts the timeout
     counter from zero. In other words, if the timeout is the default 30
     seconds, and 25 seconds into script execution a call such as
     set_time_limit( 20 ) is made, the script will run for a total of
     45 seconds before timing out.
   </refsect1>
  </refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
 |