Jimmy's Blog Jimmy Ruska's Blog
Install PHP, MySQL, Apache the Bullet Proof Way Posted on Wednesday, February 13 2008
Learn to Play Songs by Ear: Ear Training

The hardest part about programming is always getting started. Once everything is setup programming isn't a big deal, it may be a little frustrating at first but as you gain fluency it becomes more enjoyable, like with anything else.

Many people get stuck and quit just beginning, which is a shame. A little more research could have gotten them started a few years ago, but they mark it in their mind as a huge inconvenience.

Automatically install PHP, Mysql, Apache at the same time

Sites like wampserver and xampp make the process of installing everything and configuring everything to work together as easy as one intaller.

For Wampserver

  1. Install
  2. Go to your C:\wampserver\ folder
  3. Go to the www folder
  4. Make a file called blah.php
  5. You can now access it on localhost by going to http://localhost/blah.php

For Xampp

  1. Install
  2. Go to your C:\xampp\ folder
  3. Go to the htdocs folder
  4. Make a file called blah.php
  5. You can now access it on localhost by going to http://localhost/blah.php

Complications with Services not starting

My friend kept getting issues. The mysql service wouldn't start but the apache would. Uninstalling previous installations and uninstalling the associated folders fixed everything for him. If you're on windows you can go to Start -> Run -> Services.msc then try starting the service from there. It may give you a more verbose explanation on why it doesn't start, from there, ask in a forum.

Complications with PHP

My friend had issues getting his php to work correctly. I ended up fixing the problem by looking for php.ini files (you can use google desktop search or (windowskey+F/start -> find). I deleted all of them and reinstalled. Everything worked afterwards.

Sometimes <? doesn't work, initially only <?php can be used to start php code. To enable the 'short tags' change the following in the php.ini. Any time you want to find something fast, just click ctrl+F in your text editor. Please do not scroll and search like a tard =P.

php.ini
short_open_tag = On

Many people report issues with mysql_connect and mysql_query not being defined (this is an undefined function error). To fix this...

php.ini
change
; extension=php_mysql.dll
to
extension=php_mysql.dll

This tells it to include the function libraries for mysql. Try and read about the different php libraries and what they can offer. There are many useful ones you'll never hear about!




Tags: php installation, install mysql, apache install automatically, installer, server howto, tutorial, programming getting started, working together database



stumble digg delicious


Blog by Jimmy Ruska
Add me: Youtube, Twitter, Facebook, MySpace

Share:

More OMFG-Good Links

See all Posts in the Funny Pictures category.
Download mp3s faster than limewire using google.
I've made 100+ free video tutorials.
See the best of the internet today on one page.