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

[Bug]: Extension crashes with Undefined constant PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER #174

Open
DanielMalmgren opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels

Comments

@DanielMalmgren
Copy link

Extension Version

0.1.16

PHP Binary

Local PHP

Operating System

Windows

What happened?

When loading this particular Laravel project the extension crashes with the following:

Fatal error: Uncaught Error: Undefined constant PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER in C:\homestead\Code\faktura\config\database.php:61
Stack trace:
#0 C:\homestead\Code\faktura\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php(96): require()
#1 C:\homestead\Code\faktura\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php(96): Illuminate\Foundation\Bootstrap\LoadConfiguration->{closure:Illuminate\Foundation\Bootstrap\LoadConfiguration::loadConfigurationFile():96}()
#2 C:\homestead\Code\faktura\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php(77): Illuminate\Foundation\Bootstrap\LoadConfiguration->loadConfigurationFile(Object(Illuminate\Config\Repository), 'database', 'C:\\homestead\\Co...', Array)
#3 C:\homestead\Code\faktura\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\LoadConfiguration.php(38): Illuminate\Foundation\Bootstrap\LoadConfiguration->loadConfigurationFiles(Object(Illuminate\Foundation\Application), Object(Illuminate\Config\Repository))
#4 C:\homestead\Code\faktura\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(316): Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap(Object(Illuminate\Foundation\Application))
#5 C:\homestead\Code\faktura\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(473): Illuminate\Foundation\Application->bootstrapWith(Array)
#6 C:\homestead\Code\faktura\vendor\_laravel_ide\discover-429f9ff5c7861376486e71f5f734f335.php(32): Illuminate\Foundation\Console\Kernel->bootstrap()
#7 {main}
  thrown in C:\homestead\Code\faktura\config\database.php on line 61

This repeats a number of times.

Mimimal Code Sample

The site uses a Microsoft SQL database. Pasting from config/database.php:

    'connections' => [
        'sqlsrv' => [
            'driver' => 'sqlsrv',
            'url' => env('DATABASE_URL_TD'),
            'host' => env('DB_HOST_TD', 'localhost'),
            'port' => env('DB_PORT_TD', '1433'),
            'database' => env('DB_DATABASE_TD', 'forge'),
            'username' => env('DB_USERNAME_TD', 'forge'),
            'password' => env('DB_PASSWORD_TD', ''),
            'charset' => 'utf8',
            'options' => [
                PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER => true,
            ],
            'prefix' => '',
            'prefix_indexes' => true,
        ],

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

No branches or pull requests

2 participants