[nycphp-talk] mssql_connect() problem
Sasa Rakic - Gmail
rakics at gmail.com
Tue Feb 21 05:39:20 EST 2012
Hi Paul,
>From path it seems that you have windows installed, could you please
Tell me does in your PHP ini you have this three lines uncommented:
Commented
; extension=php_mssql.dll
Uncommented:
[PHP_MSSQL]
extension=php_mssql.dll
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll
Best regards,
Sasa
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Charles Vasquez
Sent: Tuesday, February 21, 2012 5:28 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] mssql_connect() problem
HI all,
Paul. You may also want to check you systems path variable for php.ini. You may also want to examine phpinfo for the location of the php.ini file. One thing that worked for me is to copy the php.ini file from the directory resides in currently c:\Windows directory.
Hope this helps,
Charles
On Mon, Feb 20, 2012 at 11:14 PM, tuon1 at netzero.net <tuon1 at netzero.net> wrote:
I'm a novice in mssql world and just getting started to learn how to program mssql in PHP. I'm having trouble getting PHP to execute my code below. It seems that PHP doesn't recorgnize mssql_connect() as the error message stated so. See the error message following the code.
Can anyone tell me what's wrong with it?
Thanks in advance.
Paul
<?php
$database="db40442xxx";
$localhost="db40442xxx.db.example.com";
$username="dbo40442xxx";
$password="databasepass1";
/* Initialize and connect the database */
$conn = mssql_connect($localhost, $username, $password); //Line 8
if (!$conn)
{
die('Could not connect: ' . mssql_get_last_message());
}
mssql_select_db($database, $conn) or die( "Unable to select database. " . mssql_get_last_message());
?>
Here's the error message:
Fatal error: Call to undefined function mssql_connect() in E:\kunden\homepages\5\d397017418\www\Example\Registration\CreateTable.php on line 8
____________________________________________________________
<http://thirdpartyoffers.netzero.net/TGL3232/4f431a3e6ff417faea6st04duc> Refinance for 2.125%/2.989% APR
Loans under 729K usually qualify for US GOV backed refinance programs
<http://thirdpartyoffers.netzero.net/TGL3232/4f431a3e6ff417faea6st04duc> theeasyloansite.com
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/show-participation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20120221/e13a79a3/attachment.html>
More information about the talk
mailing list