Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5

Author Topic: sNews1.4-txtdb  (Read 37683 times)

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #15 on: March 07, 2006, 07:29:10 PM »

there is no need to give the db a name, but if you look in snews-txtdb.php, it allows you to change some information concerning the db

like this:  
Code: [Select]
$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)

This is from line 26-28 of snews-txtdb.  You can give it a name if you want, and if you run multiple snews-txt.php, it is easier with multiple names, but it is not required if you use only one.

As for the .htaccess thing, that is the same one that comes with sNews14 (mysql), so I am not sure, since I ain't the greatest at the .htaccess stuff.
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #16 on: March 07, 2006, 07:37:48 PM »

dobey! thanks for your help...I'll persevere  ;)

tim0fee
Logged

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #17 on: March 08, 2006, 01:22:53 PM »

Waaaaaaaaaaaahhhh!  ???
 

SEFs seem OK now but new articles keep defaulting to future posting (which isn't working for me anyway) and/or just vanishing for no good reason!!! lol

So confused now. Also if I try to delete my installation of sNews14-textdb to start over again it refuses me permissions to change/modify/delete anything inside the 'db' folder. How on earth do I start again with a clean install.

And I thought I knew sNews...Mwahaha!

Any help from the pros appreciated  ;)

tim0fee

Logged

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #18 on: March 08, 2006, 02:37:57 PM »

tim0fee are you using Linux? or Windows
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #19 on: March 08, 2006, 02:54:49 PM »

dobey !

yuppah - it's Linux running Apache1.3.33/PHP 4.4.1 with mod_rewrite ON!

I've had sNews 1.4 running fine on it... ???

tim0fee
Logged

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #20 on: March 08, 2006, 03:02:13 PM »

k, to delete the data folder, in a console as root type

Code: [Select]
rm -rf {web-root}/snews/inc/dbs

That fixes it, or add you as a member of the web servers group.  Permissions are a fun thing.

If sNews 1.4 works, is it with the same .htaccess that comes with the package, or is it the old one.  Because the only thing changed with sNews-txtdb is the calls to MySQL and some of the SQL-syntax for categories ( Home being category 0 needs to be created before it will work.) Other than that the sNews-txtdb is the same as the MySQL version.  None of the sNews functions have been modified only the calls to the database.

cheers
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #21 on: March 08, 2006, 03:06:17 PM »

Quote from: jacmgr
I've had similar problems with disappering post and with future post.  I can not determine a pattern for the problem yet!  If you wantto try adding posts etc... here is my install.    (you see "the second article" is disappeared!)
http://www.delferro.net/snews

John

Hey John

Just added a post using the future posting and it works, however I noticed that it is displaying the article in the count for articles but the article doesn't appear because it is not published yet.  

Is that what you mean?

I'll look at the code, and see if I can fix the count thing for the categories and post a fix here.
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #22 on: March 08, 2006, 03:09:40 PM »

thanks dobey

Lordy ! I don't know how to use console  :-[ - I am using FETCH FTP (on Mac) The .htaccess that came with the package wouldn't work for me so I had to use this one posted elsewhere on the board for installtions within a folder within root:

#
    #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 following line if your webserver's URL
#  is not directly related to physival file paths.
#  Update Your Directory (just / for root)

RewriteBase /sNews14-txtdb

--------

Is this OK ?

tim0fee
Logged

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #23 on: March 08, 2006, 03:17:28 PM »

.htaccess looks fine.

try to change the folder permissions through FetchFTP (DO NOT KNOW PROAGRAM), and see if you can make it world writtable (777).  If not I could try and code a quick chmod script that might work.

I had the permissions problems with sNews1.3-txtdb as well on one occurance, and it was an easy fix.

On the Linux system, what Desktop are you running (KDE,GNOME,XFCE,FLUXBOX,..........) ?  This may haelp me find a fix for you getting rid of the folder that is causing the problem.
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #24 on: March 08, 2006, 03:25:26 PM »

Quote from: jacmgr
I've had similar problems with disappering post and with future post.  I can not determine a pattern for the problem yet!  If you wantto try adding posts etc... here is my install.    (you see "the second article" is disappeared!)
http://www.delferro.net/snews

John


Okay the showing of articles in category numbers when they are unpublished should be fixed by this.


line: 527

change
Code: [Select]
$calc_num_query = "SELECT * FROM " .s('prefix'). "articles WHERE position = 1 AND category = $r[id]";
to this
Code: [Select]
$calc_num_query = "SELECT * FROM " .s('prefix'). "articles WHERE position = 1 AND published <> 0 AND category = $r[id]";

That stops the article from being counted when it is not published or future posted.

Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #25 on: March 08, 2006, 03:43:51 PM »

k thanx dobey

I am on Mac OSX 10.3.9 connecting to my remote server via FETCH FTP - (don't understand the desktop thingy u mention  ??? although my phpinfo file tells me it is powered by 'Zend' - whatever that is!) I can change the permissions to 777 via FTP for my sNews14-textdb folder but it still won't allow me to delete anything in the 'inc/db' folder.

tim0fee
Logged

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #26 on: March 08, 2006, 03:45:34 PM »

try changing the permission to 777 for the inc/db folder?
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #27 on: March 08, 2006, 03:59:02 PM »

yuppah,

can do that but I now see that it is the three .txt files (articles, comments, categories) within 'db' folder that are refusing me deletion and/or permission change! lol

tim0fee
Logged

tim0fee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 71
sNews1.4-txtdb
« Reply #28 on: March 08, 2006, 04:22:41 PM »

k dobey

I tried a completely fresh install to a new folder using the .htaccess file you OKd and with the modded line 527 in snews14-txtdb.php file.

I added an article then logged out. The Article was there along with the link OK ! Then I logged back in - attached an image (by now the 'enable future posting' checkbox has vanished btw) then logged out. The article and image has disappeared. If I go into the 'inc/db' folder and look at the file 'articles.txt' it is BLANK!

Arrrrgh!  :o

tim0fee
Logged

Rod

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 78
    • http://www.rjs-custom.com
sNews1.4-txtdb
« Reply #29 on: March 08, 2006, 04:32:04 PM »

tim0fee

for the fix to remove the older txt files from the other folder, use this.

Code: [Select]

function s($variable) {
$s = Array();

// Database prefix
$s['prefix'] = "";

return $s[$variable];
}

// remove articles
@unlink(s('prefix')."articles.txt");

// remove categories
@unlink(s('prefix')."categories.txt");

// remove comments
@unlink(s('prefix')."comments.txt");

?>

fill in the database prefix if you use one and save it in the folder where the txt files are, then open the file in a browser.  All the text files should be gone, then you can delete the inc/dbs folder.

for the new issue it seems more like the web server settings than sNews because it works here with php4 and php5, as well as with lighttpd, can't seem to understand how this is, but which version of Linux is the server running (RedHat, Suse, Slackware), it may be the options that they use in building PHP, or the way the server is setup?
Logged
Whatever went wrong, I am pretty sure I didn't do it!  Well atleast I think I didn't do it...
Pages: 1 [2] 3 4 5