Please help to configure mysql with apache and php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mmr315
    New Member
    • Aug 2007
    • 25

    Please help to configure mysql with apache and php

    i installed apache 5 and php 5 in my system. In the remote system(server9) mysql server is there .through sqlyog mysql is connection in my system but through php it is not connectiong.My operating system is windows 2000 professional.

    i wrote code like this

    <?php
    $strDB=mysql_co nnect("server9" , "admin", "admin");
    mysql_select_db ("lms",$strD B); //lms database name
    mysql_close($st rDB);
    ?>

    it is saying that fatal error:call to mysql_connect() is undefined
  • ak1dnar
    Recognized Expert Top Contributor
    • Jan 2007
    • 1584

    #2
    Originally posted by mmr315
    i installed apache 5 and php 5 in my system. In the remote system(server9) mysql server is there .through sqlyog mysql is connection in my system but through php it is not connectiong.My operating system is windows 2000 professional.

    i wrote code like this

    <?php
    $strDB=mysql_co nnect("server9" , "admin", "admin");
    mysql_select_db ("lms",$strD B); //lms database name
    mysql_close($st rDB);
    ?>

    it is saying that fatal error:call to mysql_connect() is undefined
    That means that you have not configured your php yet to work with mySQL :)
    locate your php.ini file and uncomment the anything related to mysql settings and make sure to restart your machine after that.

    Comment

    • mmr315
      New Member
      • Aug 2007
      • 25

      #3
      Originally posted by ajaxrand
      That means that you have not configured your php yet to work with mySQL :)
      locate your php.ini file and uncomment the anything related to mysql settings and make sure to restart your machine after that.

      hi sir after uncomment over it is showing that
      PHP Warning: Cannot load module 'pdo_mysql' because required module 'pdo' is not loaded in Unknown on line 0. what is solution

      Comment

      • ak1dnar
        Recognized Expert Top Contributor
        • Jan 2007
        • 1584

        #4
        Originally posted by mmr315
        hi sir after uncomment over it is showing that
        PHP Warning: Cannot load module 'pdo_mysql' because required module 'pdo' is not loaded in Unknown on line 0. what is solution
        Do you have windows sets up on your system.?
        No need to uncomment PDO_MYSQL on your php.ini.Leave it commented.

        Uncommenting
        extension=php_m ysql.dll (On windows only)
        will do the job for you, just give it a try if not post back.

        Comment

        Working...