We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS7/MySql/PHP Problems in Vista [Answered]RSS

4 replies

Last post Jul 17, 2008 12:53 AM by mendir200

  • IIS7/MySql/PHP Problems in Vista

    Jul 16, 2008 09:14 AM|mendir200|LINK

    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

  • Rovastar Rovastar

    5495 Posts

    MVP

    Moderator

    Re: IIS7/MySql/PHP Problems in Vista

    Jul 16, 2008 09:57 AM|Rovastar|LINK

    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

     

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS7/MySql/PHP Problems in Vista

    Jul 16, 2008 11:10 AM|mendir200|LINK

     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?

  • Re: IIS7/MySql/PHP Problems in Vista

    Jul 16, 2008 06:29 PM|Alex.W474|LINK

     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).

  • Re: IIS7/MySql/PHP Problems in Vista

    Jul 17, 2008 12:53 AM|mendir200|LINK

     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/.