LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-21-2007, 02:04 PM   #1
jim0112
LQ Newbie
 
Registered: Oct 2006
Location: Brighton, UK
Posts: 18

Rep: Reputation: 0
phpBB installation test doesn't detect MySQL; need help with PHP extensions


Hi,

I am trying to install phpBB 3.0.B5 on Ubuntu 6.06. The installation test does not recognise any of the supported databases:

****

Supported databases

Required - You must have support for at least one compatible database within PHP. If no database modules are shown as available you should contact your hosting provider or review the relevant PHP installation documentation for advice.

Firebird: Unavailable
MySQL with MySQLi Extension: Unavailable
MySQL: Unavailable
MSSQL Server 2000+: Unavailable
MSSQL Server 2000+ via ODBC: Unavailable
Oracle: Unavailable
PostgreSQL 7.x/8.x: Unavailable
SQLite: Unavailable

****

Versions I have installed:

PHP Version 5.1.2
Apache 2.0
MySQL 5.0.22


MySQL is installed and working (as is Firebird, come to that) - just not recognised. After some Googling I suspect that I need to do one or more of the following:

a) Install a MySQL extension for PHP - it appears that the ones installed are for other applications?

jim@ubuntu:/$ slocate mysql.so
/usr/lib/perl5/auto/DBD/mysql/mysql.so
/usr/lib/proftpd/mod_sql_mysql.so
jim@ubuntu:/$

b) Edit php.ini to include the path to the extensions directory - I have found the relevant line (extension_dir = "./") but I do not know where the directory is! One suggestion I had was that it might be one of the subdirectories of /usr/lib/php5 but this may well be wrong.

c) Uncomment lines for any required extensions in php.ini, e.g. I have already uncommented extension=mysql.so.

To summarise, my questions are as follows:

1. Do I need to install additional extensions / modules? If so, how?
2. Where is the extensions directory for PHP5 in Ubuntu?
3. Is there anything else I need to do for PHP to recognise MySQL?

Thanks in advance!
 
Old 04-21-2007, 11:04 PM   #2
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
Did you compile PHP with mysql support? Here is the line you should have used when configuring assuming you were setting it up to work with Apache also.

./configure --with-apxs2=/path/to/apache/apxs --with-mysql=/path/to/mysql

You can also quickly see if you have MySQL support in PHP by viewing PHPInfo. If you see a section for MySQL, then the support is there.
 
Old 04-22-2007, 08:09 AM   #3
jim0112
LQ Newbie
 
Registered: Oct 2006
Location: Brighton, UK
Posts: 18

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the reply. I originally installed PHP with sudo apt-get install php5. I did try downloading and compiling the source, but was getting errors.

Luckily - I have now been given the answer, courtesy of a kind soul posting on the phpbb.com forums - I needed to install something else: sudo apt-get install php5-mysql.

After that the extensions were available in a subdirectory of /usr/lib/php5, and after this directory was quoted in php.ini, MySQL was recognised.
 
  


Reply

Tags
mysql, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
phpbb won't work with mysql 4.x and php 4.x Gsee Linux - Software 2 07-27-2005 09:22 AM
phpBB and MySQL The_Messiah Linux - Software 5 04-18-2005 01:34 PM
phpBB and MySQL problem (please HELP!) domen Linux - Software 6 06-27-2004 08:31 AM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
MYSQL Extensions For PHP? hbidad Linux - Software 0 02-09-2003 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:45 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