LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Using PHP with MySQL (https://www.linuxquestions.org/questions/linux-server-73/using-php-with-mysql-910345/)

Dizieze 10-26-2011 05:34 PM

Using PHP with MySQL
 
I am trying to migrate a Mediawiki from one server to another. And apparently part of this process is to get PHP to work with MySQL. Everywhere I look for help it says something along the lines of:

"For the MySQL functions to be available, you must compile PHP with MySQL support.

For compiling, use --with-mysql=DIR (the optional DIR points to the MySQL directory)."

But I have no idea what this means or how I perform this. Any help?

Toggan 10-26-2011 06:27 PM

Based on your question, I'm going to go out on a limb here and assume you purchased hosting instead of running your own in house server. Since most companies set you up with an entire LAMP (Linux, Apache, MySQL, PHP) stack when you purchase it, you may not need to do anything.

The first thing I would do is upload a php info script. This will tell you if PHP is already configured to have MySQL support. If this is the case, there's no sense in reinventing the wheel.

You can do this with something as simple as:

Code:

<?php

phpinfo();

?>


Dizieze 10-27-2011 08:45 AM

Na, its my server I installed LAMP myself; I just don't know anything about PHP and I'm kind of on a time crunch to get everything migrated to this server, including our mediawiki.

Dizieze 10-27-2011 11:25 AM

I still don't know a whole lot about PHP, BUT I figured out my problem!
I uninstalled these two: php-mysql php-gd and re installed them. Restarted Apache and I'm good to go... =)


All times are GMT -5. The time now is 01:57 AM.