Unable To Resolve The Request "site".

We have built an API using the Yii framework. Everything is working as expected on our sandbox environment. The issue lies when we try to use production.

We are using CentOS 6.3, Apache 2.2.15, and PHP 5.3.3 for Sandbox.

We are using CentOS 6.4, Apache 2.2.15, and PHP 5.5.3 for Production.

No other differences that I can think of.

However when we send a post to the API to our production servers, we are getting the error:

Message : Unable to resolve the request "site".

File : /var/www/html/yii/framework/web/CWebApplication.php

The same post works fine on our sandbox. I’ve looked up reasons for this and all I can find is a capitalization issue between windows and linux, but we’re using linux for both environments.

I’m all out of ideas as to what could be going on. Anyone have a good place to look? Thanks in advance.

check mod_rewrite

Thanks for the response. And thanks for hosting the Olympics this year :wink:

I forgot to mention that I’ve double checked the apache config file, php.ini, and .htaccess, and they are all the same.

The strange thing is, when one goes to the URL in a browser window (https://www.example.com/SampleRequest), the error doesn’t appear. However when one makes a POST to that url, the error message happens.

That’s weird.

Can you see any rules that restricts posting to that url? (controller filters, …)

<Limit GET> at vhost? but you’ve checked it already…

Ok, one last idea: have you restarted apache?

Apache has been restarted multiple times.


  1. GET request opens the url w/o error

  2. POST request to that url causes the error


Is there any info in runtime/app.log?

That is correct.

I’ve enabled all logging, and there is nothing being entered into application.log.

I entered in a syntax error and tried the GET. An entry was added to the file, so logging appears to be working successfully.

Same syntax error with the post, no entry. Remove the syntax error, no entry.

Btw how come that you have request "site" and no (for example) "site/index"?

Is it some kind of RESTful app?

Can you show how your rules config looks like?

PS. assuming that you have just copied one server config to another server, the common issue here is file access permissions, plz check these also

There is no REST functionality, it’s just http authorization in the headers and a POST. They send a POST to https://www.example.com/SampleRequestRQ. We have one controller for each type of request and all the controller expects is a single post of XML.

Here are the logging rules:










Here is the .htaccess:

RewriteEngine on

# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php

RewriteRule . index.php

I’ve reviewed file perms and they are the same. :-/

I meant routing rules.

Is this what you’re looking for?










Apache logs aren’t showing anything either when we post.

Strange thing I found:

if I’m ssh’d into a separate virtual machine located on my computer and run a curl from the command line, it doesn’t work and I get a


But when I run the same curl from the command line from OSX, it works.

Doing a post for both curls. SElinux is disabled and iptables are turned off.