Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 7577

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Runtime Configuration</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ifx.installation.html">Installation</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ifx.resources.html">Resource Types</a></div>
 <div class="up"><a href="ifx.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="ifx.configuration" class="section">
 <h2 class="title">Runtime Configuration</h2>
 <p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <p class="para">
   Make sure that the Informix environment variables INFORMIXDIR and
   INFORMIXSERVER are available to the PHP ifx driver, and that the
   INFORMIX bin directory is in the PATH. Check this by running a
   script that contains a call to  <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span>
   before you start testing. The  <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span>
   output should list these environment variables. This is true for
   both CGI php and Apache mod_php. You may have to set these
   environment variables in your Apache startup script.
  </p>
  <p class="para">
   The Informix shared libraries should also be available to the
   loader (check LD_LIBRARY_PATH or ld.so.conf/ldconfig).
  </p>
 </p></blockquote>
 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <strong>
   Some notes on the use of BLOBs (TEXT and BYTE columns)
  </strong><br />
  <p class="para">
   BLOBs are normally addressed by BLOB identifiers.  Select queries
   return a &quot;blob id&quot; for every BYTE and TEXT column.  You can get
   at the contents with &quot;string_var = ifx_get_blob($blob_id);&quot; if
   you choose to get the BLOBs in memory (with:
   &quot;ifx_blobinfile(0);&quot;).  If you prefer to receive the content of
   BLOB columns in a file, use &quot;ifx_blobinfile(1);&quot;, and
   &quot;ifx_get_blob($blob_id);&quot; will get you the filename.  Use normal
   file I/O to get at the blob contents.
  </p>
  <p class="para">
   For insert/update queries you must create these &quot;blob id&#039;s&quot;
   yourself with &quot; <span class="function"><a href="function.ifx-create-blob.html" class="function">ifx_create_blob()</a></span>;&quot;. You then
   plug the blob id&#039;s into an array, and replace the blob columns
   with a question mark (?) in the query string.  For
   updates/inserts, you are responsible for setting the blob
   contents with  <span class="function"><a href="function.ifx-update-blob.html" class="function">ifx_update_blob()</a></span>.
  </p>
  <p class="para">
   The behaviour of BLOB columns can be altered by configuration
   variables that also can be set at runtime:
  </p>
  <p class="para">
   configuration variable: ifx.textasvarchar
  </p>
  <p class="para">
   configuration variable: ifx.byteasvarchar
  </p>
  <p class="para">
   runtime functions:
  </p>
  <p class="para">
   ifx_textasvarchar(0): use blob id&#039;s for select queries with TEXT
   columns
  </p>
  <p class="para">
   ifx_byteasvarchar(0): use blob id&#039;s for select queries with BYTE
   columns
  </p>
  <p class="para">
   ifx_textasvarchar(1): return TEXT columns as if they were
   VARCHAR columns, so that you don&#039;t need to use blob id&#039;s for
   select queries.
  </p>
  <p class="para">
   ifx_byteasvarchar(1): return BYTE columns as if they were
   VARCHAR columns, so that you don&#039;t need to use blob id&#039;s for
   select queries.
  </p>
  <p class="para">
   configuration variable: ifx.blobinfile
  </p>
  <p class="para">
   runtime function:
  </p>
  <p class="para">
   ifx_blobinfile_mode(0): return BYTE columns in memory, the blob
   id lets you get at the contents.
  </p>
  <p class="para">
   ifx_blobinfile_mode(1): return BYTE columns in a file, the blob
   id lets you get at the file name.
  </p>
  <p class="para">
   If you set ifx_text/byteasvarchar to 1, you can use TEXT and BYTE
   columns in select queries just like normal (but rather long)
   VARCHAR fields.  Since all strings are &quot;counted&quot; in PHP, this
   remains &quot;binary safe&quot;.  It is up to you to handle this
   correctly. The returned data can contain anything, you are
   responsible for the contents.
  </p>
  <p class="para">
   If you set ifx_blobinfile to 1, use the file name returned by
   ifx_get_blob(..) to get at the blob contents.  Note that in this
   case YOU ARE RESPONSIBLE FOR DELETING THE TEMPORARY FILES CREATED
   BY INFORMIX when fetching the row.  Every new row fetched will
   create new temporary files for every BYTE column.
  </p>
  <p class="para">
   The location of the temporary files can be influenced by the
   environment variable &quot;blobdir&quot;, default is &quot;.&quot; (the current
   directory).  Something like: putenv(blobdir=tmpblob&quot;); will ease
   the cleaning up of temp files accidentally left behind (their
   names all start with &quot;blb&quot;).
  </p>
 </p></blockquote>
 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <strong>Automatically trimming &quot;char&quot; (SQLCHAR and SQLNCHAR) data</strong><br />
  <p class="para">
   This can be set with the configuration variable
  </p>
  <p class="para">
   ifx.charasvarchar: if set to 1 trailing spaces will be
   automatically trimmed, to save you some &quot;chopping&quot;.
  </p>
 </p></blockquote>
 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <strong><strong><code>NULL</code></strong> values</strong><br />
  <p class="para">
   The configuration variable ifx.nullformat (and the runtime
   function  <span class="function"><a href="function.ifx-nullformat.html" class="function">ifx_nullformat()</a></span>) when set to <strong><code>TRUE</code></strong>
   will return <strong><code>NULL</code></strong> columns as the string &quot;<strong><code>NULL</code></strong>&quot;, when set to <strong><code>FALSE</code></strong>
   they return the empty string. This allows you to discriminate
   between <strong><code>NULL</code></strong> columns and empty columns.
  </p>
 </p></blockquote>

 <p class="para">
 <table class="doctable table">
  <caption><strong>Informix configuration options</strong></caption>
  
   <thead>
    <tr>
     <th>Name</th>
     <th>Default</th>
     <th>Changeable</th>
     <th>Changelog</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.allow-persistent" class="link">ifx.allow_persistent</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_SYSTEM</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.max-persistent" class="link">ifx.max_persistent</a></td>
     <td>&quot;-1&quot;</td>
     <td>PHP_INI_SYSTEM</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.max-links" class="link">ifx.max_links</a></td>
     <td>&quot;-1&quot;</td>
     <td>PHP_INI_SYSTEM</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.default-host" class="link">ifx.default_host</a></td>
     <td>NULL</td>
     <td>PHP_INI_SYSTEM</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.default-user" class="link">ifx.default_user</a></td>
     <td>NULL</td>
     <td>PHP_INI_SYSTEM</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.default-password" class="link">ifx.default_password</a></td>
     <td>NULL</td>
     <td>PHP_INI_SYSTEM</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.blobinfile" class="link">ifx.blobinfile</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.textasvarchar" class="link">ifx.textasvarchar</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.byteasvarchar" class="link">ifx.byteasvarchar</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.charasvarchar" class="link">ifx.charasvarchar</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

    <tr>
     <td><a href="ifx.configuration.html#ini.ifx.nullformat" class="link">ifx.nullformat</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Removed in PHP 5.2.1.</td>
    </tr>

   </tbody>
  
 </table>

 For further details and definitions of the
