开发者

codeigniter installation - location of the system and application folders

开发者 https://www.devze.com 2023-03-25 22:25 出处:网络
fellow codeigniters, I’m moving my local ci site onto a media temple server and I’m having a problem with the location of the system and application folders.

fellow codeigniters, I’m moving my local ci site onto a media temple server and I’m having a problem with the location of the system and application folders.

the structure of the server is as follows:

../domains   
     /mysite.com  
        /html  

html is the root of my domain. i.e this is where i’d go when i access www.mysite.com

I placed the ci system folder (ci_system) under domains.

since the html folder is being used by a few ‘under construction’ files, I created a subfolder called ‘mysiteapp’ under html and placed my application folder, idex.php, css, js folders there.

so it looks like this:

../domains   
     ci_system
     /mysite.com  
        /html  
           /mysiteapp
              /application
              /css
              /assets
              /js
              index.php

I edited the index.php file so that $system_folder = “../../../ci_system”;

the problem is, when I access the site, i get a php error:

Warning: require(../../../ci_system/application/config/constants.php) [function.require]: failed to open stream: No such file or directory in /nfs/c08/h04/mnt/xxxxxx/domains/ci_system/codeigniter/CodeIgniter.php on line 52

so it looks like the ci_system folder is being located however CI is still trying to locate the application folder off of the ci_system folder.

I have tried specifying the full path the the application folder but it still tries to concatenate th开发者_如何学运维e 2 together.

I have not done many ci installations and my local one was done months ago and i don’t remember it being a pain. so I’m not sure where to look to fix this problem.

hope someone can help.

thanks


Ok So the index.php file does have the $application_folder var which can be set and pointed towards the application dir. Could you be kind enough to share the index.php file? You may have to set both up .. i.e the system folder path and the application folder path.

And the only problem I noticed with your system path is that its relative when the CI doc states that you have to use full server paths...

It is possible to move your application folder to a different location on your server than your system folder. To do so open your main index.php and set a full server path in the $application_folder variable.

$application_folder = "/Path/to/your/application";

If you do want a quick fix, and have shell access, create a sym link, that should fix it quickly, but its just cutting around the corner.


What is inside your ci_system directory? Do you see directories like core, database, libraries etc.? According to your warning message, you have codeigniter in /domains/ci_system/codeigniter, or you have wrong settings in your index.php.

0

精彩评论

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

关注公众号