PHP Classes

UPS XML Tracking - PHP5

Recommend this page to a friend!

      UPS XML Package Tracking  >  All threads  >  UPS XML Tracking - PHP5  >  (Un) Subscribe thread alerts  
Subject:UPS XML Tracking - PHP5
Summary:UPS XML tracking is not working w/ php5
Messages:5
Author:Jeff Frazier
Date:2007-04-30 20:34:20
Update:2007-05-03 06:44:52
 

  1. UPS XML Tracking - PHP5   Reply   Report abuse  
Picture of Jeff Frazier Jeff Frazier - 2007-04-30 20:34:20
Hey,

I had this working w/ PHP4 but due to other reasons I have had to switch to PHP 5.2.1 Since the switch I have not been able to get the ups tracking to work. I receive the following errors:

Notice: Trying to get property of non-object in C:\Inetpub\wwwroot\CSArsenal3\Track\ups_tracker.class.php on line 166

Notice: Trying to get property of non-object in C:\Inetpub\wwwroot\CSArsenal3\Track\ups_tracker.class.php on line 310

Error
Line 166 - $nine = trim($xml["TrackResponse_Response"][0]->ResponseStatusCode[0]);
Line 310 - $eight = $xml["TrackResponse_Response_Error"][0]->ErrorDescription[0];

Any help would be greatly appreciated.

Thanks

  2. Re: UPS XML Tracking - PHP5   Reply   Report abuse  
Picture of Sergey Shilko Sergey Shilko - 2007-05-02 06:48:14 - In reply to message 1 from Jeff Frazier
ok,check the new file
ups_tracker.php5.class.php

, check your "GLOBALS" (on?off?) at php.ini
.. these errors means that
$nine = trim($xml["TrackResponse_Response"][0]->ResponseStatusCode[0]);

$xml is not an object... why - must debug, in any case you may contect me by Skype (Sergey Shilko) or ICQ 2018021805

  3. Re: UPS XML Tracking - PHP5   Reply   Report abuse  
Picture of Jeff Frazier Jeff Frazier - 2007-05-02 16:14:16 - In reply to message 2 from Sergey Shilko
Well we moved on to a new error now. First i got an error about onj variable not existing but i changed that to obj on line 166.
I had register_globals set to Off, tried changing this to On and no change in the error below

I will try and get w/ you on skype or icq but im not sure if i will be able to so here is the latest error.

Notice: Trying to get property of non-object in \Track\ups_tracker.php5.class.php on line 168

Notice: Trying to get property of non-object in \Track\ups_tracker.php5.class.php on line 312

Error

Thanks again!

  4. Re: UPS XML Tracking - PHP5   Reply   Report abuse  
Picture of Jeff Frazier Jeff Frazier - 2007-05-03 01:20:16 - In reply to message 3 from Jeff Frazier
I decided to go back to php 4 cause i figured out how to do what i needed to do in php4 and its working fine again in that.. im assuming its because php5 introduced huge xml changes

But it seemed to be the same error even after the php5 version of the class.

  5. Re: UPS XML Tracking - PHP5   Reply   Report abuse  
Picture of Sergey Shilko Sergey Shilko - 2007-05-03 06:44:52 - In reply to message 4 from Jeff Frazier
i see that you understand, yes by myself i had problems with xml parsing at php5, so the beta-release i uploded is just-a-sample, xml-parser of it must be rewritten with XML DOM Parser (at least)... but i have no time for this until it is really requested and needed , anyone can rewrite parser ;) the code is free modify.