Opened 17 years ago

Closed 17 years ago

#3824 closed defect (worksforme)

require_once failed to open stream in mythweb/includes/init.php

Reported by: anonymous Owned by: xris
Priority: major Milestone: unknown
Component: mythweb Version: unknown
Severity: medium Keywords: init.php require_once failed stream Database
Cc: Ticket locked: no

Description

After updating mythweb I was recieving the following error:

Error at /var/www/html/mythweb/includes/init.php, line 119: require_once(includes/objects/Database) [function.require-once]: failed to open stream: No such file or directory

After further investigation, the function require once was trying to load the Database object as a file. Line 119 of init.php showed:

Load the database connection routines

foreach (get_sorted_files('includes/objects/', '/Database/') as $file) {

require_once "includes/objects/$file";

}

I patched this error, by surrounding it with a check if the $file was != to "Database" which then corrected the error.

Load the database connection routines

foreach (get_sorted_files('includes/objects/', '/Database/') as $file) {

if ($file != "Database") {

require_once "includes/objects/$file";

}

}

Change History (1)

comment:1 Changed 17 years ago by xris

Resolution: worksforme
Status: newclosed

not actually the problem.. the regex in get_sorted_files makes sure that won't match. Something else must be wrong with your setup. This is also completely fixed/worked around in trunk.

Note: See TracTickets for help on using tickets.