Solved

mysql.so - php.ini - setting up a wiki

Posted on 2007-03-29
22
357 Views
Last Modified: 2013-12-13
If i do a whereis for mysql.so and come up with mult. instances, are they the same file, or different versions?

I am trying to set up a mediaWiki (LAMP), and the wiki setup page says I need to recompile using --with-mysql or install the mysql.so

I have copied a mysql.so into the exentsions_dir path designated in the php.ini file, and uncommented the extension=mysql.so line

here's the thing: i found that file in /usr/lib/perl5/vendor_perl...

I did a whereis mysql.so and came up with 3 directories, but when I went in to them, i didn't see the file. When I did a locate mysql.so, the /usr/lib/perl5 locating is the only one with the file...
0
Comment
Question by:coldchillin
  • 9
  • 8
  • 3
  • +2
22 Comments
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
I've always just done --with-mysql

Did you install mysql on this server? If not - it could be in a myriad of places. Mine, for instance, on RedHat Enterprise Linux is in /usr/share/mysql

The reason that you get multiple hits when you do whereis is b/c different applications install their own versions.
0
 
LVL 29

Expert Comment

by:TeRReF
Comment Utility
What *NIX flavour are you using?
0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
RedHat Enterprise 4.0
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
but how about this:

I do a whereis mysql.so
and the first entry is
/usr/bin/mysql

cd /usr/bin/mysql is not a directory
and within /usr/bin, there is no mysql.so file

I did install mysql on the server, and it is currently running (yum install mysql)

let's just say i compile using --with-mysql, can you step me through that exactly? -newbie

the httpd on the server is running, and php is installed, and so is the wiki, so i can hit it, but it's just not configured properly (the mysql.so) even though there IS now a mysql.so file in the /usr/lib/php/modules directory (the mysql.so taken from /usr/lib/perl5...)
0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
So - let me get this straight - PHP is NOT installed with MYSQL, is that correct?
0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
View /foldertophpinstallsource/config.nice

Make sure you use all the same flags and then ./configure <all the flags here> and add --with-mysql
After ./configure then make and after make runs then make install

At that point if you restart Apache - you should be able to use mysql functions in PHP code
0
 
LVL 29

Expert Comment

by:TeRReF
Comment Utility
@richswyatt
I was asking coldchillin about the flavour ;-)

@coldchillin
Remove the perl mysql.so module. That won't work. Try this:
yum install php_mysql
0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
Sorry about that. :-)
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
I'm using CentOS 4.3, I believe it's derived from Red Hat

I tried yum install php_mysql and it said
no match for arguments: php_mysql
0
 
LVL 2

Expert Comment

by:wakemup
Comment Utility
I think it's actually php-mysql? (dash instead of underscore)
0
 
LVL 50

Expert Comment

by:Steve Bink
Comment Utility
why not just look at your phpinfo() and see if it is compiled with MySQL?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 29

Expert Comment

by:TeRReF
Comment Utility
If you are using PHP 5.x it should be included per default...
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
wakemup - i tried php-mysql as well, no match

routinet - where/what eaactly am i looking for?

terref - i'm using 5.1.6
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
it's actually without-mysql

and there is no mod_sql

only mod_auth_mysql

i cannot locate a mysql.so on the machine, only the one where int he perl directory, which isn't the right one.

0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
The easiest solution is to recompile --with-mysql

Do you have the original PHP install source folder?
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
i don't think so...what is it usually?
0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
Could be /usr/src/php path  or anywhere - did you set it up originally?
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
what I did was i made a change to /etc/yum.repos.d/CentOS-Base.repo to install PHP5x
0
 
LVL 5

Expert Comment

by:richswyatt
Comment Utility
Ah - so somewhere in there should be the config.nice (do a whereis or just search for it in the src folder)... Anyway - you could reconfigure it and recompile it with --with-mysql and then restart Apache and voila - you have MySQL function access.
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
there doesn't appear to be a source folder, or a config file.

(i'm a newbie)

this is the configuration file for the yum updater, not for php. I added the line
installonlypkgs=php*
to the [centosplus] section

then issued the command

yum install php

if i do that now it says
...
...
...
Nothing to do
0
 
LVL 5

Accepted Solution

by:
richswyatt earned 250 total points
Comment Utility
Check this out:

Try this

yum --enablerepo=centosplus install php-mysql

OR go to the following link

http://www.jasonlitka.com/2007/02/10/upgrading-php-521-rhel-centos/
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
THANK YOU!

The yum --enablerepo=centosplus install php-mysql worked like a charm!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now