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.83
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 Amazon.com Brother HL-2170W 23ppm Laser Printer with Wireless and Wired Network Interfaces Electronics $.
Amazon: $99.99 Wal-Mart: $168.88
CircuitCity: $149.99 Newegg: $149.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.
    Link Xtreme D-Link Gigabit Wireless IEEED Link D-Link DIR-655 - Xtreme N Gigabit Router


    Buy.com: $99.11 TigerDirect: $99.99
    Wal-Mart: $127.82 Newegg: $92.85

    RSSLatest News
    IN WIN LAN Party in Southern California
    November 20, 2009 - 12:37 PM PST
    Patriot Announces PS-100 SSD Series
    November 19, 2009 - 7:30 AM PST
    Antec Launches TPQ-1200 PSU
    November 18, 2009 - 11:30 AM PST
    AMD/ATI Launches Radeon HD 5970
    November 18, 2009 - 10:18 AM PST
    OCZ Launches Colossus SSD Series
    November 17, 2009 - 1:39 PM PST
    NZXT Unleashes Tempest EVO Mid-Tower Case
    November 17, 2009 - 1:06 PM PST
    nVidia Launches GeForce GT 240
    November 17, 2009 - 10:18 AM PST
    Arctic Cooling Announces Accelero TWIN TURBO PRO VGA Cooler
    November 16, 2009 - 11:46 AM PST
    PowerColor Announces PLAY! HD5770 Video Card
    November 13, 2009 - 12:51 PM PST
    G.Skill Announces Falcon II SSD Series
    November 11, 2009 - 3:31 PM PST
    .:: More News ::.

    RSSLatest Content
    Ultra X4 500 W Power Supply Review
    Seagate Barracuda XT 2 TB Hard Disk Drive Review
    Nintendo Wii Fit Plus Review
    AMD ATI Chips Comparison Table
    nVidia Chips Comparison Table
    Gigabyte G41M-ES2L Motherboard
    Netflix on Playstation 3 Review
    CM Storm Sentinel Advance Mouse Review
    Titan Skalli CPU Cooler Review
    Nexus RX-6300 630 W Power Supply Review
    Gigabyte P55-UD6 Motherboard
    Nintendo Wii Review
    SilverStone Grandia GD04 Case Review
    Can We Trust the 80 Plus Certification?
    NZXT Gamma Case Review

    Our Most Popular Articles
    Maximum CPU Temperature
    1,078,785 views
    How to Find Out Your Motherboard Manufacturer and Model
    706,892 views
    nVidia Chips Comparison Table
    679,614 views
    Connecting Two PCs Using a USB-USB Cable
    593,915 views
    How To Correctly Apply Thermal Grease
    562,857 views
    AMD ATI Chips Comparison Table
    560,492 views
    ATI Radeon X1300 Pro Review
    488,065 views
    ATI Radeon X1600 XT Review
    477,225 views
    How To Perform a BIOS Upgrade
    394,820 views
    Sempron vs. Athlon XP
    338,639 views

    Latest Threads in Our Forums
    what mobo do i need? pls help!
    by zakk21
    Dell Inspiron 6000 Powers but will not boot...
    by Merman
    Ultra X4 500 W Power Supply Review
    by Merman
    IN WIN LAN Party in Southern California
    by Hardware Secrets Team
    Getting A Hard Copy
    by Trevorrross
    Am I Making The Right Choice?
    by need2know
    Is it available to mount the Zalman cooler?
    by Olle P
    dsl modem prob
    by Sherry
    Seagate Barracuda XT 2 TB Hard Disk Drive Review
    by Hardware Secrets Team
    Overclocking a dell xps 410
    by 6dracing
    .:: 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)