News:

Wondering if this will always be free?  See why free is better.

Main Menu

SQLite In Smf

Started by niires1204, September 04, 2011, 03:24:37 PM

Previous topic - Next topic

niires1204

hello guys,

actually i created my smf forum with Db type as SQLite.well i wanted to install a few mods, but in those mods i have to create db tables.
well where can i find the SQLite db inside the root folder of forum??

the db queries are

The 3 queries i want to run is


CREATE TABLE IF NOT EXISTS {db_prefix}log_enotify_pms (
id_enot mediumint(8) NOT NULL auto_increment,
enot_item_id mediumint(8) NOT NULL,
enot_title varchar(255) NOT NULL,
enot_time int(10) NOT NULL,
enot_link tinytext NOT NULL,
enot_sender varchar(255) NOT NULL,
enot_sender_link text NOT NULL,
id_member mediumint(8) NOT NULL,
enot_read tinyint(3) NOT NULL default '0



query 2 :

CREATE TABLE IF NOT EXISTS {db_prefix}log_enotify_replies (
id_enot mediumint(8) NOT NULL auto_increment,
enot_item_id mediumint(8) NOT NULL,
enot_title varchar(255) NOT NULL,
enot_time int(10) NOT NULL,
enot_link tinytext NOT NULL,
enot_sender varchar(255) NOT NULL,
enot_sender_link text NOT NULL,
id_member mediumint(8) NOT NULL,
enot_read tinyint(3) NOT NULL default '0


3rd query

INSERT IGNORE INTO {db_prefix}settings
(variable, value)
VALUES ('enotify_life', '5000'),
('enotify_refresh', '10000'),
('enotify_pms', '1'),
('enotify_replies', '1'),
('enotify_exp','48');


please dont give me the plain php script. can you insert the queryt inside the php script so that i can Just run it inside my host directories.

emanuele

Hi,

sorry for the late reply.

Please try the attached file, put it in your forum's directory (it must be in the same directory as SSI.php) and the point to it with your browser, e.g.:
http://www.yourwebsite.tld/forum/installScript.php
if nothing goes wrong you will obtain an empty page (sorry, I used one of my mods install script...it's not very informative).

It should work, in case you have any problem feel free to ask! :)

BTW, if the mod doesn't even have a proper install script for 2.0 (by the query you posted it seems a SMF 1.x mod) maybe it will not work at all with SQLite...
What mod is it?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

niires1204

hey the script doesnot work which you gave me :

screen shot :







and the 2 mods which i tried to install:
http://custom.simplemachines.org/mods/index.php?mod=2198
http://custom.simplemachines.org/mods/index.php?mod=2543

niires1204

your scripts gives an anoyomus error lol.. so can you plzzz help me personally  my msn  [email protected]

Oldiesmann

What errors do you get if you try the one that emanuele gave you?
Michael Eshom
Christian Metal Fans

emanuele

#5
Shame, I thought I set notifications on this topic but it seems I forgot...

Could you please post a bigger screenshot or the text of the page?
It's rather difficult to read...

Is the forum working properly?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

niires1204

the foru mis working properly. but only thing missing is the db tables so that the mods can work o.o.

screenshot :



niires1204


Notice: Undefined index: enotify_life in /home/wwwkill/public_html/Sources/Load.php on line 1571

Notice: Undefined index: enotify_life in /home/wwwkill/public_html/Sources/Load.php on line 1578

Notice: Undefined index: enotify_refresh in /home/wwwkill/public_html/Sources/Load.php on line 1581

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/wwwkill/public_html/Sources/Subs.php on line 797

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/wwwkill/public_html/Sources/Subs.php on line 803

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/wwwkill/public_html/Sources/Subs.php on line 821
Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back


This The Text of the error.

emanuele

That's pretty strange to me...

I'm not entirely sure what the problem is.
Try this: open the installScript.php I provided, then replace "{db_prefix}" with the prefix of your table and run again the script.

For example if the prefix is "sfm", change:
'{db_prefix}log_enotify_pms',
to
'smf_log_enotify_pms',

and
'{db_prefix}log_enotify_replies',
to
'smf_log_enotify_replies',

If you don't know what the prefix is, please open you Settings.php and search for $db_prefix, you will find something like:
$db_prefix = 'smf_';
the smf_ is the prefix to use in this example.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

niires1204


Notice: Undefined index: enotify_life in /home/wwwkill/public_html/Sources/Load.php on line 1571

Notice: Undefined index: enotify_life in /home/wwwkill/public_html/Sources/Load.php on line 1578

Notice: Undefined index: enotify_refresh in /home/wwwkill/public_html/Sources/Load.php on line 1581

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/wwwkill/public_html/Sources/Subs.php on line 797

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/wwwkill/public_html/Sources/Subs.php on line 803

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/wwwkill/public_html/Sources/Subs.php on line 821


This time i didnot get any database error. but i got the timezone error. so was the table creating sucessfull??

emanuele

Should be...

Maybe you should consider to install something like SQLiteManager (just found it, don't know how it works), in order to be able to see the tables in your SQLite database and manage them. ;)
With that tool you should also be able to verify that the two tables are present and contains the proper columns.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

niires1204

well my question is.. whr is the sqlite db located in the root folder of the smf flrum.

niires1204

lol.. i got alot of problem now... i uploaded the sqlite (which you gave me) to my root folder. but when i enter the sqlite.. i ask me to create or add a new database. .. any basic steps how to use it??

emanuele

Well...because you decided so? :P

The very first screen of SMF installation procedure asks you where you want to store the SQLite database file and the pre-defined choice is the root of the forum. If you want it somewhere else I assume you can change the path.
If you want to move the file to another location after the installation I think (never tried myself) you just have to move the file and change the path in Settings.php. The variable to change is $db_name.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

emanuele

#14
Quote from: niires1204 on September 08, 2011, 03:53:51 PM
lol.. i got alot of problem now... i uploaded the sqlite (which you gave me) to my root folder. but when i enter the sqlite.. i ask me to create or add a new database. .. any basic steps how to use it??
I'll play a bit with it. Give me few minutes. ;)

First of all I hope you uploaded it in a folder without overwriting SMF's index.php...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

emanuele

Just quoting to be sure you've read it ;)
Quote from: emanuele on September 08, 2011, 03:57:51 PM
First of all I hope you uploaded it in a folder without overwriting SMF's index.php...

As far as I can see it's enough that in the page where the software asks you to "upload" the database you put: in the box "Name" the name of the db (i.e. the name of the file) and in the box "Path" the path to your database (including the file name). You can find these two information in the file Settings.php in the root of your forum, search for the variable $db_name, you'll find a line like:
$db_name = '/srv/www/htdocs/install_testing_ite/smf_607ae7be2d';
the file name is:
smf_607ae7be2d.db

while the path is:
/srv/www/htdocs/install_testing_ite/smf_607ae7be2d.db
don't forget to add ".db" at the end of file name!

Once you've done this, click "save" and that's all, you should be able to see all the tables in your database...hopefully! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

niires1204

dont hope dude.. its working :D aa hell thank you .. and heaven thank you bro... lets  see what i can do .. the topic is not yet sloved...

niires1204

topic solved.. since i am able to create new tables or rows... !! thank you so much

emanuele

Great! :D

* emanuele is thinking to add this to a FAQ on the wiki... even if it's not exactly "frequently asked" have it there won't hurt. :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: