Premature end of data error with PHP
I had the same problem and fixed it using an UPDATE query like this:
UPDATE mysql.user SET Password = PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';
Don't know why but SET Password didn't work.
To be sure that the problem is the one i think you should do this query on the mysql database:
SELECT
`user`.`Password`
FROM
`user`
WHERE
`user`.`User` = 'youruser' AND
`user`.`Host` = 'yourhost'
if the password doesn't start with a * the problem is that you still have the old encription
EDIT _ Here is a php function to create valid password for MYSQL (taken from here):
function mysql_41_password($in)
{
$p=sha1($in,true);
$p=sha1($p);
return "*".strtoupper($p);
}
Thene you can set the password manually:
//newpwd is the passowr dgenerated in php
UPDATE mysql.user SET Password = 'newpwd' WHERE Host = 'some_host' AND User = 'some_user';
FLUSH PRIVILEGES;
Premature end of data error with PHP
I had the same problem and fixed it using an UPDATE query like this:
UPDATE mysql.user SET Password = PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';
Don't know why but SET Password didn't work.
To be sure that the problem is the one i think you should do this query on the mysql database:
SELECT
`user`.`Password`
FROM
`user`
WHERE
`user`.`User` = 'youruser' AND
`user`.`Host` = 'yourhost'
if the password doesn't start with a * the problem is that you still have the old encription
EDIT _ Here is a php function to create valid password for MYSQL (taken from here):
function mysql_41_password($in)
{
$p=sha1($in,true);
$p=sha1($p);
return "*".strtoupper($p);
}
Thene you can set the password manually:
//newpwd is the passowr dgenerated in php
UPDATE mysql.user SET Password = 'newpwd' WHERE Host = 'some_host' AND User = 'some_user';
FLUSH PRIVILEGES;
XML Premature end of data
You have to close <Request>
tag at the end.
Also it's not good to build XML by hand. Use DOMDocument
class instead.
Error in xml file premature end of data in tag
You are missing a bunch of end tags. Load the file in a browser, and it will tell you the line number.
Below you will see the fixed xml:
<?xml version="1.0" encoding="UTF-8"?>
<list>
<banner id="1">
<image>http://lineagefree.com/acp/images/l2jbr.png</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='list_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="2">
<image>http://lineagefree.com/acp/images/top100mmorpg.png</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="3">
<image>http://lineagefree.com/acp/images/gamesitestop100.jpg</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="4">
<image>http://lineagefree.com/acp/images/arenatop100.png</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="5">
<image>http://lineagefree.com/acp/images/mmorpglist.jpg</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
<banner id="6">
<image>http://lineagefree.com/acp/images/top200.gif</image>
<link>http://l2j.lt/topai/balsuoti-7907.php</link>
<votes>
<link>http://l2j.lt/topai/mokamas-7907.php</link>
<regexp><div class='dlist_8' style="font-weight: bold">(.*)</div></regexp>
</votes>
</banner>
</list>
Related Topics
In PHP How to Access a ":Private" Array in an Object
How to Add More Custom Field in Linked Product of Woocommerce
Filter_Sanitize VS Filter Validate, Whats the Difference - and Which to Use
How to Make MySQL Return Utf-8
Printing PHP Script Output to File
Difference(When Being Applied to My Code) Between Int(10) and Int(12)
How to Check If User Has Already Liked the Facebook Page
Merge Two Png Images with PHP Gd Library
How to Select 10 Random Things from a List in PHP
Upload File with PHP and Save Path to SQL
Passing a Boolean Value from Checkbox in Laravel Form
How to Parse This Table and Extract Data from It
Firefox Error 'No Element Found'
How to Launch a PHP Script at Apache Startup
How to Get the Image Type in PHP