11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2• CONFIGURING YOUR ENVIRONMENTwww.it-ebooks.info■ Tip In this chapter you’ll be guided through the manual installation and configuration process. Manuallyinstalling and configuring Apache and <strong>PHP</strong> is a good idea because it will familiarize you with the manyconfiguration options at your disposal, allowing you to ultimately wield greater control over how your web sitesoperate. However, if you’re ultimately going to rely on the services of a web hosting provider and just want toquickly set up a test environment so you can get to coding, consider downloading XAMPP(www.apachefriends.org/en/xampp.html), a free automated Apache installer that includes, among other things,<strong>PHP</strong>, Perl, and <strong>MySQL</strong>. XAMPP is available for Linux and Windows, with Mac OS X and Solaris solutions indevelopment. If you’d like to run <strong>PHP</strong> with IIS, I recommend following the instructions in the “Installing IIS and <strong>PHP</strong>on Windows” section.Downloading ApacheThese days, Apache is packaged with all mainstream Linux distributions. So if you’re using one of theseplatforms, chances are quite good you already have it installed or can easily install it through yourdistribution’s packaging service (e.g., by running the apt-get command on Ubuntu). If you’re runningOS X, Apache is automatically installed by default. If either case applies to you, proceed directly to the“Downloading <strong>PHP</strong>” section. However, if you’d like to install Apache manually, follow along with thissection.Because of tremendous daily download traffic, it’s suggested you choose a download location mostclosely situated to your geographical location (known as a mirror). Apache will attempt to identify themirror closest to your location simply by navigating to http://httpd.apache.org/download.cgi. Hereyou’ll be presented with a list of several Apache versions. I suggest clicking on the latest stable version,which will prompt you to select the source code in tar.gz or bz2 formats, or downloading one of severaloperating system-specific binaries. If you’re running a Linux distribution and plan on building fromsource, then download one of the source code archives.If you’re running Windows and would like to use Apache, then download the latest stable Windowsbinary located within the binaries/win32 directory. Two binary versions are available: one containingadditional SSL-related capabilities and one lacking these capabilities. These binaries are appropriatelynamed to make clear which is which. I suggest choosing the non-SSL capable version for developmentpurposes.Downloading <strong>PHP</strong>Like Apache, <strong>PHP</strong> is available through all Linux distributions’ package environments nowadays, and it isinstalled on OS X by default. If either case applies to you, I strongly recommend following theinstallation and configuration instructions specific to your environment. Otherwise, you shoulddownload the latest stable version by clicking on the Downloads link located at the top of the <strong>PHP</strong> website and then choosing from one of the available distributions:Source: If you’d rather not use your Linux distribution’s package manager, or if youplan to compile from source for the Windows platform, choose this distributionformat. Building from source on Windows isn’t recommended and isn’t discussedin this book. Except in very special circumstances, the Windows binary will suityour needs just fine. This distribution is archived in bzip2 and gzip formats. Keep10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!