开发者

Deploying CodeIgniter 1.7.2 application on IIS 7

开发者 https://www.devze.com 2023-02-05 23:33 出处:网络
I developed a Codeigniter 1.7.2 on wamp and it\'s almost completed. Now I am trying to host it on IIS 7 (because the control panel that is offered to me only has IIS in it) I am getting errors. This i

I developed a Codeigniter 1.7.2 on wamp and it's almost completed. Now I am trying to host it on IIS 7 (because the control panel that is offered to me only has IIS in it) I am getting errors. This is what i get:

W开发者_StackOverflow社区arning: require(system/codeigniter/Common.php) [function.require]: failed to open stream: No such file or directory in c:\abc\wwwroot\system\codeigniter\CodeIgniter.php on line 38

Warning: require(system/codeigniter/Common.php) [function.require]: failed to open stream: No such file or directory in c:\abc\wwwroot\system\codeigniter\CodeIgniter.php on line 38

Fatal error: require() [function.require]: Failed opening required 'system/codeigniter/Common.php' (include_path='C:\Program Files (x86)\PHP\pear;./;./includes;./pear') in c:\abc\wwwroot\system\codeigniter\CodeIgniter.php on line 38

I am totally confused what error it is giving and what should I do to solve it.

I already searched the web and found it has some htaccess problem. This is my htaccess file:

Options +FollowSymLinks
IndexIgnore */*

<ifmodule mod_rewrite.c>
RewriteEngine on

    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # otherwise forward it to index.php
    RewriteRule ^(.*)$ index.php/$1 [L]

</ifmodule>

I don't know how to convert it and what to write in web.config. I am using websitepanel for deploying website.


Maybe this is it? You should find the below code in your index.php of your webroot. The question would be, have you specified a full server path? Make sure you are using the full server path, not just from the webroot, or from your domain folder in the *$system_folder* and *$application_folder* variables in your index.php file. I hope this helps/

/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a 
| full server path.
|
*/
if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder); 
}
0

精彩评论

暂无评论...
验证码 换一张
取 消