Hello,
I don't use MSSQL so I could be wrong. Anyway, let me try ;)
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> Hope someone can help me with this.
> I need to connect to a MS SQL database but my attemps fail once and
> again.
> This is the error message I get when try to connect:
>
> Fatal error: Call to undefined function: mssql_connect() in
> /var/www/htdocs/DB_conn.php on line 8
>
> The script is very simple:
>
> <?php
>
> $hostname = "10.0.0.206:1433";
> $username = "sa";
> $password = "";
> $dbName = "dbname_here";
>
> $idLink = mssql_connect($hostname,$username,$password) or die("
> DATABASE
> FAILED TO RESPOND.");
> mssql_select_db($dbName) or die("Table unavailable");
>
> ?>
>
> Now, this is the info I can provide:
>
> 1) PHP version 4.3.0-dev
>
> 2) phpinfo shows:
> './configure'
> '--prefix=/usr/local'
> '--enable-module=so'
> '--with-mod_charset'
> '--enable-sockets'
> '--enable-memory-limit'
> '--with-sybase=/usr/local/freetds'
Perhaps, because you don't have --with-mssql=/path/ here?
<from_the_manual>
Installation
The MSSQL extension is enabled by adding extension=php_mssql.dll to
php.ini.
To get these functions to work, you have to compile PHP with --with-
mssql=[DIR], where DIR is the FreeTDS install prefix.
</from_the_manual>
> 3) Of course, freetds is located at /usr/local/freetds and works
properly.
> It was tested using tsql -H -p -U and it's ok.
>
> 4) I also tried adding #!/usr/local/bin/php to try it as a shell
scripting
> thing and it WORKS! Which is very confusing.
Well, you can actually have two *different* versions of php so it's
possible that they were compiled in different ways...
- E
...[snip]...
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php