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

[eluser]Matt Stein[/eluser]
I'm attempting to set up one app to run on several subdomains. The CI 2.0.1 app (while rough) is already functional, and I'm attempting this setup on a MediaTemple DV4 server.

Setup
Core (core.example.com) -- this refers to the CI and app files that will be shared:
/system/path/to/core/public_html/codeigniter
/system/path/to/core/public_html/app

User (a.example.com) -- this is supposed to be an easy way to utilize a subdomain and store user-specific files:
/system/path/to/user/public_html/index.php

Result
Works fine at core, but results in error at User subdomain (PHP's is_dir() returns false, despite having a valid + accessible directory):
Quote:Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

Experiments
- tried relative and absolute paths: same result
- tried using symlinks in User doc root: same result
- tried wiping out is_dir() checks in index.php: nothing happens/blank screen even though error output is on

Am I missing something or going about this all wrong? All the related issues I can find on these forums seem pretty straightforward.
#2

[eluser]InsiteFX[/eluser]
1) You need a copy of index.php in every sub-domain.
2) You need to edit every index.php to point to the locatation of the system and application folders.

InsiteFX
#3

[eluser]Matt Stein[/eluser]
Thanks, InsiteFX. Unfortunately that's exactly what I've done. I've already tried various values for the subdomain's $system_path and $application_folder vars, as mentioned above in 'Experiments'.
#4

[eluser]InsiteFX[/eluser]
Did you read managing your applications in the CodeIgniter User Guide?

InsiteFX
#5

[eluser]Matt Stein[/eluser]
I did, and thought it to be partly irrelevant since I don't actually want to run multiple applications. I had previously separated the application folder from the 'system' folder, so I'd already been into index.php for that. (I used the full server path as instructed, and also tried a relative path just for the hell of it; neither worked.)

It seems very clear that I should only have to change $system_path and $application_folder in each subdomain's index.php file, but it's just not working.
#6

[eluser]bubbafoley[/eluser]
are you using absolute server paths?

edit: just saw that you already said you tried it.
#7

[eluser]Joseph Wensley[/eluser]
I think subdomains in Plesk are owned by a seperate user, so it may be a permissions issue.
#8

[eluser]Matt Stein[/eluser]
Quote:I think subdomains in Plesk are owned by a seperate user, so it may be a permissions issue.

Each folder shares the exact same owner and group. Exact same permissions (755) on each index.php as well.
#9

[eluser]InsiteFX[/eluser]
Well your problem is that application/config is setting your base_url
so it will only work on one directory!

InsiteFX
#10

[eluser]Matt Stein[/eluser]
I also considered this, but I don't think it's the issue either. From the app's config.php:
Code:
$config['base_url'] = "http://".$_SERVER['HTTP_HOST']."/";




Theme © iAndrew 2016 - Forum software by © MyBB