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 Book
Wireless Home Networking For Dummies
Wireless Home Networking For Dummies
By Edward Ferris
For Dummies
Price: $7.99

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 EZXS16W 10/100Mbps Workgroup Switch 16 x RJ45 - Retail $
Newegg: $64.99 TigerDirect USA: $69.99
CompUSA: $69.99 Amazon: $64.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
    Router 802.11g 54g Wireless 802.11G/BBelkin F5D7230-4 Wireless-G 54Mbps Broadband Router


    Wal-Mart: $34.54 Amazon: $34.24
    TigerDirect USA: $34.99 Newegg: $31.99

    RSSLatest News
    Thermaltake Launches PW880i Water Cooler
    July 3, 2009 - 1:27 PM PST
    NZXT Announces Sentry 2 Touchscreen Fan Controller
    July 2, 2009 - 2:25 PM PST
    Transcend Intros Thermal Sensor-Equipped DDR3 Memory
    July 1, 2009 - 11:40 AM PST
    Cooler Master Launches Universal Laptop Charger
    June 30, 2009 - 5:03 PM PST
    Active Media Products Launches “President Barack Obama” USB Flash Memory
    June 29, 2009 - 6:57 PM PST
    New SSD Drives from Corsair
    June 26, 2009 - 4:33 AM PST
    MSI Announces X-Slim X600 Notebook
    June 25, 2009 - 6:00 PM PST
    Zotac Releases GeForce GTX 275 with 1,792 MB GDDR3
    June 24, 2009 - 7:54 AM PST
    Kingston Launches DDR3-1600 HyperX T1 Memory Kit
    June 23, 2009 - 11:20 AM PST
    Walton Chaintech Announces eSATA/USB Flash Memory Series
    June 22, 2009 - 2:00 AM PST
    .:: More News ::.

    RSSLatest Content
    Power Supplies Re-Tested - Part 3
    Thermaltake Element G Case Review
    Corsair CX400W Power Supply Review
    Seventeam ST-750P-AF Power Supply Review
    Rocketfish 550 W Power Supply Review
    In Win X-Fighter Case Review
    Gigabyte G31M-ES2C Motherboard
    BFG ES-800 Power Supply Review
    And The Training Goes On...
    2 TB Hard Disk Drive Battle: Seagate Barracuda LP vs. Western Digital Caviar Green
    Power Supplies Re-Tested - Part 2
    Power Supplies Re-Tested - Part 1
    Hardware Secrets Power Supply Test Methodology
    What WePC Dreams Are Becoming Reality?
    All Phenom Models

    Our Most Popular Articles
    Maximum CPU Temperature
    988,841 views
    nVidia Chips Comparison Table
    617,324 views
    How to Find Out Your Motherboard Manufacturer and Model
    596,356 views
    AMD ATI Chips Comparison Table
    517,899 views
    Connecting Two PCs Using a USB-USB Cable
    512,969 views
    How To Correctly Apply Thermal Grease
    495,975 views
    ATI Radeon X1300 Pro Review
    467,255 views
    ATI Radeon X1600 XT Review
    458,249 views
    How To Perform a BIOS Upgrade
    343,245 views
    Sempron vs. Athlon XP
    320,175 views

    Latest Threads in Our Forums
    How to Create a Three-Speed Fan Control Without Spending a Dime
    by Olle P
    Thermaltake Launches PW880i Water Cooler
    by Olle P
    Wireless Router
    by Osirus
    PC versus dedicated NAS for network storage?
    by Osirus
    Latency
    by Osirus
    My wireless keeps dropping
    by Osirus
    Seventeam ST-750P-AF Power Supply Review
    by Olle P
    Area 51m 9750 temp assistence
    by tomahawk 1705
    Hardware Secrets Power Supply Test Methodology
    by jolphil
    Fujifilm FinePix A150
    by Hardware Secrets Team
    .:: Visit Our Forums ::.


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