Programming Languages / Environments > PHP

PHP Errors after apt-get install

(1/1)

Chilkat:
Installing the Chilkat PHP extension via apt-get seemed to work fine.  However, when I try to use Chilkat in a PHP script, I get the following error:

--- Code: ---PHP Warning:  include(chilkat_9_5_0.php): failed to open stream: No such file or directory in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php on line 3
PHP Warning:  include(): Failed opening 'chilkat_9_5_0.php' for inclusion (include_path='.:/usr/share/php') in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php on line 3
PHP Fatal error:  Uncaught Error: Class 'CkCrypt2' not found in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php:5
Stack trace:
#0 {main}
  thrown in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php on line 5

--- End code ---

Chilkat:
This problem is caused because the "chilkat_9_5_0.php" file was installed to a PHP version specific directory.  For example, in the case above, it was installed to /usr/share/php/20160303

The error message (above) shows the include path where PHP was looking:  (include_path='.:/usr/share/php')

The solution is to copy the chilkat_9_5_0.php from where it was installed to /usr/share/php.   To find out where Chilkat installed the chilkat_9_5_0.php, run the following PHP script:

--- Code: ---<?php

$extPath = ini_get("extension_dir");

print $extPath . "\n";


?>

--- End code ---

 

Navigation

[0] Message Index

Go to full version