Quantcast
Channel: SCN: Message List - SAP Advantage Database Server
Viewing all articles
Browse latest Browse all 997

ADS PHP 5.6 Driver, Linux Debian Jessie 8.1 - Error

$
0
0

Hello,

 

i believe, it exists a problem or PHP driver for ADS an current Debian and PHP 5.6.x

 

Here is my report (my english is bad, sorry):

 

 

i get an error while compile the PHP Driver for Advantage Database

 

These are my settings:

- Advantage PHP Driver Release 11.1 for Linux (11.10.0.22) from //devzone.advantagedatabase.com/

- Debian 8.1 Jessie

- PHP 5.6.9 (Source)

- our ADS Database Version 11.1

 

My commands:

$>./buildconf --force

 

$>./configure --prefix=/opt/php/5.6.9 --enable-mbstring --with-mysql --with-pdo-mysql --with-mysqli --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-libdir=lib64 --with-libxml-dir=/usr --enable-exif --enable-dba --with-gettext --enable-shmop --enable-sysvmsg --enable-wddx --enable-bcmath --enable-ftp --enable-intl --with-pspell --with-apxs2 --with-pdo_advantage --with-advantage=/usr/local/ads/php

 

$>make

 

/bin/bash /php-5.6.9/libtool --silent --preserve-dup-deps --mode=compile cc -I -Iext/pdo_advantage/ -I/php-5.6.9/ext/pdo_advantage/ -DPHP_ATOM_INC -I/php-5.6.9/include -I/php-5.6.9/main -I/php-5.6.9 -I/php-5.6.9/ext/date/lib -I/php-5.6.9/ext/ereg/regex -I/usr/include/libxml2 -I/usr/local/ads/php/include -I/php-5.6.9/ext/mbstring/oniguruma -I/php-5.6.9/ext/mbstring/libmbfl -I/php-5.6.9/ext/mbstring/libmbfl/mbfl -I/php-5.6.9/ext/sqlite3/libsqlite -I/usr/include/pspell -I/php-5.6.9/ext/zip/lib -I/php-5.6.9/TSRM -I/php-5.6.9/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /php-5.6.9/ext/pdo_advantage/pdo_advantage.c -o ext/pdo_advantage/pdo_advantage.lo

/php-5.6.9/ext/pdo_advantage/pdo_advantage.c:29:25: fatal error: pdo/php_pdo.h: Datei oder Verzeichnis nicht gefunden

#include "pdo/php_pdo.h"

                         ^

compilation terminated.

Makefile:1418: recipe for target 'ext/pdo_advantage/pdo_advantage.lo' failed

make: *** [ext/pdo_advantage/pdo_advantage.lo] Error 1

 

_______________________________________________________________________________________________________

 

I fix these problem in follow files:

/php-5.6.9/ext/pdo_advantage/pdo_advantage.c

/php-5.6.9/ext/pdo_advantage/advantage_driver.c

/php-5.6.9/ext/pdo_advantage/advantage_statement.c

 

i change these lines:

 

#include "pdo/php_pdo.h" -> #include "ext/pdo/php_pdo.h"

#include "pdo/php_pdo_driver.h" -> #include "ext/pdo/php_pdo_driver.h"

 

_______________________________________________________________________________________________________

 

Now again:

$>make             (without error)

$>make test

 

LOG:

=====================================================================

FAILED TEST SUMMARY

---------------------------------------------------------------------

DBA INIFILE handler test [ext/dba/tests/dba_inifile.phpt]

Capture SSL session meta array in stream context [ext/openssl/tests/session_meta_capture.phpt]

Basic bitwise stream crypto context flag assignment [ext/openssl/tests/stream_crypto_flags_001.phpt]

Server bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_003.phpt]

Specific crypto method for ssl:// transports. [ext/openssl/tests/streams_crypto_method.phpt]

SQLite3 open_basedir checks [ext/sqlite3/tests/sqlite3_21_security.phpt]

Test setlocale() function : usage variations - Setting all available locales in the platform [ext/standard/tests/strings/setlocale_variation2.phpt]

=====================================================================

 

 

=====================================================================

WARNED TEST SUMMARY

---------------------------------------------------------------------

zend multibyte (8) [ext/mbstring/tests/zend_multibyte-08.phpt] (warn: XFAIL section but test passes)

