Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Can't install text database version - please help  (Read 4356 times)

mpjx

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
Can't install text database version - please help
« on: September 01, 2006, 07:41:39 pm »

Hi all,

I've searched the forums before posting but can't find anything. We'll as the subject says, I'm trying to install the text database version of sNews (1.4) on a test server (Apache 1.3, PHP 4.3.11).

sNews looks great and should be simple but I just can't get it working. I've been through the ReadMe file and as far as I can understand, I'm following the install instructions fine, but I'm obviously missing something.

Every time I go to index.php, the page appears to load completely but the screen remains blank. Looking at the html loaded by the browser, there is only code as far as the in the header - nothing after.

OK here are details of what I've done during install:

1. Modified 'snews-textdb.php': username and password left as 'test', database name as 'dbase' (I've also tried 'dbase.txt'), website as 'http://localhost/snews14/'
2. /inc/dbs , /img , rss.xml all CHMODed to 777

I'm sure I'm missing something really simple but I don't know what. Thanks in advance for any help you can give me!

Martin
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Can't install text database version - please help
« Reply #1 on: September 01, 2006, 08:12:30 pm »

First, I wanna welcome you the way only I can: mpjx, I send shivers welcomming streams up your loins, they pass the disqusting parts and go straight for you heart so you feel more welcomed than ever....

Now, this is beginning to get a common issue on this here forum, so I just quote an earlier post I've made:

Quote from: Patric
...Hm, don't really konw how to put this. The textdb version of sNews isn't really apart of the sNews product, as far as updates, mods, and these things go, as itself is a MOD. And there are really none here that manages that version.

The guy who made the sNews textDB version is Dobey around for some time now. You'd better try to contact him through his website: http://www.rjs-custom.com/ in order to get a hold of him.

The only reference I find to this is this post: http://www.solucija.com/forum/viewtopic.php?pid=4647#p4647 Got it while searching ;)

Patric.
Logged
"It's only dead fish that goes with the flow... "
Updated

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Can't install text database version - please help
« Reply #2 on: September 01, 2006, 08:37:17 pm »

Patric - it appears that website has expired. There's a "Why am I seeing this Website" link line in the footer that takes you to "Whois". Perhaps note that it's now a dead link in terms of contacting Dobey.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Can't install text database version - please help
« Reply #3 on: September 01, 2006, 09:17:26 pm »

Quote from: mpjx
Hi all,
I'm trying to install the text database version of sNews (1.4) on a test server (Apache 1.3, PHP 4.3.11).
(Problem:)
Every time I go to index.php, the page appears to load completely but the screen remains blank. Looking at the html loaded by the browser, there is only code as far as the in the header - nothing after.

OK here are details of what I've done during install:

1. Modified 'snews-textdb.php': username and password left as 'test', database name as 'dbase' (I've also tried 'dbase.txt'), website as 'http://localhost/snews14/'
2. /inc/dbs , /img , rss.xml all CHMODed to 777

I'm sure I'm missing something really simple but I don't know what. Thanks in advance for any help you can give me!
Martin
Welcome to our sNews Community Martin. As Patric mentioned above, the tex database version of sNews 1.4 was a modified version of sNews 1.4 created by an early member of this Community, known only as Dobey... it is not an official version of sNews 1.4.

I have not used the txtdb version myself, but I do have it on my localmachine. My server package is the latest version of XAMPP for Windows XP from Apache Friends. I did a fresh installation of the txtdb version and had it working in a very short time.

Update # 2 - Naming the database:
On my successful install, I left the dbname variable empty like this:
Code: [Select]
$s['dbname'] = ""; // Database nameThis led me to think the dbname and prefix variables were not required, so I disabled AND removed them, and the site still functioned fine after putting in a couple of categories and articles.

I then put "dbase1" in the dbname variable. Refreshed the site, and my existing articles and categories no longer displayed. However, I logged in, created another category and article, and they displayed fine.

What happened? The txtdb API created a new folder within the inc/dbs folder, for the "new database name - dbase1"... and created a set of therein to store data in this "new" database.

So... whatever you put in the dbname variable, the API creates a new dbase folder in inc/dbs with the three data files (which replace the three tables in the MySQL version). I assume that - every time you change the dbname, then login, you will get another db folder by that name created in the inc/dbs folder.

WHAT TO EXPECT - If you have installed the "patched" version, you should see the Home page without any error messages. Try logging in with "test / test" if that's what you still have in the uname and password variables. If you get a bunch of error messages (somewhere between line 300 and 312), there is a mod that needs to be added in. Let me know if you get this far and if it runs OK.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

mpjx

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
Can't install text database version - please help
« Reply #4 on: September 02, 2006, 11:01:28 am »

Hi Guys,

Thanks for your help the last few hours, and for a warm welome. Patric: I've *never* had a welcome like that before.

OK, here's the progress. While I was playing around and waiting for replies, I installing a second version, on a 'live' server and got the infamous mysql_escape_string error. I took a look at all the files and found a folder called /dbase inside the /dbs folder. This ties up exactly with your explanation, keyrocks - thanks.

Next up, I changed line 306 in snews-txtdb.php, as per the dobrey post, reloaded index.php and got the following error:

*****
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/9715/mpjdesign/www.mpjdesign.ltd.uk/public_html/snews/snews-txtdb.php on line 154

Parse error: parse error, unexpected ']' in /home/9715/mpjdesign/www.mpjdesign.ltd.uk/public_html/snews/snews-txtdb.php on line 154
*****

I suspected that there was a problem when DW's colour coding seemed to indicate a coding error somewhere, as I changed the line of code.

There's another problem too, the /dbase folder that's created automatically by the api has permissions 755 *but* the Owner is 99. So I can't modify, delete, replace anything remotely using an ftp client. I shouldn't need to but you never know.

So after all this I've decided to abandon the text db version and move over to the official release. I'll have to look for another text db blog tool for an upcoming client but that's life! Thanks for all your help guys, you'll probably see me in the forums again soon when I'm trying to install the mySQL version but I'll be sure to check existing posts first.

A quick suggestion for you: how about making that dobrey post a sticky at the top of the forum so that anyone having trouble with the text-db version can find it straight away?

Cheers for all your help!

Martin
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Can't install text database version - please help
« Reply #5 on: September 02, 2006, 11:20:08 am »

Quote from: Key-man
Patric - it appears that website has expired. There's a "Why am I seeing this Website" link line in the footer that takes you to "Whois". Perhaps note that it's now a dead link in terms of contacting Dobey.
Did not see that, sorry. What a treat that you have some info on the subject then. So, as a administrator of this here forum, I'm now "appointing" you the new textdbversion expert, hehe :)

Quote from: mpjx
and for a warm welome. Patric: I've *never* had a welcome like that before.
You're welcome again. Hehe, I do my best...
Logged
"It's only dead fish that goes with the flow... "
Updated

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Can't install text database version - please help
« Reply #6 on: September 02, 2006, 02:30:31 pm »

Quote from: mpjx
Next up, I changed line 306 in snews-txtdb.php, as per the dobrey post, reloaded index.php and got the following error:

*****
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/9715/mpjdesign/www.mpjdesign.ltd.uk/public_html/snews/snews-txtdb.php on line 154

Parse error: parse error, unexpected ']' in /home/9715/mpjdesign/www.mpjdesign.ltd.uk/public_html/snews/snews-txtdb.php on line 154
*****

I suspected that there was a problem when DW's colour coding seemed to indicate a coding error somewhere, as I changed the line of code.

There's another problem too, the /dbase folder that's created automatically by the api has permissions 755 *but* the Owner is 99. So I can't modify, delete, replace anything remotely using an ftp client. I shouldn't need to but you never know.
there is an error in Dobey's fix. It should be
Code: [Select]
ereg_replace("['\"]","\\0",$query);You should also (I think) be able to change the owner permissions using your hosts cpanel. Failing that, you would have to contact your host to get them to alter it.
Logged
Of all the things I have lost, it is my mind that I miss the most.

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Can't install text database version - please help
« Reply #7 on: September 02, 2006, 07:47:48 pm »

Line 306, in function clean($query) in my snews-txtdb.php file is "patched" and functioning well as follows:
Code: [Select]
$query = ereg_replace("[''\]","\\0",$query);
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Can't install text database version - please help
« Reply #8 on: September 03, 2006, 12:02:52 am »

Quote from: keyrocks
Line 306, in function clean($query) in my snews-txtdb.php file is "patched" and functioning well as follows:
Code: [Select]
$query = ereg_replace("[''\]","\\0",$query);
I don't think that is right -- but then I'm no master at regular expressions.

What Dobey had...
Code: [Select]
$query =ereg_replace("['"\]","\\0",$query);...which failed.
As I read it, that between the paired double quotes is to be replaced.
"['"\]"
so, any left square bracket, single quote, double quote, and an escaped right square bracket.
That doesn't make sense, firstly because the second double quote "['"\]" is not escaped, so it closes the group, which in turn is what then causes the errors on page. Secondly, there is no reason to escape a square bracket.

So All  I did was to move the slash to escape the second double quote, which then made the group make sense.
From "['"\]"
To "['\"]"

