Where is database library? |
[eluser]ephroni[/eluser]
Complete n00bie question no doubt: When I add the 'database' string to the libraries array in autoload, I get a 500.0 error in the browser. I expected it since there is actually no database.php file in the libraries directory in the version of CI I downloaded. What am I missing? Am I supposed to get that lib seperately?
[eluser]akkumaru[/eluser]
are you sure you write it like this: @ 'application/config/autoload.php' Code: $autoload['libraries'] = array('database'); then you may want to check these: @ 'index.php' Code: $system_folder = system-folder path relative to index.php;
[eluser]ephroni[/eluser]
application folder is by default 'application' I tried system/application but no joy. Again, no surprise, there does not seem to be any files named database.php in the whole structure except for the config/database.php How far back in versions do I have to go to get one that works like the user guide says?
[eluser]Popcorn[/eluser]
The current version works fine. You might of corrupted your download so I suggest you re download CodeIgniter and try again.
[eluser]Nick Husher[/eluser]
Just FYI, the Database library isn't in the libraries folder, it's in the database folder. I assume the rationale behind making it a special case is that it's really big and complex compared to the other libraries.
[eluser]ephroni[/eluser]
Well, I took a fresh installation from a fresh download of 1.7.0 and did nothing but change the following: $autoload['libraries'] = array('database'); in config/autoload.php and Add DB settings in config/ database.php and error 500.0 is generated. Maybe I should start trying older versions.
[eluser]ephroni[/eluser]
Well, guys, thanks for your help. I can only conclude that my PHP install is broken in some way that has just now revealed itself. PHP5 on Vista64/iis7 so it's no surprise... If anybody has an idea let me know. Again, thanks.
[eluser]jalalski[/eluser]
A 500 error is a server error I think. On Linux I would look in the access logs and the error logs. I guess there must be something similar under Windows? IIS must have some way of recording errors? To answer your original question, the database library is in system/database/*
[eluser]ephroni[/eluser]
Yes... LOL well, Windows IIS7 generates an error so meaningless the mind gets numb just thinking about it... It really just records that an error happened but not any debugging information. I really wish codeigniter had some nice error catching in this spot so I could at least know what failed...
[eluser]Unknown[/eluser]
Which version of PHP 5 are you running 2.8 or 2.6? Did you install manually with the zip(ISAPI or CGI) or did you use the win installer. You can turn logging on for a 500(internal Sever Error) see here Troubleshooting IIS. |
Welcome Guest, Not a member yet? Register Sign In |