antonioribeiro / antonioribeiro/tracker

Issue “Module 'PDO' already loaded”

Open
#534 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
2.9k
Forks
594
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
When I run composer dump-auto it gives me an error:

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0

   ErrorException 

  session_start(): open(/opt/alt/php73/var/lib/php/session/sess_f0a04202322b17dfa4ad5af9cf1146e2, O_RDWR) failed: Read-only file system (30)

  at vendor/pragmarx/support/src/PhpSession.php:23
     19▕ 	private function startSession()
     20▕ 	{
     21▕ 		if ( ! $this->isStarted())
     22▕ 		{
  ➜  23▕ 			session_start();
     24▕ 		}
     25▕ 	}
     26▕ 
     27▕ 	private function isStarted()

      +36 vendor frames 
  37  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(TCG\Voyager\VoyagerServiceProvider))

      +5 vendor frames 
  43  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

   Whoops\Exception\ErrorException 

  Module 'PDO' already loaded

  at Unknown:0
      1▕ 

      +1 vendor frames 
  2   [internal]:0
      Whoops\Run::handleShutdown()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

To Reproduce
Steps to reproduce the behavior:

  1. Install a Laravel site;
  2. Add pagkage tcg/voyager;
  3. Add package pragmarx/tracker;
  4. Add database connection tracker and run migrations;
  5. Enable tracking via config/tracker.php file;
  6. Run in terminal composer dump-autoload.

Expected behavior
To finish dump of autoload filewithout error.

Screenshots
изображение

System

  • OS: Ubuntu 16.04
  • Browser: Firefox
  • Version: 84.0.2

Additional context
It is run on production server with shared hosting;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported composer dump-autoload and php artisan package:discover output, then inspect config/tracker.php and the referenced vendor/pragmarx/support/src/PhpSession.php:23 call. Reproduce the package and database setup described on the shared-hosting environment; done means the autoload dump completes without the PDO or session errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.