And to complete the analysis, any of these items ( [, ', ", ] )  found would be replaced with a \0

.... I think that is right anyway.

So, Keyrocks, I am now trying to figure out how the code you have supplied is to work... and then try to understand it ( and consequently regex )
Logged
Of all the things I have lost, it is my mind that I miss the most.

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Can't install text database version - please help
« Reply #9 on: September 03, 2006, 03:11:32 am »

Quote from: philmoz
I don't think that is right -- but then I'm no master at regular expressions.
Thanks. I'm far from being a master with regular expressions as well... and you may well be right in your analysis of the subject string. I cannot remember where I got my string from, but it was posted somewhere a while back as a solution to Dobey's little bug. Your analysis makes more sense, and I'll change mine to be consistent.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ld3

  • Newbie
  • *
  • Karma: 0
  • Posts: 15
Can't install text database version - please help
« Reply #10 on: December 17, 2006, 03:26:41 pm »

are any textdbexperts around?

i'm trying to install text db version with my host and getting nowhere.  just a blank screen.  

i've followed all the instructions as far i'm aware, i'm assured by my host that mod_rewrite is enabled and i'm not sure what to do next.  my snews-txtdb.php looks like this (*****) replace usernames etc.....



$s['username'] = "*****"; // Enter your administration username

$s['password'] = "******"; // Enter your administration password



$s['dbname'] = ""; // Database name

$s['dberror'] = "There was an error while connecting to the database.
 Check your database settings."; // Database error message

$s['prefix'] = ""; // Table prefix for multiple sNews systems on one database (if you don't need it just leave it blank)



$s['home'] = "home"; // Enter blog title like home or blog

$s['display_new_on_home'] = False; // Display new articles from all categories on home (True or False)

$s['website'] = "http://www.topsofa.co.uk/"; // Website url with the trailing slash

$s['website_title'] = "Your Site"; // Website title

$s['website_email'] = "********"; // Contact email (info@yoursite.com)

$s['contact_subject'] = "Contact Form"; // Subject of the contact form message

$s['image_folder'] = "img"; // Folder to save images

$s['charset'] = "iso-8859-2"; // Default charset

$s['display_num_categories'] = False; // Display number of articles next to a category name (True or False)

$s['new_timezone'] = "Europe/London"; // Enter you timezome in GMT and please include the + or - sign

$s['date_format'] = "d.m.Y."; // Date format

$s['fp_date_format'] = "d.m."; // Date format for front page articles

$s['comments_order'] = "ASC"; // Order of displaying comments ASC or DESC (DESC - newer ones on top)

$s['results_per_page'] = "100"; // Number of comments to display per page

$s['display_comment_time'] = "YES"; // display date and time on comments (YES or NO)

$s['comment_dt_format'] = "d.m."; // Date and time format for comments

$s['rss_limit'] = "5"; // Limit RSS feed to a number of articles

$s['rss_date_format'] = "l dS \of F Y h:i:s A"; // RSS date format (DATE_RFC822)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.htaccess looks like this

   php_value session.use_trans_sid 0


RewriteEngine On
RewriteRule ^categories/$ index.php?category=categories [L,QSA]
RewriteRule ^contact/$ index.php?category=contact [L,QSA]
RewriteRule ^images/$ index.php?category=images [L,QSA]
RewriteRule ^login/$ index.php?category=login [L,QSA]
RewriteRule ^logout/$ index.php?category=logout [L,QSA]
RewriteRule ^new/$ index.php?category=new [L,QSA]
RewriteRule ^rss/$ index.php?category=rss [L,QSA]
RewriteRule ^unpublished/$ index.php?category=unpublished [L,QSA]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/ index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]

# Uncomment this line if snewsis not in the root direectory
#RewriteBase /snews



i would appreciate any suggestions cos i'm snews seems to be exactly what i've been searching for and i'm ever so keen to get it working

many thanks
david
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Can't install text database version - please help
« Reply #11 on: December 17, 2006, 06:40:48 pm »

Sorry David... I have not done anything with 1.4 txtdb version since the older posts above... I have no interest it at this time.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ld3

  • Newbie
  • *
  • Karma: 0
  • Posts: 15
Can't install text database version - please help
« Reply #12 on: December 18, 2006, 04:16:08 pm »

Quote from: keyrocks
Sorry David... I have not done anything with 1.4 txtdb version since the older posts above... I have no interest it at this time.
thanks anyway.  i've give up on it now.  will go try the new mysql version.
Logged