Hardware Secrets
Home | Camera | Case | CE | Cooling | CPU | Input | Memory | Mobile | Motherboard | Networking | Power | Storage | Video | Other
Content
Articles
First Look
Gabriel's Blog
News
Reviews
Tutorials
Main Menu
About Us
Awarded Products
Compare Prices
Datasheets
Dictionary
Download
Drivers
Forums
Links
Manufacturer Finder
Newsletter
On The Web
RSS Feed
Test Your Skills
Twitter
Newsletter
Subscribe today!
Search




Recommended
Wireless Home Networking For Dummies
Wireless Home Networking For Dummies, by Edward Ferris (For Dummies), starting at $10.59
Home » Networking
How to Build a Web Server with PHP 5 and MySQL 5 Support
Author: Gabriel Torres
Type: Tutorials Last Updated: April 19, 2007
Page: 1 of 5
$ Check REAL-TIME pricing for Storage Enclosure D-Link 2-Bay Network DNS NAS $.
Newegg: $179.99 Buy.com: $190.86
CompUSA: $199.99 TigerDirect: $179.99

Introduction

Building a PHP 5 web server with MySQL 5 support isn’t as easy as it seems. We know this by heart: we spend literally a whole day last week trying to do this. The main problem is that PHP 5 doesn’t come with embedded support for MySQL and MySQL 5 does not provide a separated stand-alone client module ready for downloading and installing. In this step-by-step tutorial we will show you how to compile and install Apache 2, PHP 5 with MySQL 5 support and PHP optimization and caching system (Xcache) on Linux, so you will be able to build your own web server in a matter of minutes – and not hours like happened to us.

We got several error messages along the way, and we are going to publish the most common ones, so if you get the same messages you will know what to do.

The most important thing is that you need to upgrade your Linux version to its latest version, or at least check if libstdc++.so.6 is installed. It should be at /usr/lib/ directory (you can also try locate libstdc++.so.6 command). If you cannot find this file, you will get the following error message along the way:

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

This error happens because your system has an old version of C++ library, probably libstdc++.so.5. The solution is to update the C++ library. However, since almost everything on Linux depends on C++, you will have to upgrade a lot of stuff as well. On Debian, the Linux flavor we were using, it was easier to simply upgrade de whole system with the following commands:

apt-get update
apt-get dist-upgrade

This will upgrade not only the C++ library but also update your Debian to its latest version. We recommend you performing these commands before starting the installation and configuration process.

Another trick for Debian users is to edit /etc/apt/sources.list and check from which server Debian will download files using apt commands like apt-get. By default you will see http://ftp.debian.org there, but this server is usually overloaded. You can comment the lines that point to debian.org and add new lines pointing to a faster mirror, for example:

deb http://ftp.uwsg.indiana.edu/linux/debian stable main
deb-src http://ftp.uwsg.indiana.edu/linux/debian stable main

A full list of mirrors is available here: http://www.debian.org/mirror/list. Scroll down and prefer using a secondary mirror, because they are usually less loaded, thus making all your installing and upgrading process a lot easier – especially for upgrading the whole operating system like we recommended.

After these preliminary explanations, let’s go to our step-by-step tutorial. Please notice that the following steps must be done on the same order we wrote: you cannot try to compile and install PHP 5 before MySQL 5 – it won’t work.

Pages (5): [1] 2 3 4 5 »
Print Version | Send to Friend | | Bookmark Article | Comments (7)

Related Content
  • All Opteron Models
  • All Xeon Models

  • Recommended Deal.
    D-Link Router SWITCH 802.11n DRAFT 4-Port providesD-Link Router SWITCH 802.11n DRAFT 4-Port provides


    Newegg: $48.00 BestBuy: $69.99
    TigerDirect: $49.99 Buy.com: $51.47

    RSSLatest News
    Samsung Announces Hard Disk with Michael Jackson's THIS IS IT
    February 8, 2010 - 11:19 AM PST
    New Toughpower XT PSUs from Thermaltake
    February 5, 2010 - 11:41 AM PST
    MSI Launches R5770 Hawk Video Card
    February 5, 2010 - 11:32 AM PST
    NZXT Unveils Line of Premium Cables and Case Fans
    February 5, 2010 - 11:24 AM PST
    AMD/ATI Launches Radeon HD 5450
    February 4, 2010 - 11:44 AM PST
    Patriot Debuts Sector 5 Memory Kit
    February 3, 2010 - 7:41 AM PST
    Samsung Intros 1.5 TB/2 TB EcoGreen F3EG Hard Disks
    February 3, 2010 - 7:38 AM PST
    Acer Launches Full HD 3D LCD Monitor
    February 3, 2010 - 7:32 AM PST
    New Strider Essential PSUs from SilverStone
    February 1, 2010 - 9:17 AM PST
    ASUS Unveils Low-Radiation Motherboards
    February 1, 2010 - 8:56 AM PST
    .:: More News ::.

    RSSLatest Content
    Athlon II X4 635 and Phenom II X2 555 CPU Review
    Thermaltake SpinQ VT CPU Cooler Review
    All Atom Models
    Motorola Droid Cell Phone Review
    Cooler Master GX 750 W Power Supply Review
    MSI P55-GD85 Motherboard
    ASRock H55DE3 Motherboard
    ECS H55H-CM Motherboard
    NZXT Hades Case Review
    Is It Time to Move to Solid-State Storage?
    EVGA H55 Motherboard
    SilverStone Strider Plus 750 W Power Supply Review
    Anatomy of SSD Units
    Mushkin Volta 600 W Power Supply Review
    Power Supplies Re-Tested - Part 4

    Our Most Popular Articles
    Maximum CPU Temperature
    1,127,944 views
    How to Find Out Your Motherboard Manufacturer and Model
    781,121 views
    nVidia Chips Comparison Table
    723,473 views
    Connecting Two PCs Using a USB-USB Cable
    646,484 views
    How To Correctly Apply Thermal Grease
    603,835 views
    AMD ATI Chips Comparison Table
    591,609 views
    ATI Radeon X1300 Pro Review
    500,665 views
    ATI Radeon X1600 XT Review
    489,056 views
    How To Perform a BIOS Upgrade
    427,329 views
    Understanding RAM Timings
    364,029 views

    Latest Threads in Our Forums
    How fast is fast? How much heat is too much??
    by Ios_Angel
    DVD-ROM problems (Pioneer DVD-115HA)
    by Ios_Angel
    Partitioning a Reformatted HD
    by Merman
    AMD Phenom II X4 925 on my AM2 board
    by tomahawk 1705
    Athlon II X4 635 and Phenom II X2 555 CPU Review
    by Hardware Secrets Team
    Working on Frankenstein
    by nicolatesla
    Thermaltake SpinQ VT CPU Cooler Review
    by Olle P
    Samsung Announces Hard Disk with Michael Jackson's THIS IS IT
    by Hardware Secrets Team
    Adapting a Playstation Joystick to a PC
    by HillbillyPop
    My PC Build
    by Olle P
    .:: Visit Our Forums ::.


    © 2004-10, Hardware Secrets, LLC. All rights reserved.
    Advertising | Legal Information | Privacy Policy
    All times are Pacific Standard Time (PST, GMT -08:00)