Since today (about 13h) i' m getting problems to parse an XML document for some reason I totaly ignore because suddenly the same code that I didn´t change for more than one week isn't working know. Here is the code, but 99,99% sure it doesn't come from it (was really working weel until this afternoon). Here is my PHP code :
Code: Select all
$resProj = curl_process ($urlProj, $user, $pass);
$proj_xml = new SimpleXMLElement($resProj);I started debugged it (I'm using Eclipse 3.4.1 and PHP 5). After going through a lot of php files and classes called automatically when using SimpleXML, I finally arrived to an SessionHandlerLite.inc file in which the debuggor stoped in this function :
Code: Select all
public static function close()
{
global $dbs;
// close database-connection
return @mysql_close($dbs);
}Just before this close function, there is the open function which uses the @mysql_pconnect
Code: Select all
public static function open($savePath, $sessName)
{
global $dbs;
// open database-connection
$host = trim(file_get_contents("/xxx/xxx"))=="dev" ? "server.company.com" : "192.xxx.xxx.xxx";
$dbName = "php_sessions";
$dbHandle = @mysql_pconnect($host,"xxxx","xxxx");
$dbSel = @mysql_select_db($dbName,$dbHandle);
// return success
if(!$dbHandle || !$dbSel)
return false;
$dbs = $dbHandle;
return true;
}andWarning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found in /home/xx/xx/xx/xx/xx/xx/envio_datos.php on line 137
And here finally are my questions :Exception: String could not be parsed as XML in /home/xx/xx/xx/xx/xx/xx/envio_datos.php on line 137
Can it be linked to one of this two mysql functions, particulary @mysql_pconnect() because I saw on Internet it could have problems using this instead of mysql_connect(), but why should it happen only know ?
Is it possibly due to a server fall ? In this case which one ? One in my company or one mysql database o server referenced in some default library ?
How could you explain the fact that the same piece of code was working grate since one month and suddenly not any more ?
Do you need more information for my problem ? I don't really know what kind of information could be useful due to my lack of experience ...
Anyway any help should really be great, even if it is for telling me I have to go through DOM instead of SimpleXML
Thanks.