Jump to content


Xampp


6 replies to this topic

#1 sofiano

    Young Padawan

  • Members
  • Pip
  • 68 posts
  • Gender:Male

Posted 27 November 2007 - 05:00 AM

hey
I'm a newbie to php & mysql ! don't smash me with your shoe :huh:
anyway, yestorday I have installed Xampp because i been told it's a great program that will do Mysql, Php and Apache for you ...
Well now i got xampp running in C:\ ... etc i navigate through the folder and it was a lot of files in it, Well I know that, to display my php webpages they will need to be in the doc folder and view them in my browser ( localhost ) but my issue is that I already have an HTML website with 60 pages ( template.dwt & css ) don't blame me if i use frontpage but anyway now i want to get my site running under a Mysql & php system because it needs updates everyday !!

so what am asking is, if someone could help me transfer my site from html to php & MYSQL using Xampp PLEASE ...

thanks in advance and I really apreciate :)

#2 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 27 November 2007 - 09:26 AM

Hi there,

first off, I think you have to put your files in the 'htdocs' folder instead of the 'doc' folder (wich I didn't even find in my installation). ;-)

Second, you can't "convert" HTML pages tot PHP/MySQL. The bad news for you my friend is that you might have to rewrite most of your website!

You want to write a CMS (Content Management System) that makes sure all the content of your pages is saved in the MySQL database and retrieved when asked for. You can find plenty of information around PHP CMS's on Pixel2Life tutorials. It's slightly too big for me to write down here :-)

If you really are unexperienced I could recommend using a pre-coded CMS, such as PHPNuke, Postnuke, Drupal, ...
They're only a Google away ;-)


Greetings



Bart

#3 sofiano

    Young Padawan

  • Members
  • Pip
  • 68 posts
  • Gender:Male

Posted 27 November 2007 - 10:19 AM

View Postdotbart, on Nov 27 2007, 09:26 AM, said:

Hi there,

first off, I think you have to put your files in the 'htdocs' folder instead of the 'doc' folder (wich I didn't even find in my installation). ;-)

Second, you can't "convert" HTML pages tot PHP/MySQL. The bad news for you my friend is that you might have to rewrite most of your website!

You want to write a CMS (Content Management System) that makes sure all the content of your pages is saved in the MySQL database and retrieved when asked for. You can find plenty of information around PHP CMS's on Pixel2Life tutorials. It's slightly too big for me to write down here :-)

If you really are unexperienced I could recommend using a pre-coded CMS, such as PHPNuke, Postnuke, Drupal, ...
They're only a Google away ;-)


Greetings



Bart
hey there thanks for your reply ...
well yeah i want to rewrite the hall site, its ok, i still have got the images/graphiques and infos .. etc
so what should i do ?
should i use dreamweaver or can i just use frontpage and save them as .php ?
also when am rewriting everything how do i connect my site to a database sql ..
thanks

#4 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 27 November 2007 - 11:51 AM

You can use any editor you want, wether it's Dreamweaver, Frontpage, Notepad, .. as long as you work in 'Code' view instead of 'Design' view (dreamweaver). Seeing as we're going to write code :-)

Creating a CMS is quite a project for a PHP-starter but definetly not impossible!!
It consists of a few steps:

1. Figuring out a database model (tables)
2. Creating a PHP script to display the contents of the database
3. Creating an administration to edit/delete/add content to the database
4. Applying the scripting to your general design (this is where Dreamweaver might come in handy)

This is the general order of things when I make a CMS, some people might start of with the design at first to start adding the PHP later... Your choice.


A thing about PHP is that it is embedded in the HTML code, or the other way around.
example:
<html>
<head>
</head>
<body>
<?php
//Start of PHP code
echo "hi";
?>
</body>
</html>

Meaning that connecting to the PHP script is not a function in Frontpage/Dreamweaver/... but is a function you should call in your PHP-script itself (function being: mysql_connect($host,$username,$password); )

I don't know your experience level in PHP but I'm guessing not too very much :-)
I'd recommend using a tutorial as the following to start you off with the CMS, and let you have a look at the code and the way it is implemented: http://wd.spangsolutions.net/tutorials.php?a=view&id=18
or http://www.shadow-fox.net/site/tutorial/39...CMS-For-a-Table to help you along.


Greets



Bart

#5 _*Creative Insanity_*

  • Guests

Posted 27 November 2007 - 12:33 PM

Personally I prefer apache2triad for a windows based thing, but if you have a spare system try my tut on creating a Linux development server.

#6 sofiano

    Young Padawan

  • Members
  • Pip
  • 68 posts
  • Gender:Male

Posted 27 November 2007 - 03:18 PM

View Postdotbart, on Nov 27 2007, 11:51 AM, said:

You can use any editor you want, wether it's Dreamweaver, Frontpage, Notepad, .. as long as you work in 'Code' view instead of 'Design' view (dreamweaver). Seeing as we're going to write code :-)

Creating a CMS is quite a project for a PHP-starter but definetly not impossible!!
It consists of a few steps:

1. Figuring out a database model (tables)
2. Creating a PHP script to display the contents of the database
3. Creating an administration to edit/delete/add content to the database
4. Applying the scripting to your general design (this is where Dreamweaver might come in handy)

This is the general order of things when I make a CMS, some people might start of with the design at first to start adding the PHP later... Your choice.


A thing about PHP is that it is embedded in the HTML code, or the other way around.
example:
<html>
<head>
</head>
<body>
<?php
//Start of PHP code
echo "hi";
?>
</body>
</html>

Meaning that connecting to the PHP script is not a function in Frontpage/Dreamweaver/... but is a function you should call in your PHP-script itself (function being: mysql_connect($host,$username,$password); )

I don't know your experience level in PHP but I'm guessing not too very much :-)
I'd recommend using a tutorial as the following to start you off with the CMS, and let you have a look at the code and the way it is implemented: <a href="http://wd.spangsolutions.net/tutorials.php?a=view&id=18" target="_blank">http://wd.spangsolutions.net/tutorials.php?a=view&id=18</a>
or <a href="http://www.shadow-fox.net/site/tutorial/39-Creating-A-Scaffold-like-Class-in-PHP-or-An-Automatic-CMS-For-a-Table" target="_blank">http://www.shadow-fox.net/site/tutorial/39...CMS-For-a-Table</a> to help you along.


Greets



Bart
THANKS A LOT MAN, that was so helpfull ...
i have tried one of those tutorials and i have rished to that part where i need to connect the database, well i have created the tables ... etc but how do i get the password and username for the mysql tables !! am so sorry, am so new to this :lol:
thanks in advance

#7 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 27 November 2007 - 03:26 PM

Allright,
MySQL uses users wich have permissions, sort of like a Linux Operating System. To my experience, if you open phpMyAdmin in XAMPP the 'root' account is enabled and used by phpmyadmin. This allowed you to make your tables. What you want to do is go to your phpMyAdmin (http://localhost/phpmyadmin/) click on 'Permissions' (I think it's called like that, I have the dutch version, should be a little man with a padlock in front of it as icon) click 'create new user' and grant him acces rights to everything.

There you can give that user a username and password.
I assume you're the only person that's going to use the server but you should be carefull wich user you give wich rights seeing as people might abuse your server ;-)


Anything else, just pm me





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users