I have a reverse lookup application working on one host, but when I tried to move it to another host, it returns empty records. I'm using NetWhitepages to access the API. The PHP version on the working machine is 5.1.6, on the non-working machine the PHP version is 5.2.6. (What other information do I need to check/provide to help track this down?)
Message edited by akugel 3 years ago
5 years ago
Still no response?!?
I have this working on two Fedora Core 6 machines, but the same code fails on Fedora Core 9 and at least one other system: ( Linux dillinger 22.214.171.124-serf-xeon-c6.1-grsec #2 SMP Fri Aug 1 14:00:32 PDT 2008 x86_64 GNU/Linux )
Has anybody gotten NetWhitepages working with recent Linux releases?
In Whitepages.php, at the end of WhitePages.php Net_WhitePages->Load, if I print_r($this), under Fedora 9 I get: Net_WhitePages_Result Object ( [_dom:private] => DOMDocument Object ( ) [_params:private] => Array ( [result_type] => [result_code] => [record_count] => [search_links] => Array (  => http://api.whitepages.com/reverse_phone/1.0?phone=908-591-0714&api_key=65eac13873bce82e5901f36d178463fa ) ) )
whlie under Fedora 6 I get
Net_WhitePages_Result Object ( [_dom:private] => DOMDocument Object ( ) [_params:private] => Array ( [result_type] => success [result_code] => Found Data [record_count] => 1 [search_links] => Array ( [Whitepages.com] => http://www.whitepages.com/16176/ [Link to this api call] => http://api.whitepages.com/reverse_phone/1.0?phone=908-591-0714&api_key=65eac13873bce82e5901f36d178463fa ) [listings] => Array (  => Net_WhitePages_Listing Object ( [_params:private] => Array ( [moreinfolinks] => Array ( [View Area Code Map] => http://www.whitepages.com/16176/track/10217/interstitial/maps/NJ/?npa=908 ) [deliverable] => false [city] => Cranford [state] => NJ [persons] => Array ( ) [phones] => Array (  => Array ( [fullphone] => (908) 591-0714 [areacode] => 908 [exchange] => 591 [linenumber] => 0714 [carrier] => Verizon Wireless [rank] => primary [type] => mobile ) ) ) ) ) ) )
So somethink parsing the returned XML is different between the working FC6 machines and the non-working FC9 (and other) machines. (I have checked to make sure pho-xml is installed, so no help there)
5 years ago
This was originally tested on a Centos4.7/PHP 5.1.6 box, only because that is what my host uses. I will get onto a FC9 box with 5.2.9. I think I will need to c/o 5.2.9 on a separate box as well. I will try to update soon.
I don't understand OO programming yet, but I'm wondering whether there's a cast or typing problem. I think the fetched data isn't cast to any particular type before the access method is used. Obviously, this used to work; but I'm wondering whether OO methods are supposed to work that way, and if some stronger-typing "fix" broke the code.
4 years ago
No, type information travels around with the variables in OO. So it shouldn't need a cast or anything, right?
BaldPenguin - any progress on this?
Now I'm wondering if there's some setup for the underlying services that the Net/Whitepages.php codes needs to work correctly, and that somehow I missed getting this right on the newer machines.
4 years ago
Nothing yet, I know I used the default yum repo on Centos to setup the php/5.1.6 so am not natively aware of any special setup, I could be glad to post a php.ini, if you thought that would help.
I'm thinking that I didn't get some necessary package installed on the newer systems. Wasn't there some description of some particular linux packages that needed to be installed? I couldn't find that when I looked recently.
I seem to remember that the only requirement was the DOM classes used required PHP5 and not PHP4. Since this uses XML instead of JSON it didn't require anything else to be added.
OK, here's the skinny. PHP 5.1 and 5.2 address namespaced XML differently. 5.1 ignored the namespace thus getAttrubute('type') retrieved the attribute named 'wp:type'. 5.2 requires you ask for 'wp:type'. I will post a updated module this evening, as I have to better work out how to not break it on 5.1 and still work on 5.2
3 years ago
BaldPenguin, did you ever get this working? I checked out the source, but it's dated from early spring, 2008, so it's too old to
have this update in it (unless I'm going to an outdated source)
Please sign in to add a post.
Copyright © 2011 WhitePages.com. All rights reserved.