a call to
$this->redirectToAction('login');
OR
$this->redirectTo(array("action"=>"login"));
is resulting in the app attempting to redirect to
https://localhost:80/page/login
am I doing something wrong?
here is a dump of the $_SERVER var.
Array
(
[ALLUSERSPROFILE] => C:\Documents and Settings\All Users
[APR_ICONV_PATH] => C:\Program Files\Subversion\iconv
[CommonProgramFiles] => C:\Program Files\Common Files
[COMPUTERNAME] => DKS
[ComSpec] => C:\WINNT\system32\cmd.exe
[CONTENT_LENGTH] => 0
[GATEWAY_INTERFACE] => CGI/1.1
[HTTPS] => off
[HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[HTTP_ACCEPT_LANGUAGE] => en
[HTTP_CONNECTION] => keep-alive
[HTTP_HOST] => dev.dakotafin.com
[HTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/522.11.1 (KHTML, like Gecko) Version/3.0.3 Safari/522.12.1
[HTTP_COOKIE] => __utmz=52353724.1187897650.1.1.utmccn=(referral)|utmcsr=forum.akelos.org|utmcct=/discussion/20/akelos-on-iis/|utmcmd=referral; __utma=203598469.81951998.1187898895.1187898895.1187898895.1; __utmz=203598469.1187898895.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); AK_SESSID=1lvfkp4kismq21mknb748cdip7; __utmc=52353724; __utma=52353724.644858744.1187897650.1187897650.1188231480.2
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_CACHE_CONTROL] => max-age=0
[INSTANCE_ID] => 6
[LOCAL_ADDR] => 192.168.1.30
[NUMBER_OF_PROCESSORS] => 1
[Os2LibPath] => C:\WINNT\system32\os2\dll;
[OS] => Windows_NT
[Path] => C:\Program Files\PHP\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Subversion\bin
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
[PHPRC] => C:\Program Files\PHP\
[PROCESSOR_ARCHITECTURE] => x86
[PROCESSOR_IDENTIFIER] => x86 Family 6 Model 8 Stepping 6, GenuineIntel
[PROCESSOR_LEVEL] => 6
[PROCESSOR_REVISION] => 0806
[ProgramFiles] => C:\Program Files
[QUERY_STRING] => ak=/page/authenticate
[REMOTE_ADDR] => 65.87.185.48
[REMOTE_HOST] => 65.87.185.48
[REQUEST_METHOD] => GET
[SCRIPT_NAME] => /index.php
[SERVER_NAME] => dev.dakotafin.com
[SERVER_PORT] => 80
[SERVER_PORT_SECURE] => 0
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SOFTWARE] => Microsoft-IIS/5.0
[SystemDrive] => C:
[SystemRoot] => C:\WINNT
[TEMP] => C:\WINNT\TEMP
[TMP] => C:\WINNT\TEMP
[USERPROFILE] => C:\Documents and Settings\Default User
[windir] => C:\WINNT
[SCRIPT_FILENAME] => C:\drv\dakotafin.com\public\index.php
[ORIG_PATH_INFO] => /index.php
[ORIG_PATH_TRANSLATED] => C:\drv\dakotafin.com\public\index.php
[PHP_SELF] => /index.php
[REQUEST_TIME] => 1188233426
)
Array
(
[lang] => en
[__flash] =>
[__flash_options] =>
[redirect_back_to] =>
)
apparently IIS does not have the 'REQUEST_URI' defined resulting in the app thinking it isnt a valid request, and defauts to localhost:80
which leads me to wonder why it is defaulting to using SSL, but putting port 80 in the address....
actually, found that
function isSsl()
{
return isset($this->env['HTTPS']);
}
since IIS says HTTPS = false, it gets set as true by akelos.
should be
/**
* Return 'https://' if( this is an SSL request and 'http://' otherwise.
*/
function getProtocol()
{
return (isset($this->env['HTTPS']) && $this->env['HTTPS'] == 'true') ? 'https://' : 'http://';
}
/**
* Is this an SSL request?
*/
function isSsl()
{
return (isset($this->env['HTTPS']) && $this->env['HTTPS'] == 'true');
}
Not sure this would work for other servers though. IIS's $_SERVER doesnt seem to report the same info as apache.
According to your $_SERVER['HTTPS'] = 'off' we should have something like
/**
* Return 'https://' if( this is an SSL request and 'http://' otherwise.
*/
function getProtocol()
{
return $this->isSsl() ? 'https://' : 'http://';
}
/**
* Is this an SSL request?
*/
function isSsl()
{
return isset($this->env['HTTPS']) && ($this->env['HTTPS'] === true || $this->env['HTTPS'] == 'on'));
}
Regarding the REQUEST_URI can you try to add this to your config.php file and tell me is the REQUEST_URI and generated URL's are right now?
$_SERVER['REQUEST_URI'] = ( isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '')));
that worked, with the elimination of one extra ')' at the end of the isSsl method.
/**
* Is this an SSL request?
*/
function isSsl()
{
return isset($this->env['HTTPS']) && ($this->env['HTTPS'] === true || $this->env['HTTPS'] == 'on');
}
Great!! I've committed the changes into the trunk at rev.327
If you could hang around the IRC irc.freenode.net #akelos we could talk about which unit tests fail on ISS and MSSQL so we can work on them.
Jerrod, from the output of your tests I think that you'll also need to update ./script and ./tests as well
1 to 7 of 7