login about faq

I am getting grey hairs trying to use the chilkat.so php extension. It must be an error on my end, but I just can't find what I am doing wrong here.

I did extract ALL (I know dont need all there) files from chilkat-9.5.0-php-5.5-x86-linux.tar an placed them into my "/web/chil" folder, which I can access via http.

showExtDir.php shows this: /usr/local/apache/modules So I placed the chilkat_9_5_0.so in there via SFTP-Access.

I did look into the phpinfo.php and got the following results for my QNAP-NAS Device:

> PHP Version 5.5.31 Build Date  Mar 11
> 2016 04:33:33   Configure Command 
> './configure' '--disable-debug'
> '--prefix=/root/daily_build/4.2.0/Model/TS-459/../../NasMgmt/HTTP/php5'
> '--with-config-file-path=/etc/config/php.ini' '--with-config-file-scan-dir=/etc/config/php.d'
> '--enable-ftp=shared'
> '--enable-sockets=shared'
> '--with-gettext=shared'
> '--with-zlib=shared'
> '--with-jpeg-dir='
> '--with-png-dir=/opt/cross-project/x86/sys-root/usr'
> '--with-gd=shared'
> '--with-freetype-dir=/opt/cross-project/x86/sys-root/usr'
> '--enable-gd-native-ttf=shared'
> '--enable-mbstring=shared'
> '--with-openssl=shared,/opt/cross-project/x86/sys-root/usr'
> '--with-libxml-dir=/opt/cross-project/x86/sys-root/usr'
> '--enable-libxml=shared,/opt/cross-project/x86/sys-root/usr'
> '--enable-sqlite-utf8=shared'
> '--with-mysql=shared,mysqlnd'
> '--with-mcrypt=shared,/opt/cross-project/x86/sys-root/usr'
> '--enable-zend-multibyte=shared'
> '--with-iconv=shared,/opt/cross-project/x86/sys-root/usr'
> '--enable-exif=shared'
> '--with-pdo-mysql=shared,mysqlnd'
> '--enable-pdo=shared'
> '--with-pdo-sqlite=shared,/opt/cross-project/x86/sys-root/usr'
> '--with-sqlite=shared'
> '--with-curl=shared,/root/daily_build/4.2.0/Model/TS-459/../../SysUtil/curl-7.43.0'
> '--with-curlwrappers=shared,/root/daily_build/4.2.0/Model/TS-459/../../SysUtil/curl-7.43.0'
> '--with-xsl=shared,/opt/cross-project/x86/sys-root/usr'
> '--with-mysqli=shared,mysqlnd'
> '--enable-calendar=shared'
> '--enable-bcmath=shared'
> '--with-ldap=shared,/opt/cross-project/x86/sys-root/usr'
> '--with-imap=shared,/opt/cross-project/x86/sys-root/usr'
> '--with-imap-ssl=/opt/cross-project/x86/sys-root/usr'
> '--enable-dba=shared'
> '--enable-dbase=shared'
> '--enable-shmop=shared'
> '--enable-wddx=shared'
> '--enable-zip=shared'
> '--with-xmlrpc=shared'
> '--enable-soap=shared'
> '--with-mssql=shared,/root/daily_build/4.2.0/Model/TS-459/../../NasMgmt/HTTP/php_modules/php_mod_install/i386'
> '--enable-pcntl=shared'
> '--enable-mysqlnd=shared'
> '--enable-session=shared'
> '--with-sqlite3=shared' '--enable-fpm'
> '--with-fpm-user=httpdusr'
> '--with-fpm-group=administrators'  
> Server API  FPM/FastCGI   Virtual
> Directory Support  disabled  
> Configuration File (php.ini) Path 
> /etc/config/php.ini   Loaded
> Configuration File 
> /mnt/HDA_ROOT/.config/php.

That is why I did add under "/mnt/HDA_ROOT/.config/php.ini" the following in the [PHP]-Section:

[PHP]

extension = chilkat_9_5_0.so
extension_dir = /usr/local/apache/modules

Accessing the standard file "test.php" I only get HTTP 500 error via IE and an empty page via Firefox. I am able to place a echo "Hello" BEFORE $crypt = new CkCrypt2() and It show sup on screen. But nothing AFTER this call. I am asking for your help :( I got 2 different Accounts with Serials (one with still 1 year support!) here.

<?php

include("chilkat_9_5_0.php");

echo "hello";

$crypt = new CkCrypt2();

asked May 24 at 09:45

RootTag's gravatar image

RootTag
35121623

edited May 24 at 09:49


If you set enable_dl = on, then my guess is that the "... dl() is deprecated ..." error is just a warning. If it wasn't a warning, I would guess PHP wouldn't try to load the chilkat_9_5_0.so. However, we can see it is trying to load it, but does not find it at the directory "/share/MD0_DATA/Web/chil/chilkat_9_5_0.php". So the question is: Does "chilkat_9_5_0.php" not exist in the directory "/share/MD0_DATA/Web/chil"? If not, then put it there, and make sure the permissions on the .so are such that it can be opened and used by the loader..

link

answered May 24 at 11:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

I Googled "QNAP-NAS Device PHP extension" and found this page:

http://forum.qnap.com/viewtopic.php?t=5621

Two things jump out at me...

  1. Look at the apache_error_log to see what it says. (Go to the web page at the above URL to see the discussion.) Does the error log indicate "cannot open shared object file: No such file or direc..", or does it say "PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'chilkat_9_5_0.so' in Unknown on line 0"?
  2. If the QNAP-NAS Device is an ARM-based device, then you would need the Chilkat PHP Extension for ARM Linux: https://www.chilkatsoft.com/php.asp#armLinuxDownloads (Maybe you were using the PHP Extension for x86 Linux?)
link

answered May 24 at 10:04

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Also... if you have SSH shell access to the QNAP-NAS device, then see if you can run a simple PHP script that instantiates the CkCrypt object. In other words, eliminate Apache from the equation and see if you can first get something simpler to work. If you experience problems in the simpler case, then you can solve it first, and then move to the environment where the Apache web server is running the PHP..

link

answered May 24 at 10:06

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

I am 1 step further now. Getting this error opening test.php

Deprecated: dl(): dl() is deprecated - use extension=chilkat_9_5_0.so in your php.ini in /share/MD0_DATA/Web/chil/chilkat_9_5_0.php on line 22

Warning: dl(): Unable to load dynamic library '/usr/local/apache/modules/chilkat_9_5_0.so' - /usr/local/apache/modules/chilkat_9_5_0.so: cannot open shared object file: No such file or directory in /share/MD0_DATA/Web/chil/chilkat_9_5_0.php on line 22 hello Fatal error: Call to undefined function new_ckcrypt2() in /share/MD0_DATA/Web/chil/chilkat_9_5_0.php on line 4419

(May 24 at 10:49) RootTag

I did add enable_dl = on and did try with safe_mode = on (and off).

(May 24 at 10:57) RootTag

Awesome help! It works. Thank you very much. I am sure this question & answer is going to help a lot of people getting it to work!

link

answered May 25 at 03:27

RootTag's gravatar image

RootTag
35121623

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×35
×17
×7

Asked: May 24 at 09:45

Seen: 387 times

Last updated: May 25 at 03:27

powered by OSQA