Re: PHP cannot connect to the database
| From: | Louis Solomon [SteelBytes] | Date: | Fri, 03 Jun 2005 02:54:33 +0000 |
| Subject: | Re: PHP cannot connect to the database | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-26069@lists.php.net to get a copy of this message | ||
as a debugging tip, try running php and a test script from the cmd line,
rather then through IIS.
--
Louis Solomon
www.SteelBytes.com
"Scott Powell" <scotthpowell@yahoo.com> wrote in message
news:20050602135026.16449.qmail@web50603.mail.yahoo.com...
>
> I cannot get PHP to work with either MySQL or MS-SQL. I'm running Win 2000
> Pro with IIS. Note: PHP actually does work, just not the db connectivity.
> I followed the manual install steps.
>
> I have...
> 1) added c:\php to my PATH. phpinfo shows that it is in the PATH string.
> When testing PHP4, I've set that path to my php4 directory.
> 2) edited php.ini so that extension=php_mysql.dll and
> extension=php_mssql.dll are uncommented.
> 3) Set extension_dir = "c:\php\ext\" (which is where the files are). I've
> also installed PHP4 to php4 and set the extension_dir in that
> installation's ini file accordingly.
> 4) Restarted the PC (for both PHP installs).
>
>
> php_info.php shows that the directory is in the path (and again, PHP does
> run).
>
>
> PHP chokes on $link = mysql_connect(server, username, password). And
> MS-SQL chokes on $link = mssql_connect(server, username, password).
> Server, username and password are string literals in the code.
>
> The error message is:
> Fatal error: Call to undefined function mssql_connect() in
> c:\Inetpub\wwwroot\php_test\ms_sql_test.php on line 3
>
> If anyone has any suggestions, please let me know. I'm trying to help a
> friend with a quick zencart/phpbb site and also evaluating PHP to possibly
> migrate our office from Cold Fusion.
>
> Thanks for your help.
> Scott
>
>
>
>
> ---------------------------------
> Discover Yahoo!
> Find restaurants, movies, travel & more fun for the weekend. Check it out!