Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Cannot Login  (Read 6100 times)

neil665

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« on: December 09, 2006, 06:22:27 AM »

I have installed the latest release 1.5 on both my home p.c. and works p.c. [similar specifications],
the installations are both local using XAMPP.
The problem i get is, i cannot get beyond the sNews index.php page, which displays o.k.
When i try to Login i get the following message...

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404

Also, the only way i can get the index.php page to display is by setting the MySQL database [settings table]
username and password with no entries in their respective fields.
And in the snews.php file,  setting the Database Variables as follows...

// DATABASE VARIABLES
function db($variable) {
   $db = array();
   $db['website'] = 'http://localhost/';
   $db['dbhost'] = 'localhost'; //MySQL Host
   $db['dbname'] = 'snews'; //Database Name
   $db['dbuname'] = 'root'; //Database Username
   $db['dbpass'] = ''; //Database password
   $db['prefix'] = ''; //Database prefix
   $db['dberror'] = 'There was an error while connecting to the database.
 Check your database settings.'; //Database error message
   return $db[$variable];
}

I have spent a lot of time trying to set-up this cms, which looks promising and gets very positive reviews.
However at the moment i can go no further until i get this problem sorted out.

Many thanks if you are able to assist, regards Neil.
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
Cannot Login
« Reply #1 on: December 09, 2006, 06:26:16 AM »

quoted from commented snews version ;)
Quote
/*
   - your domain name used sitewide
      - example: http:/www.your-domain-name/
   - if your sNews installation is inside subfolder, include it as well
      - example: http:/www.your-domain-name/subfolder-with-sNews-in-it/
      - please don't forget to modify RewriteBase command in your .htaccess file accordingly if you're using subfolders
   - please don't forget to add that last trailing slash, otherwise your site won't work as expected
   */
   /*
   - "localhost" is a standard offline setup domain name while testing sNews CMS on your local machine
   ("snews" - name of your sNews CMS installation folder)
   */
   $db['website'] = 'http://localhost/snews/';
In short - you're missing installation folder in this line
Quote
$db['website'] = 'http://localhost/';
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

neil665

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« Reply #2 on: December 11, 2006, 10:32:48 AM »

Hello Rijeka
Many thanks for your quick response, its very kind of you,
however i still cannot login from the main page.

This is the warning message i get...

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
12/11/06 09:27:30
Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0

Here are my settings,

snews.php...
// DATABASE VARIABLES
function db($variable) {
   $db = array();
   $db['website'] = 'http://localhost/sNews15/';
   $db['dbhost'] = 'localhost'; //MySQL Host
   $db['dbname'] = 'snews'; //Database Name
   $db['dbuname'] = 'root'; //Database Username
   $db['dbpass'] = ''; //Database password
   $db['prefix'] = ''; //Database prefix
   $db['dberror'] = 'There was an error while connecting to the database.
 Check your database settings.'; //Database error message
   return $db[$variable];
}

.htaccess...

    php_value session.use_trans_sid 0

RewriteEngine On
RewriteBase /sNews15
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?category=$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]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1 articlespage=$2 [L]

MySQL Database (Settings Table)...
22 username...field empty
23 password...field empty

Many thanks if you are able to help me out.
Kind regards Neil
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
Cannot Login
« Reply #3 on: December 11, 2006, 11:01:07 AM »

Hi, and welcome Neil...

Have you triedout, Key's XAMPP guide to get sNews operating on a local server ? http://snews.ca/installs/install-snews-1.5/
Logged
"It's only dead fish that goes with the flow... "
Updated

neil665

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« Reply #4 on: December 11, 2006, 01:10:54 PM »

Hello Patric
Many thanks for your reply and information.
The database has been created, and populated with tables.
I have altered line 118 in httpd.conf file, and removed #,
however after re-starting Apache Server, i still cannot login.
Many thanks Neil
Logged

smartalex

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« Reply #5 on: December 13, 2006, 12:03:35 AM »

I just downloaded the App too. It appears that the 1.5 zip file doesn't contain a login file or directory...

[root@server httpdocs]# unzip sNews15.zip
Archive:  sNews15.zip
  inflating: sNews15/.htaccess
  inflating: sNews15/index.php
  inflating: sNews15/readme.html
  inflating: sNews15/snews.php
  inflating: sNews15/style.css

I think that this is the same problem that you are having. I am looking into this more now.
Logged

smartalex

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« Reply #6 on: December 13, 2006, 12:20:34 AM »

check this out: http://forum.solucija.com/viewtopic.php?pid=17486#p17486

Quote from: bramsyuur
Hello Rocco and welcome to our sNews community!  :D (Never I've say this before...  :P )
Well. If you can access via http://yoursite/index.php?action=login obviously your problem is .htaccess file. Maybe
your RewriteBase don't point to the correct folder or is not recognized by Apache. Try a search into this forum about htaccess and check this tread, too, for possible another issue http://www.solucija.com/forum/viewtopic.php?pid=9802#p9802.
Thanks,
bram.
I was just missing my .htaccess file. I guess I missed that when moving everything out of the sNews directory to the httpdocs directiory.
Logged

neil665

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« Reply #7 on: December 13, 2006, 10:15:22 AM »

I can also access via http://yoursite/index.php?action=login,
and can add / delete / edit  text to the database from the browser.
However i still cannot login from the sNews home page, and the links also do not work.

This is the top of my snews.php...
// DATABASE VARIABLES
function db($variable) {
   $db = array();
   $db['website'] = 'http://localhost/sNews15/';
   $db['dbhost'] = 'localhost'; //MySQL Host
   $db['dbname'] = 'snews15'; //Database Name
   $db['dbuname'] = 'root'; //Database Username
   $db['dbpass'] = ''; //Database password
   $db['prefix'] = ''; //Database prefix
   $db['dberror'] = 'There was an error while connecting to the database.
 Check your database settings.'; //Database error message
   return $db[$variable];
}

I have altered .htaccess as follows...

    php_value session.use_trans_sid 0

RewriteEngine On  
RewriteBase /sNews15/      
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?category=$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]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1 articlespage=$2 [L]

and altered .httpd.conf as follows...
Line 118...LoadModule rewrite_module modules/mod_rewrite.so
and
Line 186...
Line 187...   Options FollowSymLinks
Line 188...   AllowOverride All
Line 189...


Now that i can access / retrieve database content i am moving forward slowly,
and seem to be at the final hurdle of the puzzle.
Hope to get sNews working soon and it looks like a very good cms.
Best regards to all Neil.
Logged

neil665

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
Cannot Login
« Reply #8 on: December 14, 2006, 09:45:45 AM »

Upgraded from XAMPP v 1.5.1 to XAMPP v 1.5.5
and sNews now works.
Many thanks for assistance Neil
Logged