Welcome Guest, Not a member yet? Register   Sign In
CI 1.6.2 and PHP5.2.5
#1

[eluser]Unknown[/eluser]
Hi all,

A default CI 1.6.2 works fine on PHP 5.2.5 under Windows XP, my development machine. I created a test controller and it loads without a hitch.

However, when I uploaded a copy of it to my hosting account and tried to load the test controller, CI displays the default 'welcome' view only. Even when I tried loading a non-existent controller through the URL, CI does not trigger an error page.

My host provides both PHP 4 and PHP 5.2.5.

On the hosting account, CI loads my test controller fine under PHP4, but I am using redux_auth library, which requires PHP5.

So I added an extra line at the top of .htaccess, to make sure PHP5 is used.

Code:
AddHandler application/x-httpd-php5 .php
RewriteEngine On
RewriteCond $1 !^(index\.php|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

And that's when problem starts... :long:

Any ideas how to fix this?

Thanks!
#2

[eluser]Sarfaraz Momin[/eluser]
can you please brief of what the problem actually is. Any errors after adding that line to .htaccess and if any what are they?
#3

[eluser]Unknown[/eluser]
Hi Sarfaraz Momin,

There were no errors at all. Not even in the error log. It just fail to load the test1 controller. Instead, the default Welcome page is displayed.

The thing is, test1 will load fine if I uncomment the PHP5 line in .htacces, but I need PHP5 for redux_auth to work.


Test1 controller:
Code:
<?
class test1 extends Controller {

    function index()
    {
        echo 'Test1...';
    }

}

?>

Any ideas what could help?
#4

[eluser]Unknown[/eluser]
have you tried extending the version number:
AddHandler application/x-httpd-php52




Theme © iAndrew 2016 - Forum software by © MyBB