zend multibyte (10) [ext/mbstring/tests/zend_multibyte-10.phpt] (warn: XFAIL section but test passes)

zend multibyte (11) [ext/mbstring/tests/zend_multibyte-11.phpt] (warn: XFAIL section but test passes)

=====================================================================

 

 

$>make install

 

Installing PHP SAPI module:       apache2handler

/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp5.la /usr/lib/apache2/modules

/usr/share/apr-1.0/build/libtool --mode=install install libphp5.la /usr/lib/apache2/modules/

libtool: install: install .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so

libtool: install: install .libs/libphp5.lai /usr/lib/apache2/modules/libphp5.la

libtool: install: warning: remember to run `libtool --finish /php-5.6.9/libs'

chmod 644 /usr/lib/apache2/modules/libphp5.so

[preparing module `php5' in /etc/apache2/mods-available/php5.load]

Module php5 already enabled

Installing shared extensions:     /opt/php/5.6.9/lib/php/extensions/no-debug-non-zts-20131226/

Installing PHP CLI binary:        /opt/php/5.6.9/bin/

Installing PHP CLI man page:      /opt/php/5.6.9/php/man/man1/

Installing PHP CGI binary:        /opt/php/5.6.9/bin/

Installing PHP CGI man page:      /opt/php/5.6.9/php/man/man1/

Installing build environment:     /opt/php/5.6.9/lib/php/build/

Installing header files:          /opt/php/5.6.9/include/php/

Installing helper programs:       /opt/php/5.6.9/bin/

  program: phpize

  program: php-config

Installing man pages:             /opt/php/5.6.9/php/man/man1/

  page: phpize.1

  page: php-config.1

Installing PEAR environment:      /opt/php/5.6.9/lib/php/

[PEAR] Archive_Tar    - already installed: 1.3.12

[PEAR] Console_Getopt - already installed: 1.3.1

[PEAR] Structures_Graph- already installed: 1.0.4

[PEAR] XML_Util       - already installed: 1.2.3

[PEAR] PEAR           - already installed: 1.9.5

Wrote PEAR system config file at: /opt/php/5.6.9/etc/pear.conf

You may want to add: /opt/php/5.6.9/lib/php to your php.ini include_path

/php-5.6.9/build/shtool install -c ext/phar/phar.phar /opt/php/5.6.9/bin

ln -s -f /opt/php/5.6.9/bin/phar.phar /opt/php/5.6.9/bin/phar

Installing PDO headers:          /opt/php/5.6.9/include/php/ext/pdo/

 

_________________________________________________________________________________________________

 

Here is my test-script:

 

class DataAccessHelper {

 

 

    protected $configDnsRemote = 'advantage:Data Source=//xxx.xxx.xxx.xxx:2000/daten/software/db/db.add;ServerType=6;TrimTrailingSpaces=True';

    protected $configUserRemote = 'XXXXX';

    protected $configMagicRemote = 'XXXXX';

 

 

    protected $pdobRemote;

    private $error = false;

    public $dataOut = array();

 

 

    public function start(){

        try{

            $this->pdobRemote = new PDO($this->configDnsRemote,$this->configUserRemote, $this->configMagicRemote);

            $this->pdobRemote->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );

        } catch (PDOException $e){

            $this->error = true;

        }

        return $this->startStepOne();

    }

 

 

    private function startStepOne(){

        if($this->error){return false;}

        try{

            $getquery = $this->pdobRemote->query("SELECT * FROM datatable");

            $getquery->setFetchMode(PDO::FETCH_ASSOC);

            $result = $getquery->fetchAll();

        } catch (PDOException $e){

            return false;

        }

        $this->dataOut = $result;

        return true;

    }

}//class

 

 

$helper = new DataAccessHelper();

if ($helper->start()){

        print_r($helper->dataOut);

}

 

i run the script:

 

$> /opt/php/5.6.9/bin/php db-test.php56

 

i get the error:

 

"Segmentation Faults"   or in german "Speicherzugriffsfehler"

____________________________________________________________________________________________________

 

an error-stack created with strace as attachment.

 

 

THX for Help

____________________________________________________________________________________________________

 

We need an current Driver for ADS on Debian Jessie and PHP 5.6.x

 

best regards


Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>