473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

Hi All

here is the error what i m getting

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

//complete "station\sqlexpress" 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_query("select *from Customers");
echo "data selected";

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


$i=0;
while ($record = mssql_fetch_array($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
Mar 3 '08 #1
1 6076
Not to worry,

This s because of domxml library.

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

and

If your using PHP 5 then comment extension=php_domxml.dll.

Have Fun...


Harshad Pandit,
PHP-Pandit
Mar 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Colin McGuigan | last post by:
Shorter: How do I tell DOMDocument->load() what encoding I want it to use? Longer: I search for and process XML files from elsewhere, and need to transform them with some XSLTs. No problem. ...
1
by: Mini Mouse | last post by:
Hiya folks, I'm getting the following error(s) below and I'm at a bit of a loss as to how to correct it. When I give it a parameter it then complains it needs two parameters and the second one...
3
by: hb | last post by:
Hi, I need to use MSXML2.DOMDocument in my ASP page. The following is my code: xml.asp: ===== <% dim sx sx="<root><a>text1</a><b>text2</b></root>" dim xd
3
by: Dean Slindee | last post by:
Newbie question: Any easy way to convert a DOMDocument to a System.Xml.Document? Dim DOMDocument As DOMDocument40 to this Dim xmlDoc As System.Xml.XmlDocument Thanks,
0
by: pieV | last post by:
I am using Msxml2.DOMDocument to pull xml fragments from different sibling websites. This works off the net, however during testing on my localhost, it fails if called from an external website....
2
by: Sebastian Araya | last post by:
Hello, I'm trying to create a single function to append new nodes to a DOMDocument object: public function addElement( $element, $name, $value = '', $attrs = Null ) { if( !( $created =...
0
by: paulroskilly | last post by:
Hi, Im using the DomDocument class in PHP5 to parse thru a xml file, but it keeps timing out on the load method : $dom = new DomDocument(); $dom->load("<some url>"); Browsing to the url in...
2
by: J˙Giusł vs ::NRG::ius | last post by:
Hi all. I have this script ----------------------------------------------------------- <?php $doc = new DOMDocument(); $doc->load('books.xml'); echo $doc->saveXML(); ?>
4
by: muralibala68 | last post by:
Hi, Is there a way to find the total size of the DOMDocument created using xerces C++ API (without serializing it) ? Thanks.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.