The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XML Parsing Issues

Discussion in 'General Discussion' started by jfor007, Jan 23, 2007.

  1. jfor007

    jfor007 Registered

    Joined:
    Sep 1, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to move one of my sites to a cPanel server that we own, but I am having an issue with some XML parsing on the site. We have a locator that uses Mapquest, but when I try to parse the XML file that mapquest returns, it seems to not be working. Here's a sample of the code with an explanation of what's going on:

    Code:
    
    $dom = new DOMDocument();
    if(!empty($zipcode)){
       $dom->load("http://xml.sa.mapquest.com/?transaction=search&country=".$country."&radius=50&postalCode=".$zipcode."&clientId=*****");
    }
    else{
       $dom->load("http://xml.sa.mapquest.com/?transaction=search&country=".$country."&radius=50&city=".$city."&stateProvince=".$state."&clientId=*****");
    }
    
    $recordID = $dom->getElementsByTagName('recordId');
    		
    foreach($recordID as $request) {
    	$steve[] = $request->textContent;
    }
    
    
    The $steve array doesn't seem to get populated at all, even when the xml file returns multiple results. This works on our dev server, but I can't seem to figure out what is wrong on the live cPanel server and why it's not working there. Any help would be greatly appreciated.

    Thanks,
    Jeff
     
  2. jfor007

    jfor007 Registered

    Joined:
    Sep 1, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I still can't seem to figure this out. Here's some more information I forgot to post.

    PHP Configure Command:
    -------------------------
    './configure' '--enable-pic' '--with-apxs=/usr/local/apache/bin/apxs' '--with-libdir=lib64' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-ftp' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-xmlrpc' '--with-zlib'

    Our dev server is running Apache 2.0.52 and it seems to work on there, while the live server running cPanel is only using Apache 1.3.37. I don't think this is causing it, but I'm not a pro, so I'm throwing it out there anyway.

    Please, somebody must know what is going on.
     
  3. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Hi,

    I am not a great programmer, but you noted differences in apache, whats the difference in PHP's? Either of them of them using Zend or eaccelerator, if so what version's?

    We recently did this for a customer (Store Locator) and we used phpgooglestorelocator, it worked great.
     
  4. jfor007

    jfor007 Registered

    Joined:
    Sep 1, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply.

    The PHP versions are the same, with both running PHP 5.1.6. I wanted to be sure this was the same in both cases. I would also be running Apache 2 on the cPanel server, but we are not willing go with the Edge build for our production server. Both servers are using the Zend 2.1.0 engine, and no eaccelerator on either of them. What else might be causing it?
     
  5. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Really what I meant by Zend was, Zend Optimizer if they are the same?
     
Loading...

Share This Page