That’s a hosting management solution, not a webserver. The underlying webserver were of interest. It is my understanding that this is most likely Apache httpd followed by nginx.
Your entry script is the index.php handling and routing all incoming requests. It should be in the docroot of your project.
So I copied and pasted the code inside index.php, where it calls the framework like so, but it’s still showing failed
<?php
function api_request_uri()
{
if (!empty($_SERVER['REQUEST_URI']))
{
return $_SERVER['REQUEST_URI'];
}
else
{
$uri = $_SERVER['SCRIPT_NAME'];
if (!empty($_SERVER['QUERY_STRING']))
{
$uri .= '?'.$_SERVER['QUERY_STRING'];
}
$_SERVER['REQUEST_URI'] = $uri;
return $uri;
}
}
// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createWebApplication($config)->run();
If it try to run the web app I get 500 - Internal server error.
Also I tried placing the code after the include calls
Well, you weren’t supposed to copy that code in as-is. Anyway, can you try to follow the instructions on this wiki page and see if your situation improves? I think your greatest problem is IIS not passing the query string to PHP correctly.
Oh, and I’m afraid my support has got to end here as I’m not proficient with IIS
No the requirements script runs fine, one of the requirements failed from the list. I can run regurlar PHP scripts fine. This is the one that failed $_SERVER variable
From what I remember, to get this type of thing running onIIS, I had to tweak a web.config file in the web data folder. Don’t remember much more right now, but I can look it up for you if you don’t have this solved.
Hmm, my issues with IIS were actually different (trying to remove index.php from the URL and having permissions issues when changing the file).
But I just found this fix:
@jacmoe, think we should add a github issue about this? Wouldn’t be too hard to add that line to CHttpRequest and it could really help IIS folks with their problems …