MySQL Forums
Forum List  »  PHP

Re: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\Pragma\IQC\Database_Select.php on line 18
Posted by: Ulf Wendel
Date: May 05, 2006 07:22AM

Juan Botha wrote:
> The website link I used was
> http://www.siteinaweek.com/installphp5/howto.php
> and I followed their instructions to set up my php
> and IIS from scratch.

Why don't you use the PHP Manual? http://www.php.net/manual/en/install.windows.manual.php

You mentioned that you put the php.ini somewhere in C:\Windows or the like. As http://www.php.net/manual/en/configuration.php#configuration.file explains this is the very last place where PHP looks for the config file. If you have morephp.ini files in any of the directories that are searched before the Windows directory gets searched, PHP will load the other php.ini file and never consider your file.

So, the very first question is: which php.ini file is used by PHP. How do you find out? Write a small script and invoke it through your webserver.

<?php phpinfo() ?>

Search for the php.ini - which one does PHP read? If you do strange things, don't forget to check for http://www.php.net/manual/en/function.php-ini-scanned-files.php . Once you have found the php.ini re-check the extension_dir and extension setting.

If that also fails, try loading the MySQL extension manually using dl():

<?php
dl("c:/full/path/to/my/php_mysql.dll");
printf("MySQL client info: %s\n", mysql_get_client_info());
?>

If that works and using the correct php.ini does not work, then you know your php.ini is still not OK. In that case, fix the php.ini.

Ulf

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.