How to configure PHP with MySQL ????

Discussion in 'Installation/Configuration' started by lipp9000, Jul 22, 2006.

  1. lipp9000

    lipp9000 New Member

    I am running Fedora core 5 and have followed the howtoforge fedora core 5 perfect setup for ispconfig. MySQL and php are all setup and working, but I have phpBB on one of my users and I have created a database for this.

    When I fill out the install page and fill out all the necessary fields and click install I get this error.

    "The PHP configuration on your server doesn't support the database type that you chose."

    Is PHP configured with MySQL by default? Or is there some line of code that needs to be added to the php config to enable it to work with mysql. One again I have followed the howtoforge perfect FD5 setup guide and havnt missed a thing, but it didnt say anything about configuring php with mysql.

    Any suggestions?

    Thanks in advance :)
     
  2. TheRudy

    TheRudy Member

    You using PHP5? PHP5 doesn't come with mysql library anymore so you'll have to activate it manually, if you don't, it won't work.. They removed mysql from official php5 package cause of some license problems i think.. Or simply use PHP4 instead :)
     
  3. lipp9000

    lipp9000 New Member

    its PHP5, so what do i need to do in order to get MySQL working then?
     
  4. TheRudy

    TheRudy Member

    Oh wait :D you already installed php-mysql cause you followed that guide.. erm, you can still check if you really have it installed.. Don't know the command for fedora, probaby yum, so yum install php-mysql and it should report if you have the latest version on it or not..

    Try by enabling mysql extension in php.ini, can't hurt to try it, don't forget to restart apache afterwards!
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Do you have something like
    Code:
    extension=mysql.so
    in your php.ini?
     
  6. lipp9000

    lipp9000 New Member

    I fixed it. Thanks anyway. I installed this module called php-mysql, its php5 with mysql support already built in. Then it worked :D
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Then you didn't follow the Perfect Setup close enough because that package is installed in chapter 10 on http://www.howtoforge.com/perfect_setup_fedora_core_5_p5 :
    Code:
    yum install php php-devel php-gd php-imap php-ldap [B][COLOR="Red"]php-mysql[/COLOR][/B] php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
    ;)
     
  8. sniffffer

    sniffffer New Member

    i got it..

    yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

    try that. ots perfect ... i simply wasted time without installing those packages, by the way i 'am a nood here. still pushing.

    I was having the problem like this.:

    I installed latest versions Mysql, php, apache on centos.
    I am having a working project which is working perfectly on a wamp server. So i decided to try it on a lamp server. I installed centos five and also installed the packages available with that. My first assumptions went compleatly wrong when i tried those php over http. It was not working. Even it dosent give any error messages. I was blindly trying every single step to reintalling those packages again and again. How stupid. !! :eek::eek::eek::eek::eek::eek::eek:

    falko ooooooo thanks man.... :D
     
  9. Imran01

    Imran01 New Member

    PHP and MySQL


    Which php-mysql file, Is it php_mysql.dll in ext folder?

    Thanks
    With regards
    Imran
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What's your Linux distribution?
     
  11. Imran01

    Imran01 New Member

    PHP and MySQL

    Trying to run PHP code with MySQL using IIS6 on Windows XP.

    Thanks
    With regards
    Imran
     
  12. Imran01

    Imran01 New Member

    How to configure PHP with MySQL in Windows XP/IIS6

    Trying to run PHP code to connect MySQL on Windows XP.

    IIS 6 is used as hosting server.


    echo "<br> hello-1";

    $connect = @mysql_connect("localhost", "root", "elec");

    echo "hello-2";

    The message hello-1 is displayed, but hello-2 does not display.

    Any suugestion, please mail me.

    Thanks
    With regards
    Imran
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Unfortunately I'm no Windows expert...
     

Share This Page