![]() |
PDO php class SQLite problem - 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: PDO php class SQLite problem (/showthread.php?tid=19250) |
PDO php class SQLite problem - El Forum - 06-02-2009 [eluser]René Tuin[/eluser] Hi all, I have the following problem. I have a update functie which I build in php, only I get the following error. 'SQLSTATE[HY000] [14] unable to open database file' Here is my code: Code: <?php I can build this update functie with the framework because I call this functie with AJAX HTTP Request. So I must build it with php. So i hope someone can help me. PDO php class SQLite problem - El Forum - 06-02-2009 [eluser]xwero[/eluser] use a file path instead of an url PDO php class SQLite problem - El Forum - 06-02-2009 [eluser]René Tuin[/eluser] If I do that I get the following error 'SQLSTATE[HY000]: General error: 26 file is encrypted or is not a database' The strange thing is that Codeigniter successful opened the file , but my php script not. PDO php class SQLite problem - El Forum - 06-10-2009 [eluser]Sanity11[/eluser] Anybody? I am having the same type of problems here. PDO php class SQLite problem - El Forum - 06-10-2009 [eluser]TheFuzzy0ne[/eluser] I'm wondering if the file has been written by an older/newer version of SQLite, and is not compatible with the version you're trying to use it with. I'd suggest dumping the data with the version of SQLite that works, and reimporting it using the new version. PDO php class SQLite problem - El Forum - 06-22-2009 [eluser]René Tuin[/eluser] My database file is a version 2 database. PDO php class SQLite problem - El Forum - 06-22-2009 [eluser]TheFuzzy0ne[/eluser] And what version of SQLite are you running? You can find out what PDO drivers are installed by running: Code: phpinfo(); Also, you seem to be accessing a URL and not a local file. PDO php class SQLite problem - El Forum - 06-22-2009 [eluser]René Tuin[/eluser] I have attach my phpinfo file as a screenshot. I already have change my pad, but i still get that error. PDO php class SQLite problem - El Forum - 06-22-2009 [eluser]TheFuzzy0ne[/eluser] You need to be able to include the file. If you can include it, then you know the path is correct. It's probably best to use the APPPATH constant in the path, also. PDO php class SQLite problem - El Forum - 06-22-2009 [eluser]René Tuin[/eluser] I have fix it. I use the follow code. Code: <?php It was all about the version i use. Thx for your help anyway. Greetz |