Skip to content

PHP Fatal error: mysqli object already closed in Hotel Management System #8

@Josaphat12-tech

Description

@Josaphat12-tech

Description:
While working on my Hotel Management System project, I encountered the following error in the Apache error log:
[Wed Apr 10 17:28:29.126727 2024] [php:error] [pid 15690] [client 127.0.0.1:53152] PHP Fatal error: Uncaught Error: mysqli object is already closed in /var/www/html/Hotel-Management-System/index.php:10\nStack trace:\n#0 /var/www/html/Hotel-Management-System/index.php(10): mysqli_query()\n#1 {main}\n thrown in /var/www/html/Hotel-Management-System/index.php on line 10, referer: http://localhost/Hotel-Management-System/
This error indicates that the mysqli object is already closed at line 10 of my index.php file. Here's the corresponding stack trace:

#0 /var/www/html/Hotel-Management-System/index.php(10): mysqli_query() #1 {main}
It seems to be causing issues with the functionality of my application, particularly in the database interaction part. I've tried troubleshooting it, but I'm unable to pinpoint the exact cause.

If anyone has encountered a similar issue or has insights on how to resolve this, I would greatly appreciate your assistance. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions