![]() |
i have a problem with database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: i have a problem with database (/showthread.php?tid=12605) |
i have a problem with database - El Forum - 10-24-2008 [eluser]minhbu[/eluser] my application is run well in localhost but when i upload my code to server is i have a error Fatal error: Call to a member function load() on a non-object in /home/demo/domains/demo.vn/public_html/system/database/DB_driver.php on line 1185 I don`t knows why ? i have a problem with database - El Forum - 10-24-2008 [eluser]Randy Casburn[/eluser] Hi minhbu, I think the quickest way to find out might be to turn on your logs. Open up your config.php file and set your error logging threshold = 4. Try to load your site. Then look for a log file in the /log directory. See if there are any errors reported there. I'm betting there is trouble loading up one of the core classes. Hope this helps, Randy i have a problem with database - El Forum - 10-24-2008 [eluser]minhbu[/eluser] Hi ! I have turned on my logs but when i run my website after i go to logs folder that haven`t got any files log. Help me i have a problem with database - El Forum - 10-24-2008 [eluser]Randy Casburn[/eluser] Please make sure the folder is 'writable' or has 'write' permissions. Randy i have a problem with database - El Forum - 10-26-2008 [eluser]minhbu[/eluser] my log is No direct script access allowed i have a problem with database - El Forum - 10-26-2008 [eluser]Randy Casburn[/eluser] So when you access your site normally, you get this error: Quote:Fatal error: Call to a member function load() on a non-object in /home/demo/domains/demo.vn/public_html/system/database/DB_driver.php on line 1185 Then, you open the log file, and the only thing in the log file is this? Quote:No direct script access allowed That usually only shows up when you try to access a php file directly from the browser's address bar. You can't access the log file that way, you must open it with vi or some other editor. Randy i have a problem with database - El Forum - 10-26-2008 [eluser]minhbu[/eluser] I open my log by a editor and i have got a error. ERROR - 2008-10-27 08:44:13 --> Severity: Warning --> fopen(/home/demo/domains/demo.vn/public_html/system/cache/b53b3a3d6ab90ce0268229151c9bde11) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied /home/cahat/domains/cahat.vn/public_html/system/codeigniter/Common.php 49 i have a problem with database - El Forum - 10-26-2008 [eluser]Randy Casburn[/eluser] There you have it. We've made progress! It appears you have several file permission problems that need to be repaired before things will work properly. Hope this all helps, Randy i have a problem with database - El Forum - 10-26-2008 [eluser]minhbu[/eluser] i chmoded cache directory is 777 and codeigniter directory 777 but it always displays error ERROR - 2008-10-27 08:44:13—> Severity: Warning —> fopen(/home/demo/domains/demo.vn/public_html/system/cache/b53b3a3d6ab90ce0268229151c9bde11) [<a >function.fopen</a>]: failed to open stream: Permission denied /home/cahat/domains/cahat.vn/public_html/system/codeigniter/Common.php 49 i have a problem with database - El Forum - 10-27-2008 [eluser]Randy Casburn[/eluser] That error is telling you that it is executing line 49 in the file Common.php when it fails. Not that it fails to access file Common.php. Your entire directory structure needs to have security looked at very carefully. And please, please DO NOT give every directory 777 permissions. That is very dangerous. Please refer to other resources on the internet for securing your web server and web server account. Randy |