LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2003, 07:14 AM   #1
siphi
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Ubuntu Breezy, Kubuntu Breezy
Posts: 78

Rep: Reputation: 15
Question php and mysql installation


Hey i was wondering how to set up the apache server with php, mysql and phpMyAdmin on redhat9
These are the rpms i have (not even sure if their installed properly)

phpMyAdmin-2.5.4-php.tar.gz
mysql-server-3.23.58-1.9.i386.rpm
php-devel-4.2.2-17.2.i386.rpm
php-mysql-4.2.2-17.2.i386.rpm
mysql-standard-4.0.15-pc-linux-i686.tar.gz

Any help would be much appreciated.
I may have to uninstall some of these but i don't know. I got all this working in windows with easyphp but i much prefer linux.
thanks
 
Old 11-01-2003, 09:09 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Check what is installed - post the output of:
rpm -qa | grep httpd
rpm -qa | grep php
rpm -qa | grep mysql
 
Old 11-01-2003, 01:02 PM   #3
OceanSurf
Member
 
Registered: Aug 2003
Location: Si
Distribution: SuSE, Slackware
Posts: 37

Rep: Reputation: 15
//install mysql server+client:
//first check if mysql is already installed:
#>rpm -q MySQL
//if none are installed:
#> rpm -i MySQL-server-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm
//uninstall rpms like
#>rpm -e MySQL //or something. (better way is to use your systems package manager!)

apache+php:
//create dirs
#>mkdir /usr/local/apache
#>mkdir /usr/local/php

//download packages into these dirs (apache to ../apache, php to ../php)
</usr/local/apache#>tar -xvzf apache-VERSION.tar.gz
apache-VERSION#>cd apache-VERSION
apache-VERSION#>./configure --prefix=/usr/local/apache --enable-module=so
apache-VERSION#>make
apache-VERSION#>make install

open file /usr/local/apache/conf/httpd.conf -> edit ServerName and ServerAdmin (i guess you know how)
Start apache:
#>/usr/local/apache/bin/apachectl start

if http://127.0.0.1 works then install PHP

<usr/local/php#>tar -xvzf php-VERSION.tar.gz
php#>cd php-VERSION
php#>./configure --enable-ftp --with-apxs=/usr/local/apache/bin/apxs
php#>make
php#>make install

now stop apache -> /usr/local/apache/bin/apachectl stop
edit httpd.conf again to set the lines

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

Action application...something

//edit what you'd like and know how.

//start the apache again and there you go!

//to make it start at boot time:
#>cd /etc/rc.d/rc3.d
rc3.d#>ln -s /usr/local/apache/bin/httpd S85httpd

the number after rc3 depends on in what run level you're running your system (or something like that).

For a complete HOW-TO check the LAMPS site: http://lamps.efactory.de/
it's in german and english!

Last edited by OceanSurf; 11-09-2003 at 12:46 AM.
 
Old 11-01-2003, 01:17 PM   #4
NewtonIX
Member
 
Registered: Oct 2003
Location: Colorado
Distribution: SLackware 14
Posts: 62

Rep: Reputation: 16
nm -- found it

Last edited by NewtonIX; 11-01-2003 at 01:23 PM.
 
Old 11-02-2003, 08:57 AM   #5
siphi
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Ubuntu Breezy, Kubuntu Breezy
Posts: 78

Original Poster
Rep: Reputation: 15
In reply to : David ross

[diarmuid@localhost diarmuid]$ rpm -qa | grep httpd
httpd-manual-2.0.40-21.5
httpd-2.0.40-21.5
redhat-config-httpd-1.0.1-18
[diarmuid@localhost diarmuid]$ rpm -qa | grep php
php-imap-4.2.2-17.2
php-devel-4.2.2-17.2
gphpedit-0.4.3-1
php-mysql-4.2.2-17.2
php-manual-4.2.2-17.2
php-4.2.2-17.2
php-ldap-4.2.2-17.2
[diarmuid@localhost diarmuid]$ rpm -qa | grep mysql
php-mysql-4.2.2-17.2
 
Old 11-02-2003, 09:06 AM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
OK.

Look at httpd.conf and move phpMyAdmin-2.5.4-php.tar.gz to the directory specified as DocumentRoot then extract the phpmyadmin files:
tar -xzf phpMyAdmin-2.5.4-php.tar.gz

Then make sure apache is running:
service httpd restart

Then try and access it:
http://ip.of.web.server/phpMyAdmin/
 
Old 11-02-2003, 09:07 AM   #7
siphi
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Ubuntu Breezy, Kubuntu Breezy
Posts: 78

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by OceanSurf

apache+php:
//create dirs
#>mkdir /usr/local/apache
#>mkdir /usr/local/php

//download packages into these dirs (apache to ../apache, php to ../php)
</usr/local/apache#>tar -xvzf apache-VERSION.tar.gz
apache-VERSION#>cd apache-VERSION
apache-VERSION#>./configure --prefix=/usr/local/apache --enable-module=so
apache-VERSION#>make
apache-VERSION#>make install

open file /usr/local/apache/conf/httpd.conf -> edit ServerName and ServerAdmin (i guess you know how)
Start apache:
#>/usr/local/apache/bin/apachectl start

if http://127.0.0.1 works then install PHP
I think my apache2 (httpd) is preinstalled on my redhat9 under /sbin/service ??? Do i need to uninstall from here? and then do what you said?
 
Old 11-02-2003, 09:18 AM   #8
siphi
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Ubuntu Breezy, Kubuntu Breezy
Posts: 78

Original Poster
Rep: Reputation: 15
Righteo sorry about this I just did what david ross said and i get ...
------------------------------
cannot load MySQL extension,
please check PHP Configuration.
Documentation
------------------------------

The documentation url is.... http://127.0.0.1/phpMyAdmin/Documentation.html#faqmysql
Which says
-----------------------------
[1.20] I receive the error "cannot load MySQL extension, please check PHP Configuration".

To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but failed.

Usually, the problem is solved by installing a software package called "PHP-MySQL" or something similar.
--------------------------
 
Old 11-02-2003, 09:22 AM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Well you have that installed but it may be a different version since you installed mysql from source. Try creating a php info page called phpinfo.php:
Code:
<?php phpinfo(); ?>
Then call it through your browser and see what it says about mysql.
 
Old 11-02-2003, 09:26 AM   #10
siphi
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Ubuntu Breezy, Kubuntu Breezy
Posts: 78

Original Poster
Rep: Reputation: 15
The only thing it says about mySql is
--------------------------------
dbx
----
dbx support enabled
----
dbx version 1.0.0
----
supported databases:
MySQL
ODBC
PostgreSQL
Microsoft SQL Server
FrontBase
Oracle 8 (not really)
Sybase-CT

No other mention of MySQL. So does this mean MySQL isn't installed?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql 4.1.12 installation & PHP 5 tuxrules Slackware 2 06-23-2005 10:58 PM
my PHP installation says no MySQL support Niceman2005 Linux - Software 4 06-23-2005 07:23 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
php not recognizing mysql installation martinman Linux - General 2 12-13-2003 10:54 PM
Installation Tutorial Apache 2, PHP 4, MySQL 3.23 freddymio Programming 2 07-03-2002 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration