Post by daveporter » Fri Apr 08, 2011 12:10 pm

Hi All,

I've installed OZPost but am getting the following error when I get to the shipping page when processing an order.

I also installed the Australia Post shipping pluging, and it works fine!

I'm on OC 1.4.9.3

Any thoughts ?

TIA, Dave

Code: Select all

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Space required after the Public Identifier in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : SystemLiteral " or ' expected in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php:280 Stack trace: #0 /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php(280): SimpleXMLElement->__construct('<!DOCTYPE HTML ...') #1 /home/mywebsite/public_html/store/catalog/controller/checkout/shipping.php(71): ModelShippingOzpost->getQuote(Array) #2 [internal function]: ControllerCheckoutShipping->index() #3 /home/mywebsite/public_html/store/system/engine/front.php(47): call_user_func_array(Array, Array) #4 /home/mywebsite/public_html/store/system/engine/front.php(29): Front->execute(Object(Action)) #5 /home/mywebsite/public_html/store/index.php(219): Front->dispatch(Object(Action), Object(Action)) #6 {main} thrown in /home/mywebsite/public_html/store/catalog/model/shipping/ozpost.php on line 280

New member

Posts

Joined
Fri Mar 19, 2010 9:52 am

Post by RodG » Sat Apr 09, 2011 10:06 pm

Allthough this looks very messy it all comes back to a single problem. For one reason or another your server isn't recieving valid data from the ozpost.net servers.

Enabling the DEBUG option should provide an output that will be more helpful in solving this issue.

Cheers
Rod

Newbie

Posts

Joined
Sat Feb 12, 2011 5:09 pm

Post by hbg » Wed Apr 13, 2011 9:01 am

I have a similar error.

Debugging information
Item 1-1 Samuel Willards Smooth Rum Parcel
Weight 60.00gms Items 1 Weight 66gms
Dimensions 110.00 x 35.00 x 35.00(mm) 110.00 x 35.00 x 35 (mm)
Cube / Weight 134750cc / 33.6875Kgs 134750cc / 33.6875Kgs
Server response time 0.165ms
ServerQuery
/postage.php?weight=66&height=35&width=35.00&length=110.00&value=10.95&fromcode=2290&Osub=Charlestown&destcode=2267&Dsub=Wangi+Wangi&flags=0&host=Homebrew+Inn&version=1.0.2&ef=0&deadline=13&maildays=31&lead=2
Server Returned:

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Space required after the Public Identifier in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : SystemLiteral " or ' expected in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php:280 Stack trace: #0 /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php(280): SimpleXMLElement->__construct('<!DOCTYPE HTML ...') #1 /home/homebrew/public_html/opencart/catalog/controller/checkout/guest_step_2.php(107): ModelShippingOzpost->getQuote(Array) #2 [internal function]: ControllerCheckoutGuestStep2->index() #3 /home/homebrew/public_html/opencart/system/engine/front.php(47): call_user_func_array(Array, Array) #4 /home/homebrew/public_html/opencart/system/engine/front.php(29): Front->execute(Object(Action)) #5 /home/homebrew/public_html/opencart/index.php(219): Front->dispatch(Object(Action), Object(Action)) #6 {main} thrown in /home/homebrew/public_html/opencart/catalog/model/shipping/ozpost.php on line 280

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by RodG » Wed Apr 13, 2011 12:43 pm

Thanks for posting that. Alas, it only provides more questions than it does answers.

First up though, to see what the server *should* have returned we only need to copy the ServerQuery string and post it to the ozpost.net server using your web browser:

Using the ServerQuery string you provided above, the full URL would be:
http://ozpost.net/postage.php?weight=66 ... =31&lead=2

If you could confirm that using the URL does indeed provide 'valid' quotes (albeit, badly formatted) then we can also confirm that it is somehow server related. It this is the case then perhaps if you could let me know which versions of opencart, php and MySQL are you using? (If I can setup and tun the same versions I may be able to duplicate the problem).

Also, is SSL enabled? (Does it make any difference?)

Oh, one thing worth checking is the Sysytem/Settings/Display Errors:
It *shouldn't* make any difference but it would be worth toggling this to see if it has an effect (setting it to 'No' will suppress any unexpected php error messages that could cause this unexpected output).

Thanks in advance for any other help or feedback that you can provide.

Cheers
Rod

Newbie

Posts

Joined
Sat Feb 12, 2011 5:09 pm

Post by hbg » Mon Apr 18, 2011 11:43 am

Hi, thanks for replying.
Firstly I don't have SSL enabled, as I don't have it yet. I was trying to get everything up and running.
Opencart = 1.4.9.3
PHPMyadmin = 3.3.9.2

I have also been using an Import/Export program and uploading/downloading products.

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by hbg » Mon Apr 18, 2011 4:17 pm

Using the ServerQuery string you provided above, the full URL would be:
http://ozpost.net/postage.php?weight=66 ... =31&lead=2
Below was the response:-
RPP4.755Parcel under 250gmPPS56.305500gm SatchelREG7.706Registered Parcel under 250gmPPSE58.803500gm Express SatchelEXP8.803Express Parcel under 500gmPPSP512.803500gm Platinum SatchelPLT12.803Platinum Parcel under 500gmCOD15.656Cash On Delivery 74.55.148.130 Mon Apr 18, 2011 16:35 (SA Server Time) 17:05 (NSW Store Time) Thu 21st of Apr 0.00 0.00 2.95 CHARLESTOWN WANGI WANGI 45

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by RodG » Tue Apr 19, 2011 9:56 pm

This is the response that we are expecting.... which is a far cry from what your *server* is getting. Ergo, the problem is still somehow related to your server rather than the ozpost server.

Did you try checking the System/Settings/Display Errors setting? Does changing it make any difference?

Are you using a cURL proxy server? Can you disable.bypass it?

You might also ask your webhost if they block outgoing access from your server, many do, in which case you'll need to ask them to allow access to http://ozpost.net

I'm not sure what else I can suggest really, but I do think that you may need help from your webhost to resolve it, because that is where the problem exists.

Cheers
Rod

Newbie

Posts

Joined
Sat Feb 12, 2011 5:09 pm

Post by hbg » Wed Apr 20, 2011 7:19 am

Thanks Rod. When I disabled Ozpost & enabled local pickup, it went thru to the next step. I will forward these details onto him.
I did try changing the errors setting, and it still had the same response.

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by hbg » Mon Apr 25, 2011 6:25 pm

On a side note, I now have SSL enabled. I have also loaded another Auspost module (dedicated), which seems to work. The ozpost doesn't move any further than that screen, even if I have other options loaded. As you pointed out above it appears to be something the webhost is blocking. I do prefer to use yours as it includes Fastway, which will be my preferred shipping option.

Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia
Who is online

Users browsing this forum: No registered users and 1 guest