Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Install as per Documentation #8

Open
andrewvillano opened this issue May 16, 2023 · 16 comments
Open

Unable to Install as per Documentation #8

andrewvillano opened this issue May 16, 2023 · 16 comments

Comments

@andrewvillano
Copy link

Followed documentation here: https://blog.rabin.io/sysadmin/laravel-lumen-informix

Still getting error message as follows:

$ composer require isoc-il/laravel-ifx:dev-master
./composer.json has been updated
Running composer update isoc-il/laravel-ifx
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires isoc-il/laravel-ifx dev-master -> satisfiable by isoc-il/laravel-ifx[dev-master].
- isoc-il/laravel-ifx dev-master requires illuminate/support 5.|6.|7.|8.|9.x -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.7] but these were not loaded, likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

@rabin-io
Copy link

rabin-io commented May 16, 2023

Probably become you are trying it with Laravel 10,
I pushed an update to master branch, give it another try.

🚨🚨🚨
Please note, that we have not tested it with Laravel 10, do I don't know if it works, I just allowed composer to be able to resolve the dependency.

@andrewvillano
Copy link
Author

I was able to get past that, however I ran into a different issue:

[andrew@villano-vm chirper]$ php artisan migrate

   INFO  Running migrations.  

  2014_10_12_000000_create_users_table .................................................................................................... 3ms FAIL

   ErrorException 

  Undefined array key "driver"

  at vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:148
    144? 
    145?         // Next we will check to see if an extension has been registered for a driver
    146?         // and will call the Closure if so, which allows us to have a more generic
    147?         // resolver for the drivers themselves which applies to all connections.
  ? 148?         if (isset($this->extensions[$driver = $config['driver']])) {
    149?             return call_user_func($this->extensions[$driver], $config, $name);
    150?         }
    151? 
    152?         return $this->factory->make($config, $name);

      +12 vendor frames 

  13  database/migrations/2014_10_12_000000_create_users_table.php:14
      Illuminate\Support\Facades\Facade::__callStatic("create")
      +24 vendor frames 

  38  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))


@andrewvillano
Copy link
Author

Just to clarify, I have PDO_INFORMIX installed.

[root@villano-vm chirper]# php -m | grep -i pdo
PDO
pdo_informix
PDO_ODBC
pdo_sqlite
[root@villano-vm chirper]#

@rabin-io
Copy link

Not sure, but you might be missing the db config file, copy the file manually to the right place, and see if it helps.

https://github.com/isoc-il/laravel-ifx/blob/master/src/config/informix.php

@andrewvillano
Copy link
Author

vendor:publish resulted in informix.php sitting under config/. I also copied the informix [connection] to database.php.

Here is the stacktrace if it helps from logs:

