CodeIgniter with php5 - CI-generated 404 Error |
[eluser]Eric Cope[/eluser]
Hello all, I am developing an admin page for a client using CodeIgniter. I started developing in php4. However, now the server supports php5 only under the following conditions: 1. all php files have extension .php5 2. .htaccess be edited to include "AddType application/x-httpd-php5 .php5 .php" I chose the second option. Now, I get a codeIgniter-generated 404 error for root page. Any ideas? If I remove that line in my .htaccess page, it functions properly again.
[eluser]Eric Cope[/eluser]
I have tracked it down to the Router.php file, the _validate_segments function. I will post more information as I find it.
[eluser]Eric Cope[/eluser]
I found the reason why this fails... In the function, _set_route_mapping(), on line 94(ish): Code: $this->uri_string = $this->_get_uri_string(); when I add that line to .htaccess, $this->uri_string returns "admin/index.php". The following line of CI code is: Code: if ($this->uri_string == '') not sure why it is coming through for php5 and not php4... The saga continues...
[eluser]Eric Cope[/eluser]
I have noticed that only I am participating in this conversation, which means I am talking to myself (including this message). <in muttering tone> fantastic...
[eluser]Eric Cope[/eluser]
I have pin pointed the exact point where the two different version diverge. In Router.php; Code: function _get_uri_string() However, when that line is inserted into the .htaccess file, it does exist and matches the getenv and is 'admin/index.php'. It looks like it compares itself against SELF. However, SELF is only the file name, not a partial path, like what I am dealing with... This path is returned and all hell is broken loose. stay tuned...
[eluser]zdknudsen[/eluser]
I hope you don't mind me joining your debate. Anyway have you tried poking around with the uri_protocol config item? Code: /*
[eluser]Derek Jones[/eluser]
Who is your host, Eric? I'm investing a similar issue where ORIG_PATH_INFO does not contain the correct value when no URI information is included along with the script.
[eluser]Eric Cope[/eluser]
I have not tried tinkering with the uri_protocol. I prefer to leave it as AUTO. I am interested in knowing where the ORIG_PATH INFO constant is generated...
[eluser]Eric Cope[/eluser]
[quote author="Derek Jones" date="1202068789"]Who is your host, Eric? I'm investing a similar issue where ORIG_PATH_INFO does not contain the correct value when no URI information is included along with the script.[/quote] I resell through Cirtex. That is like my problem, except it is not the entire path, just relative to the web root. |
Welcome Guest, Not a member yet? Register Sign In |