Solved

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

Posted on 2007-03-29
22
366 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
  • 3
  • +2
22 Comments
 
LVL 5

Expert Comment

by:richswyatt
ID: 18817840
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
ID: 18817903
What *NIX flavour are you using?
0
 
LVL 5

Expert Comment

by:richswyatt
ID: 18817906
RedHat Enterprise 4.0
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 1

Author Comment

by:coldchillin
ID: 18817913
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
ID: 18817921
So - let me get this straight - PHP is NOT installed with MYSQL, is that correct?
0
 
LVL 5

Expert Comment

by:richswyatt
ID: 18817938
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
ID: 18817941
@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
ID: 18817945
Sorry about that. :-)
0
 
LVL 1

Author Comment

by:coldchillin
ID: 18817999
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
ID: 18818608
I think it's actually php-mysql? (dash instead of underscore)
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 18818641
why not just look at your phpinfo() and see if it is compiled with MySQL?
0
 
LVL 29

Expert Comment

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

Author Comment

by:coldchillin
ID: 18839339
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
ID: 18839365
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
ID: 18839412
The easiest solution is to recompile --with-mysql

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

Author Comment

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

Expert Comment

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

Author Comment

by:coldchillin
ID: 18839481
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
ID: 18839494
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
ID: 18839521
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
ID: 18839551
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
ID: 18839673
THANK YOU!

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

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

752 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