Author Topic: PHP Errors after apt-get install  (Read 4121 times)

Chilkat

  • Administrator
  • Full Member
  • *****
  • Posts: 101
  • Karma: +6/-0
    • View Profile
PHP Errors after apt-get install
« on: December 02, 2017, 10:23:35 AM »
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: [Select]
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
« Last Edit: December 02, 2017, 10:36:49 AM by Chilkat »

Chilkat

  • Administrator
  • Full Member
  • *****
  • Posts: 101
  • Karma: +6/-0
    • View Profile
Re: PHP Errors after apt-get install
« Reply #1 on: December 02, 2017, 10:30:28 AM »
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: [Select]
<?php

$extPath 
ini_get("extension_dir");

print 
$extPath "\n";


?>


 
« Last Edit: December 02, 2017, 10:36:03 AM by Chilkat »