MySQL Call to undefined function ..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stormblast-
    Senior Member
    • Jun 2004
    • 112
    • 3.8.x

    MySQL Call to undefined function ..

    I'm about to move my vB Forum to an IIS 6 Server on Windows 2003 Server (essential).

    I installed PHP5, it's working fine (made a test.php with echo "asdf"; and it's getting displayed).

    I installed MySQL 4.1.x - running as service.

    I added "C:\Programme\PHP\ext\" to my PATH Variable in Windows.

    I edited C:\Programme\PHP\php.ini :
    (removed semis)
    extension_dir = "C:\Programme\PHP\ext"

    extension=php_gd2.dll
    extension=php_mysql.dll
    extension=php_openssl.dll
    extension=php_zip.dll
    libmysql.dll and libmysqli.dll exist in C:\Programme\PHP\ext.

    However, I'm still getting Fatal error: Call to undefined function mysql_connect() in C:\root\domains\catch-your-deal.de\index2.php on line 6

    index2.php is a test file with the following content:
    PHP Code:
    <?
    echo "test";

     
    phpinfo(); 

        
    mysql_connect('localhost''xxx''xxx') or die ('Could not fetch data: '.mysql_error());
        
    mysql_select_db('xxx');

    $user mysql_query("SELECT ID FROM user WHERE ID='1'"); // just a test
    echo $user;
    ?>
    I have no idea why it won't work. Could anyone please help me out?

    Thanks!
    Last edited by stormblast-; Tue 5 Jul '05, 12:42am.

  • stormblast-
    Senior Member
    • Jun 2004
    • 112
    • 3.8.x

    #2
    I just noticed:
    (PHPINFO) PHP CORE:
    extension_dir C:\php5 C:\php5
    Why's that? In my PHP.ini I got: extension_dir = "C:\Programme\PHP\ext"
    and i only got 2 PHP.ini's on the whole system.
    C:\Programme\PHP\php.ini
    C:\Windows\php.ini (for testing it's the same as above)

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...