[2023-05-23 13:24:52] local.ERROR: Undefined array key "driver" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"driver\" at /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:148)
[stacktrace]
#0 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(254): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'Undefined array...', '/home/andrew/de...', 148)
#1 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(148): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(2, 'Undefined array...', '/home/andrew/de...', 148)
#2 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(101): Illuminate\\Database\\DatabaseManager->makeConnection(NULL)
#3 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php(74): Illuminate\\Database\\DatabaseManager->connection()
#4 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/Container.php(910): Illuminate\\Database\\DatabaseServiceProvider->Illuminate\\Database\\{closure}(Object(Illuminate\\Foundation\\Application), Array)
#5 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\\Container\\Container->build(Object(Closure))
#6 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(933): Illuminate\\Container\\Container->resolve('db.schema', Array, true)
#7 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\\Foundation\\Application->resolve('db.schema', Array)
#8 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(918): Illuminate\\Container\\Container->make('db.schema', Array)
#9 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/Container.php(1456): Illuminate\\Foundation\\Application->make('db.schema')
#10 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(239): Illuminate\\Container\\Container->offsetGet('db.schema')
#11 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(207): Illuminate\\Support\\Facades\\Facade::resolveFacadeInstance('db.schema')
#12 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(347): Illuminate\\Support\\Facades\\Facade::getFacadeRoot()
#13 /home/andrew/development/php/chirper/database/migrations/2014_10_12_000000_create_users_table.php(14): Illuminate\\Support\\Facades\\Facade::__callStatic('create', Array)
#14 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(493): Illuminate\\Database\\Migrations\\Migration@anonymous->up()
#15 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(410): Illuminate\\Database\\Migrations\\Migrator->runMethod(Object(Poyii\\Informix\\IfxConnection), Object(Illuminate\\Database\\Migrations\\Migration@anonymous), 'up')
#16 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(419): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}()
#17 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\\Database\\Migrations\\Migrator->runMigration(Object(Illuminate\\Database\\Migrations\\Migration@anonymous), 'up')
#18 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}()
#19 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(756): Illuminate\\Console\\View\\Components\\Task->render('2014_10_12_0000...', Object(Closure))
#20 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\\Database\\Migrations\\Migrator->write('Illuminate\\\\Cons...', '2014_10_12_0000...', Object(Closure))
#21 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(181): Illuminate\\Database\\Migrations\\Migrator->runUp('/home/andrew/de...', 1, false)
#22 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(124): Illuminate\\Database\\Migrations\\Migrator->runPending(Array, Array)
#23 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(88): Illuminate\\Database\\Migrations\\Migrator->run(Array, Array)
#24 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#25 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(81): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure))
#26 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle()
#27 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#28 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#29 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#30 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#31 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Console/Command.php(208): Illuminate\\Container\\Container->call(Array)
#32 /home/andrew/development/php/chirper/vendor/symfony/console/Command/Command.php(312): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#33 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Console/Command.php(177): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#34 /home/andrew/development/php/chirper/vendor/symfony/console/Application.php(1040): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#35 /home/andrew/development/php/chirper/vendor/symfony/console/Application.php(314): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#36 /home/andrew/development/php/chirper/vendor/symfony/console/Application.php(168): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#37 /home/andrew/development/php/chirper/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(200): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#38 /home/andrew/development/php/chirper/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#39 {main}
"} 

@rabin-io
Copy link

I'm sorry, I don't have access to any setup which I can test this, so unless you can provide me with one, I don't have any other way to help you.

@andrewvillano
Copy link
Author

I believe IBM has a docker container for informix. Would this help? https://hub.docker.com/r/ibmcom/informix-developer-database/

@rabin-io
Copy link

Yes, but I still will be missing other requirements, like the informix PDO which need to be compiled against the right PHP version.

@andrewvillano
Copy link
Author

I'm using Php 8.2.6
[andrew@villano-vm ~]$ php -v
PHP 8.2.6 (cli) (built: May 9 2023 06:25:31) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.6, Copyright (c) Zend Technologies
with Zend OPcache v8.2.6, Copyright (c), by Zend Technologies

As far as PDO_Informix:

PDO

PDO support => enabled
PDO drivers => informix, odbc, sqlite

pdo_informix

pdo_informix support => enabled
Module release => 1.3.6

PDO_ODBC

PDO Driver for ODBC (unixODBC) => enabled
ODBC Connection Pooling => Enabled, strict matching

@rabin-io
Copy link

And what do you have in your .env file?

@andrewvillano
Copy link
Author

andrewvillano commented May 25, 2023

DB_CONNECTION=informix
DB_HOST=<hostname>
DB_SERVICE=9001
DB_DATABASE=reports_db
DB_USERNAME=db_user
DB_PASSWORD=<redacted>
DB_SERVER=ifx_instance_name

@rabin-io
Copy link

I was able to replicate your issue, but I still not sure how to solve it.
Sorry, this can take some time, as I don't have much time to invest into it.

@vlcya
Copy link

vlcya commented Nov 11, 2023

hi,

any luck figuring out the problem?

thank you!

@rabin-io
Copy link

Unfortunately no, I don't have time to debug this problem right now.

You are welcome to try, try with version 6/7 which I know for sure it worked.
once you have a working setup, try to replicate it with 8+

@wmfairuz
Copy link

Hi,

How do I get pdo_informix installed? Trying to download the Client SDK but run into some errors.

@rabin-io
Copy link

rabin-io commented Jan 23, 2025

We used to compile it from source, and later on to package it as RPM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants