Database
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, bool given – PHP MYSQLI_ERROR
L'errore compare quando una query mysqli_query() fallisce restituendo false (a causa di un errore SQL) e viene passata direttamente a mysqli_fetch_assoc.
Cosa significa questo errore?
L'errore compare quando una query mysqli_query() fallisce restituendo false (a causa di un errore SQL) e viene passata direttamente a mysqli_fetch_assoc.
Messaggio originale
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, bool givenContesto e parole chiave
Alias
- mysqli_fetch_assoc bool given
Messaggi alternativi
- Risultato query booleano anziché result
Prodotti
- PHP Engine / Composer / Extensions
Piattaforme
- Linux
- macOS
- Windows
Parole chiave
- Database
- errore-php-mysqli-fetch-assoc-on-boolean
- php.database.mysqli-fetch-assoc-on-boolean
Cause possibili
Causa tecnica principale per Fatal Error: mysqli_fetch_assoc(): Argument must be of type mysqli_result, bool given
L'errore compare quando una query mysqli_query() fallisce restituendo false (a causa di un errore SQL) e viene passata direttamente a mysqli_fetch_assoc.
molto comuneDiagnosi
Verifica configurazione runtime per Fatal Error: mysqli_fetch_assoc(): Argument must be of type mysqli_result, bool given
Eseguire la verifica tramite riga di comando CLI.
Come leggere il risultato. Mostra i moduli e la versione attiva.
php -v && php -mRisoluzione
Risoluzione standard per Fatal Error: mysqli_fetch_assoc(): Argument must be of type mysqli_result, bool given
Esegui i passaggi consigliati per ripristinare il corretto funzionamento.
- Verificare il codice o configurazione php.ini
- Applicare le modifiche
- Ricaricare PHP-FPM o Apache
Domande frequenti
Come risolvere rapidamente Fatal Error: mysqli_fetch_assoc(): Argument must be of type mysqli_result, bool given?
L'errore compare quando una query mysqli_query() fallisce restituendo false (a causa di un errore SQL) e viene passata direttamente a mysqli_fetch_assoc.
Approfondimenti
- PHP Official Documentation - PHP.net documentazione_ufficiale