domdocument::domdocument() expects parameter 2 to be long,

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • malayappa
    New Member
    • Dec 2006
    • 1

    domdocument::domdocument() expects parameter 2 to be long,

    Hi All

    here is the error what i m getting

    Warning: domdocument::do mdocument() expects parameter 2 to be long, string given in D:\Program Files\Apache Software Foundation\Apac he2.2\htdocs\sa mple\mssql.php on line 47
    [php]Here is My code
    <?php
    /*session_start( );
    set_time_limit( 0);
    error_reporting (E_ALL);*/

    //complete "station\sqlexp ress" with your particular case
    $SERVER = ".";
    //$SERVER = "localhost" ;
    $ADMIN_NAME = "sa";
    //complete pass with your pass
    $ADMIN_PASS = "nanna";
    //complete database witht the name of database you whant to connect to
    $DATABASE = "Northwind" ;

    $Conexion = mssql_connect($ SERVER, $ADMIN_NAME, $ADMIN_PASS)
    or die ("Can't connect to Microsoft SQL Server");
    if($Conexion)
    {
    echo "database connected successfully".$ Conexion."<br>" ;
    }

    mssql_select_db ($DATABASE, $Conexion)
    or die ("Can't connect to Database");
    echo "conneted";

    $result=mssql_q uery("select *from Customers");
    echo "data selected";

    echo "<pre>";
    /*while ( $record = mssql_fetch_arr ay($result) )
    { //print_r($record );
    echo $record['CompanyName']."<br>";
    }
    echo "</pre>";


    $i=0;
    while ($record = mssql_fetch_arr ay($result)){
    foreach($record as $key => $value) {
    $resultArray[$i][$key]=$value;
    echo $resultArray[$i][$key]."<br>";
    }
    $i++;

    }*/

    $doc=new DomDocument('1. 0','UTF-8');
    ?>[/php]
    Here Im using Mysql 5.2.2

    Itried

    php_domxml.dll 5.2.2 and enabled it in PHp.ini

    but i am facing same problem
    plz give some answer

    Regards
    malayappa

    Before you continue: Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that.

    moderator
    Last edited by ronverdonk; Mar 3 '08, 11:07 AM. Reason: code tags
  • panditharshad
    New Member
    • Mar 2008
    • 1

    #2
    Not to worry,

    This s because of domxml library.

    If your are using PHP4 the in php.ini uncomment extension=php_d omxml.dll.

    and

    If your using PHP 5 then comment extension=php_d omxml.dll.

    Have Fun...


    Harshad Pandit,
    PHP-Pandit

    Comment

    Working...