PDA

View Full Version : Learning LAMP


scoblitz
12-28-2006, 06:02 PM
I've come to the conclusion that I want to familiarize myself with Linux, specifically setting up an environment that I can use to learn to develop PHP / database web sites.

I set up an older box with ubuntu and the auto lamp setup but am now pretty much staring at a console prompt. I've picked up some basic navigation and file management commands but am otherwise feeling a bit overwhelmed and well, lost :huh:.

Any hints or suggestions on resources / tutorials that I can use. I've been looking through the apache and mysql sites and they both seem to assume a level of familiarity that I just don't have.

I don't mind pouring through docs and stuff, that is actually how I learn best.

Thanks
SB

Ludwig van Jaethoven
12-28-2006, 07:18 PM
Honestly, your best bet would probably be installing linux, Apache, PHP and mySQL on your own.

Tutorials for installing each are pretty common and useful and the experience would probably gain you the familiarity you think you're currently lacking.

That said, if you haven't already learned it 'man' is your friend. 'man ls' for example will tell you everything you never cared to learn about the 'ls' command.

What, specifically, is tripping you up at the moment? Perhaps I or someone else here could give you a better kick in the right direction.

scoblitz
01-02-2007, 10:26 AM
I guess my next step would be to create the actual file structure to mirror the site hosting.

Perhaps I'll try again and do the whole thing from scratch

Thanks
SB

sonnik
01-05-2007, 05:38 PM
I wouldn't go through all that trouble. You can actually install php and mysql manuals off of your web's root (generally /var/www/html).

1. Learn how to create a simple php "Hello, World!" web page.
2. Learn how to create a basic mysql table, users, and permissions.
3. Learn how to embed/modify the php code (or similar to) below into a php page to reference the database.

This code snip is pulled from the "PHP Manual" - if you don't install it locally - you can Google for the term for a very good assortment of sites hosting the same material.


<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);

echo $row[0]; // 42
echo $row[1]; // the email value
?>