Welcome Guest, Not a member yet? Register   Sign In
$config['index_page'] to always include ?
#1

[eluser]escape[/eluser]
I've encountered the IIS situation where it is necessary to include a question mark when defining the index_page (i.e., $config['index_page'] = index.php?).

Including the question mark on Apache installations doesn't seem to change the operation of my program. I would like to know if setting $config['index_page'] = index.php?, as a permanent configuration variable, will pose any problems.

Thanks,
cw
#2

[eluser]TheFuzzy0ne[/eluser]
Probably not, but I would try a) editing your .htaccess file, and b) trying out the different URI Protocols available in the configuration file. Apparently, changing it to QUERY_STRING seems to work, but you need to have your .htaccess file configured correctly also.
#3

[eluser]escape[/eluser]
Yes, I've seen posts suggesting modification of the .htaccess file as possible remedy.

Since the application will be widely distributed it cannot be assumed that installers will have the knowledge or capability to edit a .htaccess file correctly. In that regard I'm looking for a solution that can be coded in CI.

I've also been testing logic statements in the config files to reduce the number install failures. For example:
Code:
$config['uri_protocol']    = "AUTO";
if (strpos($_SERVER['SERVER_SOFTWARE'], 'IIS') !== false)
{
    $config['uri_protocol']    = "QUERY_STRING";
}

to address situations like selecting a uri_protocol.
#4

[eluser]TheFuzzy0ne[/eluser]
I understand that you plan to redistribute the application on a larger scale, but would that not be a part of the configuration process anyway? For example, your potential users would need to things like the application and system directory, which could vary from machine to machine, as well as database information (for external and localhost database servers). Some hosts only give access to the Web root, whereas others allow files to be outside of the Web root (which is where I store my system and application directories). I only actually store things such as scripts, images and CSS in the Web root, along with the index.php. I trust you've taken this into account, as configuring the config.php file dynamically would never have occurred to me, so you've clearly put a lot of thought into it.

Another thing to bear in mind, is that I'm not sure if this problem is specific to the ISS platform only. My server is running Debian, yet AUTO doesn't seem to work for me either; I've no idea why. All I'm saying is please be careful. One thing I've learnt with Web servers is that the are no guarantees, unless of course all of the servers are set up identically.
#5

[eluser]escape[/eluser]
Your concerns are valid reminders of how unforgiving hosting environments can be. Fortunatly we are re-factoring an existing application into the CI framework and much is know about the current install base of the program.

There is will indeed be some configuration required by installers but that will be hopefully limited to editing database.php with the appropriate connectivity settings. This is facilitated with setup controller that performs limited diagnostics and guides the installer to getting the framework up and running.

If adding some logic to the config.php file can reduce a percentage of install errors that directly translates into fewer tech support requests. Along those lines I would like to investigate the possiblity of some sort of active error control that could test the various URI PROTOCALS and select one that agrees with the server. Far from there yet but it is being looked at.




Theme © iAndrew 2016 - Forum software by © MyBB