PHP_INI_* modes, see the <a href="configuration.changes.modes.html" class="xref">Where a configuration setting may be set</a>.
 </p>
 
 <p class="para">Here&#039;s a short explanation of
the configuration directives.</p>
 
 <p class="para">
 <dl>

  <dt id="ini.ifx.allow-persistent">
   <span class="term">
    <em><code class="parameter">ifx.allow_persistent</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <p class="para">
     Whether to allow persistent Informix connections.
    </p>
   </dd>

  </dt>

  
  <dt id="ini.ifx.max-persistent">
   <span class="term">
    <em><code class="parameter">ifx.max_persistent</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <p class="para">
     The maximum number of persistent Informix connections per
     process.
    </p>
   </dd>

  </dt>

  
  <dt id="ini.ifx.max-links">
   <span class="term">
    <em><code class="parameter">ifx.max_links</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <p class="para">
     The maximum number of Informix connections per process, including
     persistent connections.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.default-host">
   <span class="term">
    <em><code class="parameter">ifx.default_host</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <p class="para">
     The default host to connect to when no host is specified
     in  <span class="function"><a href="function.ifx-connect.html" class="function">ifx_connect()</a></span> or 
      <span class="function"><a href="function.ifx-pconnect.html" class="function">ifx_pconnect()</a></span>. Doesn&#039;t apply in
     <a href="ini.sect.safe-mode.html#ini.safe-mode" class="link">safe mode</a>.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.default-user">
   <span class="term">
    <em><code class="parameter">ifx.default_user</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <p class="para">
     The default user id to use when none is specified 
     in  <span class="function"><a href="function.ifx-connect.html" class="function">ifx_connect()</a></span> or 
      <span class="function"><a href="function.ifx-pconnect.html" class="function">ifx_pconnect()</a></span>. Doesn&#039;t apply in
     <a href="ini.sect.safe-mode.html#ini.safe-mode" class="link">safe mode</a>.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.default-password">
   <span class="term">
    <em><code class="parameter">ifx.default_password</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <p class="para">
     The default password to use when none is specified 
     in  <span class="function"><a href="function.ifx-connect.html" class="function">ifx_connect()</a></span> or 
      <span class="function"><a href="function.ifx-pconnect.html" class="function">ifx_pconnect()</a></span>. Doesn&#039;t apply in
     <a href="ini.sect.safe-mode.html#ini.safe-mode" class="link">safe mode</a>.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.blobinfile">
   <span class="term">
    <em><code class="parameter">ifx.blobinfile</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <p class="para">
     Set to <strong><code>TRUE</code></strong> if you want to return blob columns
     in a file, <strong><code>FALSE</code></strong> if you want them in memory. You can
     override the setting at runtime 
     with  <span class="function"><a href="function.ifx-blobinfile-mode.html" class="function">ifx_blobinfile_mode()</a></span>.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.textasvarchar">
   <span class="term">
    <em><code class="parameter">ifx.textasvarchar</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <p class="para">
     Set to <strong><code>TRUE</code></strong> if you want to return TEXT columns
     as normal strings in select statements,
     <strong><code>FALSE</code></strong> if you want to use blob id parameters. You can
     override the setting at runtime with 
     <span class="function"><a href="function.ifx-textasvarchar.html" class="function">ifx_textasvarchar()</a></span>.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.byteasvarchar">
   <span class="term">
    <em><code class="parameter">ifx.byteasvarchar</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <p class="para">
     Set to <strong><code>TRUE</code></strong> if you want to return BYTE columns
     as normal strings in select queries, 
     <strong><code>FALSE</code></strong> if you want to use blob id parameters. You can
     override the setting at runtime with 
      <span class="function"><a href="function.ifx-textasvarchar.html" class="function">ifx_textasvarchar()</a></span>.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.charasvarchar">
   <span class="term">
    <em><code class="parameter">ifx.charasvarchar</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <p class="para">
     Set to <strong><code>TRUE</code></strong> if you want to trim trailing spaces
     from CHAR columns when fetching them.
    </p>
   </dd>

  </dt>

   <dt id="ini.ifx.nullformat">
   <span class="term">
    <em><code class="parameter">ifx.nullformat</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <p class="para">
     Set to <strong><code>TRUE</code></strong> if you want to return <strong><code>NULL</code></strong> columns
     as the literal string &quot;<strong><code>NULL</code></strong>&quot;, <strong><code>FALSE</code></strong> if you want
     them returned as the empty string &quot;&quot;. You can
     override this setting at runtime with 
      <span class="function"><a href="function.ifx-nullformat.html" class="function">ifx_nullformat()</a></span>.
    </p>
   </dd>

  </dt>

 </dl>

 </p>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ifx.installation.html">Installation</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ifx.resources.html">Resource Types</a></div>
 <div class="up"><a href="ifx.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>