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.

Pages: [1] 2 3

Author Topic: xampp  (Read 8744 times)

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
xampp
« on: June 13, 2008, 12:58:08 am »

I am fairly new to php and mysql... but is there anyone that is using xampp on their own pc to work on there sNews?
I am trying to get myPhpadmin databases set up and I am having problems importing.  Is there something that I am possibly missing?
Thanks in Advance from a true php-Rookie
PTMac
Logged

centered

  • Guest
Re: xampp
« Reply #1 on: June 13, 2008, 01:31:07 am »

What seems to be the problem you are having specifically?

The problem I usually see is mod_rewrite:

mod_rewrite - turn off apache and mysql, then go to xampp\apache\conf\httpd.conf and find the word rewrite.  Delete the # in front of that line and turn on apache and mysql.  rewriting solved.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: xampp
« Reply #2 on: June 13, 2008, 02:22:35 pm »

Can I work with sNews Locally? introduces you to XAMPP, one of the free "localhost" server bundles available. This short tutorial - Installing XAMPP for WinXP although it was written some time ago (before 1.6) - will walk you through the steps of installing it and creating your first database and it applies equally no matter which version of sNews you are working with.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #3 on: June 13, 2008, 03:28:59 pm »

I went through the steps and got to the create a database for my snews.  and I am a bit lost..  I go into phpMyAdmin and try to Import.. but it wants a txt file.  where do I find that.. or am I looking for the wrong file to improt.?
Thanks guys
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: xampp
« Reply #4 on: June 13, 2008, 03:38:36 pm »

I went through the steps and got to the create a database for my snews.  and I am a bit lost..  I go into phpMyAdmin and try to Import.. but it wants a txt file.  where do I find that.. or am I looking for the wrong file to improt.?
Thanks guys

When using the IMPORT approach, you would need to have first created an .sql file that contains the script to create the tables... and then IMPORT that file. In other words, you can only IMPORT and SQL file. You can copy & paste the script for the tables into a NotePad file and save it (into an SQL folder) as a .txt file and try changing the extention afterwards from .txt to .sql or... better yet... if your "good code editor will do it... create a file in there and save it with the .sql extension... then try IMPORT-ing it.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #5 on: June 13, 2008, 03:57:17 pm »

thank you for  your help.
I created a new file just like the one on the installing database page.  it worked so it is off to the next step.
I am really a rookie and and was not sure where to post etc.
php etc.  is new to me and I think that sNews will really work well for what we will be doing.
That is if I can get sNews to work here on xampp.
PTMac
Logged

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #6 on: June 13, 2008, 07:13:06 pm »

ok don't know what I did or how I did it, but... I can't view or open sNews.  back to the drawing board. 
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: xampp
« Reply #7 on: June 14, 2008, 03:39:13 pm »

ok don't know what I did or how I did it, but... I can't view or open sNews.  back to the drawing board. 

If you did get your database created and the tables were listed in the database after running the IMPORT file... then the next problem might be in getting the database configuration settings right in the top of the news.php file. If your project folder in the xampp/htdocs folder is snews16 and your database name is snews16 then they would be:

   $db['website'] = 'http://localhost/snews16/'; // the URL path to your site's home page
   $db['dbhost'] = 'localhost'; // MySQL Host - stays the same for all projects in the htdocs folder
   $db['dbname'] = 'snews16'; // Database Name - whatever name you give to your database when creating it
   $db['dbuname'] = 'root'; // Database Username - always the same by default unless you create a new user
   $db['dbpass'] = ''; // Database password - always empty by default unless you create a new user with a password
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #8 on: June 25, 2008, 11:36:58 pm »

Sorry havent been online of late due to medical issues... but have it somewhat under control.
Here are my problems and or what I have.

When going into phpMyadmin this is what I see:
 
Table Action  Records  Type Collation Size Overhead
 articles        0 MyISAM utf8_bin 1.0 KiB -
 categories        0 MyISAM utf8_bin 1.0 KiB -
 comments        0 MyISAM utf8_bin 1.0 KiB -
 settings        25 MyISAM utf8_bin 2.8 KiB -
 4 table(s)  Sum 25 MyISAM utf8_bin 5.8 KiB 0 B
 Check All / Uncheck All  With selected: Empty Drop Print view Check table Optimize table Repair table Analyze table

So the way I see it is, I have created the database but it is basically empty.

