FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Install with SQLite3?

Feed 10 posts, 2 voices

Avatar
1493 posts

Hi! I have spent a lot of time today (too much!!) (my bad!) trying to get a localhost installation of Frog working with SQLite. This may allow me to use Frog in more settings, and that is a good thing. :)

I had much trouble trying to convince XAMPP (I'm using WinXP version) to use SQLite3 with PDO, but I got that working.

The first time I tried to install Frog (fresh download from SVN), the database size was 0. I changed some settings in my php.ini, and the second attempt installed the frog.db in the /install directory! So I moved it to the root directory (I'm calling it "frogPDO" for the moment). And....

...Yay! The frontend is fine! (Except it seems to have the archive bug that Philippe described here.) But when I try to login to to localhost/frogPDO/admin I get just a blank screen. I cannot work out how to change this??

Any help appreciated! Thank you/merci!! :)

David.

 
Avatar
1493 posts

Update: I have been playing with things -- I notice that when I try to go to localhost/frogPDO/admin/ then a new frog.db of 0 bytes gets created. I delete it, and it creates it again. It doesn't seem to be finding the "real" frog.db which is living in the root directory. If I try moving the "real" db into the admin directory, I get PHP errors....

I have looked in the config.php and index.php files for the {root} and /admin, but can't see where to set the directory any better. You have define('DB_DSN', 'sqlite:frog.db'); at line 8 in config.php, of course, but if I try changing that value (to ANYthing -- even just using / before it) I get errors.

Hmmm......

 
Avatar
1493 posts

GOT IT!! :D

I copied the following into admin/config.php:

// database informations

define('DB_DSN', 'sqlite:../db/frog.db');
define('DB_USER', 'root');
define('DB_PASS', '');

(I moved the db to a /db directory :) And I'm in!

OK. Now I am very happy. Sorry for the many posts! (Well ... 3, anyway!)

David.

 
Avatar
1493 posts

> Now I am very happy.

Except for the "Archive" bug... ;)

 
Avatar
541 posts

with sqlite use the absolute path like php told us to do ;)

http://ca.php.net/manual/en/ref.pdo-sqlite.connection.php

 
Avatar
1493 posts

> ...use the absolute path...

Yes, I saw that. :) And you even have that instruction (commented out) in the {root} config.php file! But the problem seemed to be that admin/config.php has no instruction on where to find the db!

Also -- I guess the "Archive" error (...\frog\plugins\archive\archive.php on line 105) has to do with setting the $sql variable in line 85 of that file? But I don't know how to fix it! Do you have that patch Philippe?

 
Avatar
541 posts

what version do you use ? because there is no more config.php file in admin directory !! ...

if you use the trunk version of the svn you are not suposed to ave 2 config.php files !!

 
Avatar
1493 posts

Something very strange must have happened:

I did an SVN checkout from the trunk -- current to revision 123. I just looked at the "trunk" on GoogleCode, and there is no config.php in the repository!

So....???????

 
Avatar
1493 posts

SORRY! -- In post #6 above, I should have put that I copied those lines into admin/index.php NOT config.php!! Sorry. :( So there is only one config.php as there is supposed to be.

My problem with the blank admin page was solved by adding the DB_DSN settings (etc.) to the admin/index.php file.

 
Avatar
1493 posts

And I am even more stupid than I thought. Of course "absolute path" means absolute path. I thought it meant "absolute" in relation to the CMS root ... but it means absolutely absolute.

I set the line in config.php this way: define('DB_DSN', 'sqlite:C:/Program Files/xampp/htdocs/frogPDO/db/frog.db'); and removed the extra definition in admin/index.php ... and all works well. Sorry it took me so long to work this out!

Would there be any problem in defining the DB_DSN value twice, as I had done? I suppose if one wanted to use a relative path, that would be the work-around...

 
Avatar
1493 posts

And just to complete the saga ... You then need to go to the Admin, Administration tab, Plugins section, and enable the SQLite 3 plugin which takes care of the "archive" problem. All very nice. :) Thank you again, Philippe!