CodeIgniter Forums
From local to remote...having server pathing issues. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: From local to remote...having server pathing issues. (/showthread.php?tid=26439)



From local to remote...having server pathing issues. - El Forum - 01-13-2010

[eluser]codylindley[/eluser]
I am trying to get my CI app setup on my remote server (mediatemple GS).

I am using relative paths to refer to my CI folder and App Folder. Works locally, but when I upload it to mediatemple I get this:

http://stickytasks.codylindley.com/

Anyone willing to help me trouble shoot this?

BTW - here is a peak at my file structure and index.php settings:

http://gyazo.com/496357ab2e6e027b44804e3bec3cfbb7.png


From local to remote...having server pathing issues. - El Forum - 01-13-2010

[eluser]stef25[/eluser]
Maybe I'm looking in the wrong place, but the url has 5725/domains whereas the screenshot mentions 5725/users. When working with server paths I find it helpful to put a echo realpath(dirname(__FILE__)); which shows the full path to the file.

(PS: are you the dude from Thickbox?)


From local to remote...having server pathing issues. - El Forum - 01-13-2010

[eluser]Vi.[/eluser]
Application path is different from codeigniter-1.7.2?


From local to remote...having server pathing issues. - El Forum - 01-13-2010

[eluser]mcr_rm[/eluser]
The problem here is you have stuck the index (probably rightly) into html which on that server looks like the web root folder i.e. the viewable web files.

In this context the index file is pointing up a folder in the structure correctly but when you use relative paths like that in a web root the highest level you can go is the root regardless so in your case the folder the index is already in.

You could possibly try using:

Code:
realpath(dirname(__FILE__) . '/../application'))

etc and see if that makes a diffence? (not tested)

Other wise try using he full path?


From local to remote...having server pathing issues. - El Forum - 01-13-2010

[eluser]cahva[/eluser]
[quote author="mcr_rm" date="1263443127"]The problem here is you have stuck the index (probably rightly) into html which on that server looks like the web root folder i.e. the viewable web files.

In this context the index file is pointing up a folder in the structure correctly but when you use relative paths like that in a web root the highest level you can go is the root regardless so in your case the folder the index is already in.
[/quote]

I allways put app and system folders outside of www-root and use '../application' and '../system' in the index.php file. This works on windows, linux and freebsd systems with mod_php and cgi. It shouldnt matter whether to use absolute or relative path in this case.

I suspect that this is more like a file permission issue so check those. Settings and filestructure seems to be ok(as those worked on local).


From local to remote...having server pathing issues. - El Forum - 01-13-2010

[eluser]codylindley[/eluser]
@cahva, yup...that's my thought as well. I'm super confused why this would work locally, but not live. Must have something to do with mediatemple. Thought maybe someone here has pushed a CI app to mediatemple before.

I guess it must have something to do with there web-root. I guess I should start trying to use an absolute path on the mediatemple server.

@stef25 - Yup, thickbox...that's me.


From local to remote...having server pathing issues. - El Forum - 01-14-2010

[eluser]stef25[/eluser]
Welcome to CodeIgniter!