Solved

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

Posted on 2007-03-29
22
365 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
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MYSQL responding very slow 3 48
Wordpress Query 5 42
How to eliminate "realname" and "email" from formMail.php (tectite.com) results. 3 68
JSON decode 5 14
Creating and Managing Databases with phpMyAdmin in cPanel.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
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…

685 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