Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [STICKY] - ERROR MESSAGES: Causes and Possible Solutions  (Read 5209 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[STICKY] - ERROR MESSAGES: Causes and Possible Solutions
« on: December 09, 2006, 06:35:24 PM »

This topic string has been started as a place to post Error Messages and possible solutions that are encountered by sNooze Users during their setup and use of sNews 1.5. If you come across any other Error Messages while setting up or using sNews 1.5, please post them in this Topic using the same format. This will assist other sNoozers in troubleshooting their Error Messages in future.

---------------------------------------------------------------------------------------------------------------------------------------------------

Home Page with no CSS and Links = "Object not found, Error 404"
Probable Cause - The website variable setting in snews.php is not correct. It may be missing a folder name or the forward slash is missing at the end.
Possible Solutions:
Check to ensure your URL is complete and the foward slash is in place at the end.
Example - $db['website'] = 'http://www.your-domain.com/';
If your site is in a folder within the server's root directory, the URL needs the folder name in it too.
Example - $db['website'] = 'http://your-domain.com/snews-folder-name/';

---------------------------------------------------------------------------------------------------------------------------------------------------

There was an error while connecting to the database.
Check your database settings.
Probable Cause - The dbname variable setting in snews.php is not correct.
Possible Solution - Check to make sure the setting is exactly the same as the name you gave your database when you created it.

---------------------------------------------------------------------------------------------------------------------------------------------------

Warning: mysql_fetch_array():
You get one, two, three or more warning lines in your Home page that all point to different line numbers in the snews.php file... one example being:
Quote
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\xampp\htdocs\snews153\snews.php on line 1684
Probable Cause - This usually happens when a query within a particular function (in snews.php) cannot find the data it is looking for in the database. When you get several messages pointing to several lines within the snews.php file... that means there are several queries (possibly in several functions) that cannot find their data in the database. The problem could be that the database is corrupt or not compatible with your installation (dbase for the wrong version), or that table-names are incorrect, or that the tables are not prefixed properly.
Possible Solutions
1. If you have been saving back-ups of your database on a regular schedule, try restoring your database with your latest backup.
2. If you upgraded your sNews files to a newer version but did not update the database as well, you may need to delete your dbase tables and create the new ones for your sNews version.
3. If you have added a prefix to your table-names in the database, you also need to make sure you have added that to the prefix variable in snews.php.

---------------------------------------------------------------------------------------------------------------------------------------------------

Warning: mysql_connect() [function.mysql-connect]: ........
Warning: mysql_select_db() [function.mysql-select-db]:  .........
Warning: mysql_select_db() [function.mysql-select-db]:  .........
   There was an error while connecting to the database.
   Check your database settings.

Probable Cause & Solution - The dbpass or dbname or dbhost variable setting(s) in snews.php is/are incorrect. Check to ensure that these settings are exactly as those in the database you created.

---------------------------------------------------------------------------------------------------------------------------------------------------

Object not found! Error 404:
Your site's Home Page displays but you get this message when you click on any links from the Home Page.
Probable Cause - The RewriteEngine On line is missing or not enabled in your .htaccess file. Or, your .htaccess file is not active, present, or not working at all.
Possible Solution - Check to see that your .htaccess file is located in your sNews site's root directory or folder, and that the RewriteEngine On line is present and enabled.

---------------------------------------------------------------------------------------------------------------------------------------------------

Server error!
The server encountered an internal error and was unable to complete your request.

Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
ERROR 500
Probable Cause - You have added a string to the .htaccess file that interrupts the parsing sequence of the default sNews directives in the file. Or, something has changed that is affecting an existing directive.
Possible Solution Remove the offending string(s) or refresh the file with a new default copy.

---------------------------------------------------------------------------------------------------------------------------------------------------

If you come across any other Error Messages while setting up or using sNews 1.5, please post them in this Topic using the same format. This will assist other sNoozers in troubleshooting their Error Messages in future.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
[STICKY] - ERROR MESSAGES: Causes and Possible Solutions
« Reply #1 on: December 11, 2006, 07:40:40 PM »

-----------------------------------------------------------------------------------------------------------------------------------------------------

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in (url) on line (number)

Probable cause - Dreamweaver, MS Word, Frontpage or similar application, e.g not a good text editor, has been used to edit snews.php.
Possible solution - Use a good text editor. Tips on good text editors for the big OS's can be found in the Resources area.

-----------------------------------------------------------------------------------------------------------------------------------------------------
Logged

MXMaster

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
[STICKY] - ERROR MESSAGES: Causes and Possible Solutions
« Reply #2 on: December 15, 2006, 02:20:40 PM »

----------------------------------------------------------------------------------------------------------------------------------------------

Error 500 - Internal Server Error - when .htaccess is being used
You have set everything up correctly and have checked you can use your own .htaccess files on your server & have Mod_rewrite enabled yet sNews still doesn't function.

Cause
Sometimes this section of the .htaccess file is not allowed on some web hosts servers:
Quote

    php_value session.use_trans_sid 0
Solution
Try amending the top of the .htaccess file to this:
Quote
#
#    php_value session.use_trans_sid 0
#
Add a # to the first 3 lines of code.

Yours, MXMasterİ

    ------------------------------------------------------------------------------------------------------------------------------------------------

steviemorris

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
[STICKY] - ERROR MESSAGES: Causes and Possible Solutions
« Reply #3 on: June 16, 2007, 06:44:21 AM »

can someone point me a copy of .htaccess file I can use - mine is blank.

my problem is this:

When i Click on login,??I get this:      Not Found??The requested URL /login/ was not found on this server.??Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.??Why??

(Object not found! Error 404:
Your site's Home Page displays but you get this message when you click on any links from the Home Page.
Probable Cause - The RewriteEngine On line is missing or not enabled in your .htaccess file. Or, your .htaccess file is not active, present, or not working at all.
Possible Solution - Check to see that your .htaccess file is located in your sNews site's root directory or folder, and that the RewriteEngine On line is present and enabled.)

And how/where do I check my server has the mod_rewrite ON?
Logged

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[STICKY] - ERROR MESSAGES: Causes and Possible Solutions
« Reply #4 on: June 16, 2007, 07:25:41 AM »

what do you mean your htaccess is blank?  The htaccess file you require is part of the sNews download package.
Are you by any chance using a Mac?

As for mod-rewrite, you will need to contact your hosting provider to find out if it is on.

Please don't post any further in this thread.  Keep ypur posts in your original thread.  Thanks.
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future