Giter VIP home page Giter VIP logo

Comments (5)

banibanc avatar banibanc commented on July 29, 2024

I found the error and it wasn't related to your package.

It works great, thanks !

from laravel-db2.

sylwn avatar sylwn commented on July 29, 2024

Hello @banibanc,

I have a similar issue. I am unable to use the constants PDO::I5_ATTR_DBC_SYS_NAMING and PDO::I5_ATTR_DBC_LIBL when using pdo_ibm.

I am getting the following error:

Fatal error: Uncaught Error: Undefined class constant 'I5_ATTR_DBC_SYS_NAMING' in /www/xxx/xxx/xxx.php:30 Stack trace: #0 {main} thrown in /www/xxx/xxx/xxx.php on line 30

My set up is a docker container with Debian 9 and php7.1. The pdo_ibm.so version 1.3.4 (also tried 1.3.6) is properly installed and enabled with php.
My code look like the following:

$db = new PDO("ibm:*LOCAL", $user, $password, array(
PDO::ATTR_PERSISTENT => true,
PDO::ATTR_AUTOCOMMIT => true,
PDO::I5_ATTR_DBC_SYS_NAMING => true,
PDO::I5_ATTR_DBC_LIBL => "SHZDEV",
));

How did you get the contants to work with your linux?

from laravel-db2.

banibanc avatar banibanc commented on July 29, 2024

The constants weren't the issue here. I think the problem was that the ip from my linux server wasn't whitelisted in the db2 server. Once it was I didn't have the error anymore.

from laravel-db2.

sylwn avatar sylwn commented on July 29, 2024

@banibanc
Ok but you said in your very first message that you had this issue and I quote:
"
I had a first problem with these PDO constants in the options :

PDO::I5_ATTR_DBC_SYS_NAMING => false,
PDO::I5_ATTR_COMMIT => PDO::I5_TXN_NO_COMMIT,
PDO::I5_ATTR_JOB_SORT => false,
PDO::I5_ATTR_DBC_LIBL => '',
PDO::I5_ATTR_DBC_CURLIB => '',

Undefined class constant 'I5_ATTR_DBC_SYS_NAMING'
"

How did you fix that problem?

from laravel-db2.

banibanc avatar banibanc commented on July 29, 2024

Commented them

from laravel-db2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.