Welcome Guest, Not a member yet? Register   Sign In
Codeigniter has trouble finding the correct route
#1

[eluser]slapo[/eluser]
Hello everyone,

I'm trying to get a web service running using CI running on IIS and everytime I want to use a port other than 80, e. g. 443 (for SSL enabled connections), CI halts somewhere, only showing a blank page. No errors or notices get shown.
I've been digging in the CI code for a bit and it seems it can't, for some reason I haven't discovered yet, route the requests to the desired controller.
It doesn't matter whether it's my own controller or the default one, which is welcome.php (the one distributed in the system/application/controllers folder).

This is what gets into log.php:
Code:
DEBUG - 2009-02-19 11:21:09 --> Config Class Initialized
DEBUG - 2009-02-19 11:21:09 --> Hooks Class Initialized
DEBUG - 2009-02-19 11:21:09 --> URI Class Initialized
ERROR - 2009-02-19 11:21:09 --> 404 Page Not Found --> index.php?q=welcome

As you can see, I've tried setting
Code:
$config['enable_query_strings'] = TRUE;

but that didn't change a thing.

I'm in the dark when it comes to why it shows the 404 error in the log and the page instead of the default controller when query string is empty.

It ran well on the server when it was on port 80 and was called via a name (sql1.my.domain). Now that IIS has been configured to have the CI directory as root on port 83 or 443, it won't run as expected.

Any hints would be most welcome.

Thanks Smile
#2

[eluser]srisa[/eluser]
Last message says the page requested is "index.php?q=welcome". What is this q here? Have you changed the controller and function triggers? You might also have to change the $config['uri_protocol'] to something other than AUTO.
#3

[eluser]slapo[/eluser]
[quote author="srisa" date="1235062747"]Last message says the page requested is "index.php?q=welcome". What is this q here? Have you changed the controller and function triggers? You might also have to change the $config['uri_protocol'] to something other than AUTO.[/quote]

Thanks srisa,

the q there is a type, it should have been c as I have it defined in my app's config.php in $config['controller_trigger']. However, it doesn't really matter, as even without any parameters (just with index.php being called), the result is the same and there's "index.php" instead of "index.php?q=welcome" in the log file.

I should also mention that there's a phpinfo.php file which only calls phpinfo(); and it displays what it should (I think) without a problem.

I've tried changing the $config['uri_protocol'] to the other suggested values, but with no success. ORIG_PATH_INFO is the only one with which I get the 404 message. With the rest of the options, I get this:

Code:
DEBUG - 2009-02-19 12:10:49 --> Config Class Initialized
DEBUG - 2009-02-19 12:10:49 --> Hooks Class Initialized
DEBUG - 2009-02-19 12:10:49 --> URI Class Initialized
DEBUG - 2009-02-19 12:10:49 --> No URI present. Default controller set.
DEBUG - 2009-02-19 12:10:49 --> Router Class Initialized
DEBUG - 2009-02-19 12:10:49 --> Output Class Initialized
DEBUG - 2009-02-19 12:10:49 --> Input Class Initialized
DEBUG - 2009-02-19 12:10:49 --> Global POST and COOKIE data sanitized
DEBUG - 2009-02-19 12:10:49 --> Language Class Initialized
DEBUG - 2009-02-19 12:10:49 --> Loader Class Initialized
DEBUG - 2009-02-19 12:10:49 --> Database Driver Class Initialized


It looks like it loads OK, but I'm it still shows the blank page.
#4

[eluser]xwero[/eluser]
Don't load the database class and see if you get output then. Database misconfiguration is known to show a blank page.
#5

[eluser]slapo[/eluser]
[quote author="xwero" date="1235064338"]Don't load the database class and see if you get output then. Database misconfiguration is known to show a blank page.[/quote]

Thanks xwero,

that was it, for some reason PHP stopped loading the mssql.dll extension in both FastCGI, then in ISAPI mode, but as I put FastCGI back, I'm back in business. Why that has happened, I have no idea... I guess I'll just have to write a CI driver for the sqlsrv PHP driver, just in case the php_mssql.dll loses it again Smile

Thanks again, both of you.




Theme © iAndrew 2016 - Forum software by © MyBB