Welcome Guest, Not a member yet? Register   Sign In
Subversion Tutorial?
#1

[eluser]haydenk[/eluser]
http://codeigniter.com/news/codeigniter_...subversio/

So, I never could wrap my head around what exactly I am setting up there as there are symlinks and folders all over the the place.

Curious though, if I am just slow because it took me awhile and sit down and play with another/a better way to do it. I got the idea from wordpress.org on an interesting way to setup the wordpress files so I can easily update it without messing with MY additions.

Anyways, what I did was, created a folder above my htdocs/httpdocs folder called "ci", checked out the codeigniter source into that folder and created 2 symlinks in my htdocs/httpdocs folder. One symlink to the index.php and one to the system folder. It loaded perfectly. After reading the index.php file to learn how it sets up my application folder, I found that it checks if an application folder exists in the main HTTP web folder, if not it defaults to the application folder in "system".

Code:
domain.com/
   ci/
      .svn/
      index.php
      system
      user_guide
      license.txt
   httpdocs/
      .htaccess
      favicon.ico
      robots.txt
      index.php -> domain.com/ci/index.php
      system -> domain.com/ci/system
      application/

.htaccess file
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

So, with only 2 symlinks, I managed to setup CodeIgniter in it's own folder for easy SVN updates and kept it separated from my application files.

Am I just slow at figuring this out or is this a lot simpler?
#2

[eluser]brianw1975[/eluser]
well... that is a way to do it, I do it like thus (keep in mind that this is from the point of view of someone who has multiple sites and domains on one server):

Code:
/var/www/
         client/
               sitename/
                       system/
                       application/
                       public_html/
                                  index.php
                                  themes/
                                  (other public files)

and modified index.php as follows:

Code:
$system_folder = "../system";
$application_folder = "../application";

It removes any doubt of security for the application folder from public eyes if the webserver starts handing out plaintext php files for any reason, and its stupid simple to upgrade CI, copy from dev to staging to production, and allows for very easy switching between a known "stable" version of CI and a new upgrade or SVN checkout.

and I managed to do it with no symlinks.

At one point i had the CI system folder in /usr/share/php/ and that kept me from messing with the core files realy well, not sure why i moved away from doing that, but there was probably a solid reason for it.




Theme © iAndrew 2016 - Forum software by © MyBB