I uploaded file with php oops. but it throwing error include(classes/DatabaseObject.class.php): failed to open stream: No such file or directory in /home/v364nw9h6v2e/public_html/altist.in/private/initialize.php on line42
Solved! Go to Solution.
You did
http://altist.in/private/classes/Databaseobject.class.php
You need
http://altist.in/private/classes/DatabaseObject.class.php
The O needs to be capital as well - As mentioned unix is case sensitive so you need to make sure it matches exactly
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
1) Is the PHP you posted in the post the DatabaseObject.class.php or the initialize.php?
2) I tried to get to http://altist.in/classes/DatabaseObject.class.php and http://altist.in/private/classes/DatabaseObject.class.php
both of these gave file not found
So it would seem like you a missing a file on your site and that is what is causing the error
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
As I mentioned it looks like you are missing the DatabaseObject php file and that is why it's producing the error - If it is uploaded I would double check the spelling & case (upper/lower) matches to the error message
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
Hi @PL281 all class file in lowecase like databaseobject.class.php
[11-Jul-2019 09:01:18 UTC] PHP Warning: include(classes/DatabaseObject.class.php): failed to open stream: No such file or directory in /home/v364nw9h6v2e/public_html/altist.in/private/initialize.php on line 45
[11-Jul-2019 09:01:18 UTC] PHP Warning: include(): Failed opening 'classes/DatabaseObject.class.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in /home/v364nw9h6v2e/public_html/altist.in/private/initialize.php on line 45
[11-Jul-2019 09:01:18 UTC] PHP Fatal error: Uncaught Error: Class 'DatabaseObject' not found in /home/v364nw9h6v2e/public_html/altist.in/private/initialize.php:51
Stack trace:
#0 /home/v364nw9h6v2e/public_html/altist.in/index.php(1): require_once()
#1 {main}
thrown in /home/v364nw9h6v2e/public_html/altist.in/private/initialize.php on line 51
I would try to change that to mixed case as unix/linux is case sensitive
You maybe able to change the line toward the end where you have database object in mixed case to lower case to fix it as well... as I said though I would change the file name to mixed case
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
I would suggest renaming databaseobject.class.php to DatabaseObject.class.php
Then your script should work
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
You did
http://altist.in/private/classes/Databaseobject.class.php
You need
http://altist.in/private/classes/DatabaseObject.class.php
The O needs to be capital as well - As mentioned unix is case sensitive so you need to make sure it matches exactly
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
Thank you it's working but is there any other way so i can use in same format as i did it previous
One thing to try is change the line DatabaseObject::set_database($database); to
databaseobject::set_database($database);
That "MAY" set get it to look for the file as all lower case but I'm 100% certain on that.
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
I understand but i want it as DatabaseObject::set_database($database); and file name like databaseobject.class.php is there any function so i can use in initialize.php
and is there any error in this function
function my_autoload($class) {
if(preg_match('/\A\w+\Z/', $class)) {
include('classes/' . $class . '.class.php');
}
}
spl_autoload_register('my_autoload');
Unfortunately, I'm not going to be able to further debug your PHP code - The first issue was just a case issue on the file name - there maybe something else in your code that is causing it to look for the file name in mixed case or it maybe the statement I provided.
also without seeing all the code and just seeing one file it's it would be a very back and forth process to debug
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community