Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange XML parse error - phrets/src/Session.php(100) #138

Open
mike85741 opened this issue Mar 6, 2017 · 4 comments
Open

Strange XML parse error - phrets/src/Session.php(100) #138

mike85741 opened this issue Mar 6, 2017 · 4 comments
Labels

Comments

@mike85741
Copy link

Hello,

I was able to get everything to run locally on a Windows environment via xampp where I'm running PHP 5.6. However, on a remote Linux server, where I'm running PHP v 5.4.45 , I ran my same PHP script which worked locally in Windows but received an error on the Linux side. I don't have shell access to that Linux machine, therefore I FTP uploaded all of the files, which I thought would work. I'm not aware of anything that a composer install / update may do to correct this problem on the Linux side...

I received this strange error related to XML parsing:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/towerhom/public_html/vendor/guzzlehttp/guzzle/src/Message/Response.php:168
Stack trace:
#0 /home/towerhom/public_html/vendor/guzzlehttp/guzzle/src/Message/Response.php(168): SimpleXMLElement->__construct('<?xml version="...', 2048, false, '', false)
#1 /home/towerhom/public_html/vendor/troydavisson/phrets/src/Session.php(100): GuzzleHttp\Message\Response->xml()
#2 /home/towerhom/public_html/test_rets.php(28): PHRETS\Session->Login()
#3 {main}


Here's the print_r() output of the string that cannot be parsed into XML.

GuzzleHttp\Message\Response Object
(
[reasonPhrase:GuzzleHttp\Message\Response:private] => OK
[statusCode:GuzzleHttp\Message\Response:private] => 200
[effectiveUrl:GuzzleHttp\Message\Response:private] => http://retsgw.flexmls.com/rets2_3/Login
[headers:GuzzleHttp\Message\AbstractMessage:private] => Array
(
[server] => Array
(
[0] => Apache-Coyote/1.1
)

        [cache-control] => Array
            (
                [0] => private
            )

        [rets-version] => Array
            (
                [0] => RETS/1.7.2
            )

        [set-cookie] => Array
            (
                [0] => JSESSIONID=BC33239A3212EC1E1F4C221B8A1B37A4.rets3; Path=/rets2_3
            )

        [content-type] => Array
            (
                [0] => text/xml;charset=US-ASCII
            )

        [transfer-encoding] => Array
            (
                [0] => chunked
            )

        [content-encoding] => Array
            (
                [0] => gzip
            )

        [vary] => Array
            (
                [0] => Accept-Encoding
            )

        [date] => Array
            (
                [0] => Mon, 06 Mar 2017 08:33:32 GMT
            )

    )

[headerNames:GuzzleHttp\Message\AbstractMessage:private] => Array
    (
        [server] => Server
        [cache-control] => Cache-Control
        [rets-version] => RETS-Version
        [set-cookie] => Set-Cookie
        [content-type] => Content-Type
        [transfer-encoding] => Transfer-Encoding
        [content-encoding] => Content-Encoding
        [vary] => Vary
        [date] => Date
    )

[body:GuzzleHttp\Message\AbstractMessage:private] => GuzzleHttp\Stream\Stream Object
    (
        [stream:GuzzleHttp\Stream\Stream:private] => Resource id #72
        [size:GuzzleHttp\Stream\Stream:private] => 
        [seekable:GuzzleHttp\Stream\Stream:private] => 1
        [readable:GuzzleHttp\Stream\Stream:private] => 1
        [writable:GuzzleHttp\Stream\Stream:private] => 1
        [uri:GuzzleHttp\Stream\Stream:private] => php://temp
        [customMetadata:GuzzleHttp\Stream\Stream:private] => Array
            (
            )

    )

[protocolVersion:GuzzleHttp\Message\AbstractMessage:private] => 1.1

)

@troydavisson
Copy link
Owner

Are you able to re-produce this pretty regularly?

@mike85741
Copy link
Author

mike85741 commented Mar 21, 2017 via email

@nader14y
Copy link

nader14y commented Oct 1, 2018

I see the same error using Hostgator. Something is wrong with their server configurations.

@phoenixwade
Copy link

Did anyone ever figure this out? I see it on the Hernando Florida feed I'm trying to rebuild under Phrets 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants