php-windows Digest 3 Jun 2005 03:04:54 -0000 Issue 2685
Topics (messages 26068 through 26069):
PHP cannot connect to the database
26068 by: Scott Powell
26069 by: Louis Solomon [SteelBytes]
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
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!
--- End Message ---
--- Begin 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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> 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!
--- End Message ---