LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-22-2013, 02:48 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,449

Rep: Reputation: 36
Lightbulb Best way to start learning PHP, and therefore Apache and MySQL


Hello everyone. Just looking for some guidance here. I'm going to have to inherit some websites that are written in PHP that access some MySQL databases. I can't say I know much or where to start with learning PHP, the Apache that hosts the site, or MySQL that contains the data.

Simply Google'ing learn PHP, Apache, MySQL presents an overwhelming number of options. Any tips on where to start? Any good links for a beginner you would recommend that I should start with?

Programming isn't totally foreign to me, but never done anything with PHP exactly, and definitely have no idea where to start with Apache and MySQL.

Thanks in advance for any words of wisdom.
 
Old 10-22-2013, 03:32 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Philly, PA
Distribution: Kubuntu x64, RHEL, Fedora Core, FreeBSD, Windows x64
Posts: 1,422
Blog Entries: 33

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
XAMPP is a good start as a local app server with apache+mysql with php built-in for playing around.

PHP at w3schools is a good start.
 
1 members found this post helpful.
Old 10-22-2013, 04:02 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,449

Original Poster
Rep: Reputation: 36
Great, thanks sag, i'll check them out.
 
Old 10-22-2013, 04:09 PM   #4
sparvin
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Rep: Reputation: 7
Quote:
Originally Posted by sag47 View Post
XAMPP is a good start as a local app server with apache+mysql with php built-in for playing around.

PHP at w3schools is a good start.
On the first point, I completely agree. On the second, I contest.

The way I learned was by reading small snippets of code and trying them out in the XAMPP environment to see what it did (this is also how I learned HTML). When I had a question about what a PHP function would do, I looked it up in the docs at php.net. It's excellent documentation with a good search function on the site. I've discovered that w3schools is just about useless when trying to learn anything useful.

BTW, I didn't learn SQL in a conventional way. I worked at a job where I had to occasionally sort and re-format price-lists by hand. For the smaller lists (less that 65,535 lines) I used Excell '97, but for the bigger lists, I imported the list into a table in a new Access database, and used the GUI to sort and re-format the table. That's what got m e familiar with the SELECT, FROM and WHERE clauses. Learning how to connect PHP with MySQL was easy once I was used to the PHP docs.
 
3 members found this post helpful.
Old 10-22-2013, 07:07 PM   #5
sag47
Senior Member
 
Registered: Sep 2009
Location: Philly, PA
Distribution: Kubuntu x64, RHEL, Fedora Core, FreeBSD, Windows x64
Posts: 1,422
Blog Entries: 33

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
Originally Posted by sparvin View Post
The way I learned was by reading small snippets of code and trying them out in the XAMPP environment to see what it did (this is also how I learned HTML). When I had a question about what a PHP function would do, I looked it up in the docs at php.net. It's excellent documentation with a good search function on the site. I've discovered that w3schools is just about useless when trying to learn anything useful.
I agree with this assessment. I don't think I've ever actually learned a language by using a tutorial myself. It has always been hacking on pre-existing code or checking out and learning the source of projects at sourceforge or github.
 
1 members found this post helpful.
Old 10-23-2013, 05:21 AM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Indeed the php.net docs is full of example code; actually, the MySQL home site docs are pretty good in this respect also.
http://www.php.net/manual/en/
http://dev.mysql.com/doc/refman/5.1/en/
 
1 members found this post helpful.
Old 10-23-2013, 08:22 AM   #7
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,449

Original Poster
Rep: Reputation: 36
I'm in the same boat as you guys, usually my venture into a language starts with having to hack at something someone already built to slightly tweak it, which surprise surprise is the situation i'm in again, but I feel a little overwhelmed knowing there's also apache and MySQL that PHP has to play with.

The PHP code kinda makes sense looking at it myself, but figured I should start getting myself some sort of php background to understand the nuances of what i'm looking at (and probably making way too many assumptions with).

Thanks to everyone!
 
Old 10-23-2013, 12:24 PM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux, LFS, Slitaz
Posts: 3,086
Blog Entries: 1

Rep: Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975
Most people will just say 'read the docs' or 'just jump right in,' and im sure that works for some people. But for me, a quick hands-on walk-through of the basics is always best.

Here you are: http://www.codecademy.com/tracks/php
 
1 members found this post helpful.
Old 10-23-2013, 01:19 PM   #9
Doug G
Member
 
Registered: Jul 2013
Posts: 89

Rep: Reputation: Disabled
If you are interested in learning what's needed on the server to make LAMP work I recommend taking an old machine and building an ispconfig3 server. There are tutorials for different distros at http://www.ispconfig.org/page/en/ispconfig.html

Take the time to figure out why various packages are being installed and what they do for your server and you'll have a good understanding of how a secure php web server operates. Their tutorials cover step-by-step installation and configuration starting with a blank new machine.

And you'll end up with an excellent environment to develop your php (and other) code. Just stick the server you built on your local network and use it as your development server rather than installing php/apache/mysql on your workstation.

ispconfig3 is an open source control panel, built using apache, php and mysql.
 
1 members found this post helpful.
Old 10-23-2013, 04:09 PM   #10
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Rep: Reputation: Disabled
You just received great advice from this guys wish I had the same advice when starting out coding in PHP. Rather than burning through pages and pages of different books which take up 5 pages explaining something you could spotted whilst just coding.

Last edited by officerx; 10-23-2013 at 04:10 PM.
 
1 members found this post helpful.
Old 10-28-2013, 10:45 AM   #11
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,449

Original Poster
Rep: Reputation: 36
Thanks to all who chimed in on this!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Sams Teach Yourself PHP and MySQL: Video Learning Starter Kit LXer Syndicated Linux News 0 10-05-2009 01:40 PM
ood books on learning (beginning) php, mysql, and apache in a linux enviroment? CoffeeKing!!! Linux - Newbie 5 08-31-2008 03:16 PM
good books on learning (beginning) php, mysql, and apache in a linux enviroment? CoffeeKing!!! Linux - Networking 1 08-30-2008 10:40 PM
Learning Php/mysql Fast Islanders General 12 11-30-2006 12:00 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM


All times are GMT -5. The time now is 02:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration