« Previous Next »

Thread: IIS7/MySql/PHP Problems in Vista

Last post 07-17-2008 12:53 AM by mendir200. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-16-2008, 9:14 AM

    • mendir200
    • Not Ranked
    • Joined on 07-07-2008, 11:06 AM
    • Posts 7

    IIS7/MySql/PHP Problems in Vista

    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

  • 07-16-2008, 9:57 AM In reply to

    Re: IIS7/MySql/PHP Problems in Vista

    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

     

  • 07-16-2008, 11:10 AM In reply to

    • mendir200
    • Not Ranked
    • Joined on 07-07-2008, 11:06 AM
    • Posts 7

    Re: IIS7/MySql/PHP Problems in Vista

     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?

  • 07-16-2008, 6:29 PM In reply to

    Re: IIS7/MySql/PHP Problems in Vista

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

  • 07-17-2008, 12:53 AM In reply to

    • mendir200
    • Not Ranked
    • Joined on 07-07-2008, 11:06 AM
    • Posts 7

    Re: IIS7/MySql/PHP Problems in Vista

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

     

Page 1 of 1 (5 items)
Microsoft Communities