locked
IIS7/MySql/PHP Problems in Vista RRS feed

  • Question

  • User1221035515 posted

    Hi I have PHP installed on a localhost using IIS7 (Vista Home). I have been googling this problem for hours and I have yet to find a solution that has been effective.

    When I try to use a PHP/MySql script, I keep getting this error: Fatal error: Call to undefined function mysql_connect() in ... line ..

     global $DB_SERVER,$DB_USER,$DB_PASSWORD,$DB_NAME;

      $con=mysql_connect($DB_SERVER,$DB_USER,$DB_PASSWORD) or die("Errore: Non riesco a connettermi al server MySql $DB_SERVER");
      mysql_select_db($DB_NAME,$con)                       or die("Errore: Non riesco a selezionare il database $DB_NAME");
      return $con;
     }

    So far all of my research has led me to understand that my MySql and IIS aren't configured properly.

    If someone has solution to this, I would be ecstatic.

    One option I was thinking about doing was to use Apache instead of IIS. If I install Apache, I am assuming that I need to shut down IIS first? Would I also have to uninstall PHP too and then reinstall it again?

     Thanks,

    Mendi

    Wednesday, July 16, 2008 9:14 AM

Answers

  • User-2064283741 posted

    Have you tried:

    http://www.tommcfarlin.com/2008/05/15/php-iis-addressing-fatal-error-call-to-undefined-function-mysql_connect/

    http://www.phplivesupport.com/documentation/viewarticle.php?aid=73&pid=3

    there are countless suggestions from google

    http://www.google.co.uk/search?q=iis+Fatal+error%3A+Call+to+undefined+function+mysql_connect()+in+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, July 16, 2008 9:57 AM
  • User2072887442 posted

     You do not need to uninstall anything, all you need is to configure the system properly.

     Please create a small PHP file with the following content:

    <?php phpinfo();

    Open it and veryfy that you corrected the right PHP.ini (search for Loaded Configuration File entry).

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, July 16, 2008 6:29 PM
  • User1221035515 posted

     Hi, thanks so much for responding Alex. I checked, and it's referencing the right file location. These are the instructions I used to set up, so if anything is missing from here, than maybe that's my problem I guess: http://www.maximumpcguides.com/how-to-create-a-windows-vista-iis7-mysql-php-web-server/.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, July 17, 2008 12:53 AM

All replies

  • User-2064283741 posted

    Have you tried:

    http://www.tommcfarlin.com/2008/05/15/php-iis-addressing-fatal-error-call-to-undefined-function-mysql_connect/

    http://www.phplivesupport.com/documentation/viewarticle.php?aid=73&pid=3

    there are countless suggestions from google

    http://www.google.co.uk/search?q=iis+Fatal+error%3A+Call+to+undefined+function+mysql_connect()+in+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, July 16, 2008 9:57 AM
  • User1221035515 posted

     Hey thanks so much for for responding. I tried both those links several days ago, made the necessary changes and it still gives me the same error.

     I think I should probably  just install Apache; do I need to uninstall PHP first though?

    Wednesday, July 16, 2008 11:10 AM
  • User2072887442 posted

     You do not need to uninstall anything, all you need is to configure the system properly.

     Please create a small PHP file with the following content:

    <?php phpinfo();

    Open it and veryfy that you corrected the right PHP.ini (search for Loaded Configuration File entry).

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, July 16, 2008 6:29 PM
  • User1221035515 posted

     Hi, thanks so much for responding Alex. I checked, and it's referencing the right file location. These are the instructions I used to set up, so if anything is missing from here, than maybe that's my problem I guess: http://www.maximumpcguides.com/how-to-create-a-windows-vista-iis7-mysql-php-web-server/.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, July 17, 2008 12:53 AM