Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro ao criar projeto no Laravel (Your requirements could not be resolved to a installable set of packages)

Quando rodo o comando

composer create-project laravel/laravel PRIMEIRO_PROJETO

Obtenho:

PHP Warning:  PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20230831
PHP    compiled with module API=20220829
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20230831
PHP    compiled with module API=20220829
These options need to match
 in Unknown on line 0
You are running Composer with SSL/TLS protection disabled.
Creating a "laravel/laravel" project at "./PRIMEIRO_PROJETO"
Installing laravel/laravel (v11.0.8)
  - Downloading laravel/laravel (v11.0.8)
  - Installing laravel/laravel (v11.0.8): Extracting archive
Created project in D:\projetos\PRIMEIRO_PROJETO
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
PHP Warning:  PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20230831
PHP    compiled with module API=20220829
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20230831
PHP    compiled with module API=20220829
These options need to match
 in Unknown on line 0
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v11.0.0, ..., v11.7.0] require league/flysystem ^3.8.0 -> satisfiable by league/flysystem[3.8.0, ..., 3.27.0].
    - league/flysystem[3.3.0, ..., 3.14.0] require league/mime-type-detection ^1.0.0 -> satisfiable by league/mime-type-detection[1.0.0, ..., 1.15.0].
    - league/flysystem[3.15.0, ..., 3.27.0] require league/flysystem-local ^3.0.0 -> satisfiable by league/flysystem-local[3.15.0, ..., 3.25.1].
    - league/mime-type-detection[1.0.0, ..., 1.3.0] require php ^7.2 -> your php version (8.2.10) does not satisfy that requirement.
    - league/mime-type-detection[1.4.0, ..., 1.15.0] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - league/flysystem-local[3.15.0, ..., 3.25.1] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^11.0 -> satisfiable by laravel/framework[v11.0.0, ..., v11.7.0].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\php\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.
1 resposta
solução!

Depois de muito apanhar, consegui resolver o problema com 3 links.

  1. baixei todas as DLLs para PHP do site da MSoft. https://learn.microsoft.com/pt-br/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver16#download

  2. peguei as DLLs para ODBC aqui ; https://learn.microsoft.com/pt-br/sql/connect/odbc/microsoft-odbc-driver-for-sql-server?view=sql-server-ver16

  3. repeti os passos a baixo para cada uma delas (deu trabalho). https://www.dlldownloader.com/php_pdo_oci-dll/#How-to-Download-Php_pdo_ocidll-File (facilita se vc usar alguns atalhos de teclado: Para editar o nome do arquivo no windows, tecle F2. Copie e cole ele no prompt no local correto, nao esquecendo de adicionar .dll no final)

  4. depois de todos instalados, entrei no diretorio %root%/windows/System32/ e rodei o comando >sfc /scannow Este comando reinstala todas as DLLs no sistema e verifica a integridade de cada uma delas. Assim, se houver problemas em alguma das DLLs, automaticamente o sistema baixa da MS a DLL sem estar corrompida e reinstala elas.

Espero que solucione o problema para vcs tbem.