Installing the chilkat.php File for All Apps

If you’re using the pure-PHP “chilkat.php” stub (which just declares the Chilkat classes and forwards calls into the native extension), you can drop that one PHP file into any directory that’s on PHP’s include_path, and then every script on that server can do:

require_once "chilkat.php";

without having to copy it into each project.

How to set it up

  1. Choose a shared folder

    Pick something like

    /usr/share/php/Chilkat/         (on Linux)
    C:\php\share\chilkat\            (on Windows)
  2. Move the stub file there
    mv chilkat.php /usr/share/php/Chilkat/chilkat.php
  3. Add that folder to your include_path

    In your php.ini (or via .htaccess / ini_set) set:

    include_path = ".:/usr/share/php:/usr/share/php/Chilkat"

    or on Windows:

    include_path = ".;C:\php\share\chilkat"
  4. Use it from any script
    <?php
    require_once "chilkat.php";
    
    // …
    ?>

Chilkat Articles