Welcome Guest, Not a member yet? Register   Sign In
System Path Issue
#11

[eluser]Matt Stein[/eluser]
Am I just trying to stretch CI in a way it's not meant to be used? I'm not even sure whether my problem is expectation or implementation. Anyone else have experience deploying a single app + single CI base and running it on several custom subdomains?
#12

[eluser]Joseph Wensley[/eluser]
[quote author="Matt Stein" date="1300496408"]Am I just trying to stretch CI in a way it's not meant to be used? I'm not even sure whether my problem is expectation or implementation. Anyone else have experience deploying a single app + single CI base and running it on several custom subdomains?[/quote]

I'm quite sure this is a server issue and has nothing to do with CI, if doing is_dir() is returning false than you are either using the wrong path or don't have permission to access it.

Plesk is garbage in my experience and handles things like subdomains terribly, id recommend switching to a host that uses CPanel or something that sucks less than Plesk at least.
#13

[eluser]Matt Stein[/eluser]
Thanks, Joseph. I've been back and forth between Plesk, CPanel, and VirtualMin. I'm not savvy enough to avoid a GUI altogether, but I have a feeling this shouldn't be so hard. At least it seems clear that I can treat it as a server issue and keep on that path.
#14

[eluser]mhiggins[/eluser]
Hi Matt,

I stumbled across your post as I had the same problem, also on Media Temple DV and the issue is related to how Plesk works with subdomains.

The problem originates from restrictive access permissions for PHP under Plesk. For security reasons PHP can only access /tmp and the httpdocs folders. So, PHP will tell you the directory doesn't exist.

Note that you will need to do all this as root

Assuming you want to use staging.domain.com, the solution is to create a vhost.conf file at:

Code:
/var/www/vhosts/domain.com/subdomains/staging/conf/vhost.conf

Source: http://kb.parallels.com/432


My vhost.conf file looks like this:
Code:
<Directory /var/www/vhosts/domain.com/subdomains/staging/httpdocs>
  <IfModule sapi_apache2.c>
    php_admin_value open_basedir none
  </IfModule>
  <IfModule mod_php5.c>
    php_admin_value open_basedir none
  </IfModule>
</Directory>

and then force Plesk to generate the apache config files for this domain again and restart. The exact command is:

Code:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

Source: http://www.vioan.ro/wp/2007/07/31/how-to...-in-plesk/

After all this, PHP will have permission to access the folders in the subdomain directory and will no longer return the error, so CI should work.
#15

[eluser]InsiteFX[/eluser]
You only need one Codeiginter system directory!

Root - CodeIgniter system directory

Running Multiple Applications with one CodeIgniter Installation

If you would like to share a common CodeIgniter installation to manage several different applications simply put all of the directories located inside your application folder into their own sub-folder.

For example, let's say you want to create two applications, "foo" and "bar". You could structure your application folders like this:

Code:
applications/foo/
applications/foo/config/
applications/foo/controllers/
applications/foo/errors/
applications/foo/libraries/
applications/foo/models/
applications/foo/views/
applications/bar/
applications/bar/config/
applications/bar/controllers/
applications/bar/errors/
applications/bar/libraries/
applications/bar/models/
applications/bar/views/

InsiteFX
#16

[eluser]Matt Stein[/eluser]
[quote author="mhiggins" date="1302636557"]Hi Matt,

I stumbled across your post as I had the same problem, also on Media Temple DV and the issue is related to how Plesk works with subdomains.

The problem originates from restrictive access permissions for PHP under Plesk. For security reasons PHP can only access /tmp and the httpdocs folders. So, PHP will tell you the directory doesn't exist.

Note that you will need to do all this as root

Assuming you want to use staging.domain.com, the solution is to create a vhost.conf file at:

Code:
/var/www/vhosts/domain.com/subdomains/staging/conf/vhost.conf

Source: http://kb.parallels.com/432


My vhost.conf file looks like this:
Code:
<Directory /var/www/vhosts/domain.com/subdomains/staging/httpdocs>
  <IfModule sapi_apache2.c>
    php_admin_value open_basedir none
  </IfModule>
  <IfModule mod_php5.c>
    php_admin_value open_basedir none
  </IfModule>
</Directory>

and then force Plesk to generate the apache config files for this domain again and restart. The exact command is:

Code:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

Source: http://www.vioan.ro/wp/2007/07/31/how-to...-in-plesk/

After all this, PHP will have permission to access the folders in the subdomain directory and will no longer return the error, so CI should work.[/quote]

Thanks, mhiggins! I had a vague sense that it was a host configuration issue, but this pretty much nails it. I really appreciate the comment, and hopefully some other poor souls can find this to be a helpful thread!




Theme © iAndrew 2016 - Forum software by © MyBB