The Wayback Machine - https://web.archive.org/web/20081007110423/http://www.hardwaresecrets.com/article/436
Hardware Secrets
Home | Audio | Case | Cooling | CPU | Input | Memory | Mobile | Motherboard | Networking | Power | Storage | Video | Other
Content
Articles
First Look
News
Reviews
Tutorials
Main Menu
About Us
Compare Prices
Datasheets
Dictionary
Download
Drivers
Forums
Gabriel's Blog
Links
Manufacturer Finder
Newsletter
On The Web
RSS Feed
Test Your Skills
Newsletter
Subscribe today!
Search




Recommended Book
Build Your Own Wi-Fi Network (Build Your Own...(McGraw))
By
McGraw-Hill/OsborneMedia
Price: $0.39

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 Linksys WRT54GS Wireless Router $
CompUSA.com: $64.99 TECHONWEB: $69.43
TigerDirect.com: $64.99 HP Small/Medium Business: $70.15
eBay: $47.95 Jr: $59.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 Deals
    Linksys Wireless-N WRT150N Router


    TigerDirect.com: $44.99 Server Supply: $80.00
    Amazon: $45.04 CompUSA.com: $44.99
    Server Supply.com Inc: $80.00 Tech For Less: $78.96
    Linksys WRT350N Wireless Router


    CompUSA.com: $169.99 TigerDirect.com: $169.99
    PCNation: $166.81 Newegg.com: $109.99
    TECHONWEB: $179.99 Nextwarehouse: $154.86
    D-link Xtreme N™ DIR-655 Wireless Router


    TECHONWEB: $100.99 Beach Camera.com: $94.95
    Circuit City: $99.99 Dell: $99.99
    OfficeMax: $119.99 Jr: $109.99
    Linksys WRT54GS Wireless Router


    TECHONWEB: $69.43 HP Small/Medium Business: $70.15
    CompUSA.com: $64.99 TigerDirect.com: $64.99
    eBay: $47.95 J&R; Music and Computer World: $59.99
    Linksys WRT300N Wireless Router


    Newegg.com: $94.99 PCNation: $106.09
    CompUSA.com: $109.99 TigerDirect.com: $109.99
    CompuVest: $120.42 Insight: $105.03

    RSSLatest News
    Antec Skeleton Case
    October 7, 2008 - 10:42 AM PST
    Lexar Media Launches Crucial Ballistix Tracer DDR3-1333
    October 7, 2008 - 10:11 AM PST
    Elpida Develops 65-nm Memory Chips
    October 6, 2008 - 11:10 AM PST
    Transcend Launches T5 Flash Memory
    October 3, 2008 - 11:50 AM PST
    Thermaltake Announces BigTyp14 Pro CPU Cooler
    October 3, 2008 - 11:28 AM PST
    A-Data Announces Triple-Channel DDR3 kits for Core i7 Processors
    October 3, 2008 - 11:17 AM PST
    EVGA Launches nForce 790i SLI FTW Mainboard
    October 3, 2008 - 11:07 AM PST
    GlacialPower Launches 650 W PSU
    October 2, 2008 - 9:56 AM PST
    Manufacturers Launch Radeon HD 4550 and HD 4350 Cards
    October 1, 2008 - 9:51 AM PST
    AMD/ATI Launches Radeon HD 4550 and HD 4350
    September 30, 2008 - 9:25 AM PST
    .:: More News ::.

    RSSLatest Content
    Everything You Need to Know About Digital Cameras
    Kingwin Mach 1 ABT-700MA1S 700 W Power Supply Review
    Thermaltake V9 Case Review
    OCZ Dominatrix Gaming Mouse Review
    Rosewill Wind Ryder RZLS142-AP Case Review
    AeroCool AeroRacer Pro Case Review
    iPod Touch 2nd Generation Review
    Olympus SP-570UZ Digital Camera Review
    Zalman ZM600-HP 600 W Power Supply Review
    Tagan A+ Curbic Case Review
    Everything You Need to Know About The Motherboard Voltage Regulator Circuit
    Inside Atom Architecture
    ECS A790GXM-A Black Series Motherboard Review
    AMD ATI Chips Comparison Table
    All Core 2 Models

    Our Most Popular Articles
    Maximum CPU Temperature
    792,789 views
    nVidia Chips Comparison Table
    493,340 views
    AMD ATI Chips Comparison Table
    436,153 views
    ATI Radeon X1300 Pro Review
    419,936 views
    ATI Radeon X1600 XT Review
    414,107 views
    How to Find Out Your Motherboard Manufacturer and Model
    404,089 views
    Connecting Two PCs Using a USB-USB Cable
    362,865 views
    How To Correctly Apply Thermal Grease
    347,422 views
    Sempron vs. Athlon XP
    283,982 views
    Sempron 3400+ Review
    274,797 views

    Latest Threads in Our Forums
    Antec Skeleton Case
    by Hardware Secrets Team
    what mobo and PSU pls..
    by Gabriel Torres
    Gigabyte GA-P35C-DS3R Motherboard Review
    by Gabriel Torres
    Lexar Media Launches Crucial Ballistix Tracer DDR3-1333
    by Hardware Secrets Team
    Need advices with a 512 kbps internet connection
    by Gabriel Torres
    creative x fi elite pro spdif output
    by Gabriel Torres
    Recovering Hard Disks with Bad Blocks
    by Gabriel Torres
    need subject about pcb for hardisk --mr Gabriel Torres
    by Gabriel Torres
    Budget Gaming PC
    by Cheetos
    Elpida Develops 65-nm Memory Chips
    by Hardware Secrets Team
    .:: Visit Our Forums ::.


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