Free Newsletters:
DatabaseJournal  
DBANews
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» Database News
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner




internet.commerce
Be a Commerce Partner


















FCC's Martin: Open Networks Becoming the Norm

Enterprise SaaS Buyers Want More Than Uptime

Cuban Waves Off SEC Allegations

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2 | Swynk







Related Articles
Build Your Own Database Driven Website Using PHP & MySQL: Pt. 2
Build Your Own Database Driven Website Using PHP & MySQL: Pt. 3
Build Your Own Database Driven Website Using PHP & MySQL: Pt. 4

Senior Developer (.NET)
Professional Technical Resources
US-CA-Santa Cruz

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MySQL

January 3, 2002

Build Your Own Database Driven Website Using PHP & MySQL: Pt. 1

By Kevin Yank

This section covers the procedure for installing PHP and MySQL under most current distributions of Linux. These instructions were tested under the latest versions of RedHat Linux and Mandrake Linux; however, they should work on other distributions such as Debian without much trouble. The steps involved will be very similar, if not identical.

As a user of one of the handful of Linux distributions available, you may be tempted to download and install the RPM distributions of PHP and MySQL. RPM's are nice, pre-packaged versions of software that are really easy to install. Unfortunately, they also limit the software configuration options available to you. If you already have MySQL and PHP installed in RPM form, then feel free to proceed with those versions, and skip forward to the "Post-Installation Setup Tasks" section. If you encounter any problems, you can always return here to uninstall the RPM versions and reinstall PHP and MySQL by hand.

Since many Linux distributions will automatically install PHP and MySQL for you, your first step should be to remove any old RPM versions of PHP and MySQL from your system. If one exists, use your distribution's graphical software manager to remove all packages with 'php' or 'mysql' in their names ('mod_php' is one that is often missed).

If your distribution doesn't have a graphical software manager, or if you didn't install a graphical user interface for your server, you can remove these from the command line. You'll need to be logged in as the root user to issue the commands to do this. Note that in the following commands, "%" represents the shell prompt, and doesn't to be typed in.

% rpm -e mysql
% rpm -e mod_php
% rpm -e php

If any of these commands tell you that the package in question is not installed, don't worry about it unless you know for a fact that it is. In such cases, it will be necessary for you to remove the offending item by hand. Seek help from an experienced user if you don't know how. If the second command runs successfully (i.e. no message is displayed), then you did indeed have an RPM version of PHP installed, and you'll need to do one more thing to get rid of it entirely. Open your Apache configuration file (usually /etc/httpd/conf/httpd.conf) in your favorite text editor and look for the two lines shown here. They usually appear in separate sections of the file, so don't worry if they're not together. The path of the libphp4.so file may also be slightly different (e.g. extramodules instead of just modules). If you can't find them, don't worry – it just means that the RPM uninstaller was smart enough to remove them for you.

LoadModule php4_module modules/libphp4.so
AddModule mod_php4.c

These lines are responsible for telling Apache to load PHP as a plug-in module. Since you just uninstalled that module, you'll need to get rid of these lines to make sure Apache keeps working properly. You can comment out these lines by adding a hash (#) at the beginning of both lines.

To make sure Apache is still in working order, you should now restart it without the PHP plug-in:

% /etc/rc.d/init.d/httpd restart

With everything neat and tidy, you're ready to download and install MySQL and PHP.

Go to page: Prev  1  2  3  4  5  6  7  8  9  10  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MySQL Archives







Latest Forum Threads
MySQL Forum
Topic By Replies Updated
Can't connect to MySQL server on 'localhost' (10061) paperclip 1 November 18th, 11:11 PM
Mysql database import problem deisel79 1 November 18th, 11:00 PM
Being the Stored Procedure woes of a foreigner in the land of MySQL sim303 0 November 13th, 07:52 PM
Help with a confusing SELECT Query.... Quadcom 2 November 12th, 02:03 PM








internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers