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. |
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. |
Great, thanks sag, i'll check them out.
|
Quote:
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. |
Quote:
|
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/ |
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! |
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 |
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. |
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.
|
Thanks to all who chimed in on this!
|
All times are GMT -5. The time now is 07:43 PM. |