Re: Beta problems
Hey. Well I’m getting closer to finding out a solution for my group forums problem. I know by digging deep into the bowels of the code that group forums is using, that in my case, it is eventually winding up at doing a curl_exec() call looking for the header from the bbpress install. It uses that to figure out the ‘pingback’ url for bbpress. It’s part of the xmlrpc stuff that we have to enable to get it to work.
This curl_exec call is part of a very common php lib that is used to go do http GETs and other nice things. That curl_exec() call always returns 404 on my linux dedicated virtual server box.
I’ve been beating my head against why this is happening for days now and sent off a tech support email to my host. This is the conversation between us.
I’ve got WordPress MU 2.7 trunk installed on my DV and it uses the curl_exec() function to grab some stuff from the returned header info. It’s not working at all on my DV. It always returns 404 even for a valid url.
This works fine on another box I’ve got running. Same code just different environment. It seems like curl isn’t working right here.
I tried a little test script as follows:
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, “http://ourcommoninterest.org”);
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
// close cURL resource, and free up system resources
Can’t get more basic than that. The url it is trying to get is to a valid domain on my DV. This script returns an ‘apache test page’, not the normal results I’d expect if I visited with a browser. WPMU is up and running at that above url.
Trying a different url such as http://ourcommoninterest.org/bbpress/ gets back 404. This is also a valid working url on my DV. I’ve been trying to figure this one out for days without luck.
Any help would be appreciated muchly!
My host Media Temple’s response:
You are getting this 404 error when running curl on the server because ourcommoninterest.org is set to the default domain for the ip address. When the server does a curl on this domain it looks in the host file and brings up 127.0.0.1. This localhost address isn’t setup on the (dv) because it is in a virtual environment so it brings up the 404 error.
You can either use the ip address when referencing this domain through curl or create a new domain and set that domain to be the default domain. If you have any further questions regarding your (mt) Media Temple services, please feel free to contact us at any time.
My confused reply:
Sorry Frank. I’m new to this so I’m not getting the explanation or the solution. Let me echo back what I’m not hearing very well.
When curl_exec() is run from the same box the domain is hosted on, it goes out and gets results from 127.0.0.1 (localhost) when querying ‘ourcommoninterest.org’?
When I run the same curl_exec() with the same param ‘ourcommoninterest.org’ on a different server, it goes out, gets dns resolution, finds it on the DV at media temple, doesn’t get 127.0.0.1 but gets the ip address for ‘ourcommoninterest.org’ and is happy to return the results it finds there. (not 404)
I’m actually trying to get a result back from the url ‘http://ourcommoninterest.org/bbpress/’. So to bypass the hosts file problem I can just use ‘http://whatevermyipaddressis/bbpress/’ to get the results I’m looking for?
Ya lost me completely on creating a new domain and setting that to the default domain. This would be a dummy domain that I just create thru plesk and still leave ‘ourcommoninterest.org’ hooked up to it’s current ip address?
(welcome to noob tech support)
This just happened a couple of minutes ago and frankly I’m no closer to understanding a solution. The only thing I can gather from all this tech noise is that it’s a result of being hosted as a dedicated virtual server.