now in my snews.php has these lines in it
   $db['website'] = 'http://localhost/sNews16/';
   $db['dbhost'] = 'localhost'; //MySQL Host
   $db['dbname'] = 'snews1'; //Database Name
   $db['dbuname'] = 'root'; //Database Username
   $db['dbpass'] = 'password'; //Database password
   $db['prefix'] = ''; //Database prefix

now I just cant get anything to open up.    when I try to open the localhost/snews16 I just get a index of that directory.
I would appreciate any help that anyone can give me.

Thanks
Pat
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: xampp
« Reply #9 on: June 26, 2008, 02:34:16 pm »

Sorry havent been online of late due to medical issues... but have it somewhat under control.
When I try to open the localhost/snews16 I just get a index of that directory.
I would appreciate any help that anyone can give me.

Thanks - Pat

@ Pat... after installing XAMPP... did you go into the xampp//apache/conf/httpd.conf file and enable the mod_rewrite module? This must be enabled... and it is not enabled by default (it wasn't in the packages I've installed).

1 - If you already have xampp running... open its little interface panel and stop Apache and MySQL (turn the servers off).

2 - Open the file in your good code editor... scroll down to around line 118 (maybe a little further) and look for this string:
          #LoadModule rewrite_module modules/mod_rewrite.so
     and remove the # sign at the start of it. This activates the string and the module. Save the changes.

3 - Re-start Apache and MySQL again. Test your project to see if it works better... it should if the module was not enabled beforehand.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #10 on: June 26, 2008, 05:31:44 pm »

GM Keyrocks

I have double checked the line that you suggested and it has been disabled.
Man I thought this php and mysql was suppose to be easy.
Any other thoughts?
Or maybe I should start from scratch yet again.?

Thanks again
Pat
« Last Edit: June 26, 2008, 05:55:07 pm by ptmac »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: xampp
« Reply #11 on: June 26, 2008, 06:16:32 pm »

GM Keyrocks

I have double checked the line that you suggested and it has been disabled.
Man I thought this php and mysql was suppose to be easy.
Any other thoughts?
Or maybe I should start from scratch yet again.?

Thanks again - Pat

You say... "it has been disabled"?
Then follow the steps again and REMOVE the #-sign from the front of it - to ENABLE it. It must be enabled.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #12 on: June 26, 2008, 06:20:50 pm »

I have removed the (#) and saved the file yet I still get the same out come. 
The only thing that I can get to come up in Inernet explorer when I load,http://localhost/snews1/ is  a error message.

Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

Thanks for the quick reply
P
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: xampp
« Reply #13 on: June 26, 2008, 07:41:32 pm »

OK... then we might assume that the "server" itself is working since it is serving error messages.
Let's run through a few more checks.

1. Have you put your sNews file-set within a folder called "snews1"... and is this folder located in the xampp/htdocs folder?

2. In the top of your snews.php file (located in "snews1")... in the //DATABASE VARIABLES section... have you configured your database settings?
   They should look like:

Code: [Select]
<?php

$db['website'] = 'http://localhost/snews1/';    # LOCATION OF SNEWS FILE-SET - WITH THE SLASH FTER FOLDER NAME
$db['dbhost'] = 'localhost';    # MySQL Host - ALWAYS THE SAME BY DEFAULT WITH XAMPP
$db['dbname'] = 'insert_database_name_here';    # NAME OF YOUR DATABASE
$db['dbuname'] = 'root';    # Database Username - ALWAYS THE SAME BY DEFAULT IN XAMPP - unless you changed it manually
$db['dbpass'] = '';    # Database password - ALWAYS EMPTY BE DEFAULT IN XAMPP - unless you created a NEW USER

?>

« Last Edit: June 26, 2008, 07:44:04 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ptmac

  • Newbie
  • *
  • Karma: 0
  • Posts: 17
Re: xampp
« Reply #14 on: June 26, 2008, 09:25:48 pm »

ok  this is what I have

xampp\htdocs\snews1
in there there are 2 files  snews1.sql  and snews.php
under the directory of snews1 I have \snews16 and under it is \_MACOSX  which is empty and under it is \snews16 again with 4 files

this is what my snews.php looks like

// DATABASE VARIABLES
function db($variable) {
   $db = array();
   $db['website'] = 'http://localhost/sNews16/';
   $db['dbhost'] = 'localhost'; //MySQL Host
   $db['dbname'] = 'snews1'; //Database Name
   $db['dbuname'] = 'root'; //Database Username
   $db['dbpass'] = ''; //Database password
   $db['prefix'] = ''; //Database prefix

Pat
Logged
Pages: [1] 2 3