Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Symbolic links as hard links

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


rjareno at jccm

Oct 23, 2009, 5:02 AM

Post #1 of 2 (95 views)
Permalink
Symbolic links as hard links

Hello,



We have applications in shared directories and we have virtual servers that
use these applications. Every virtual server has its own document root, and
access to applications by symbolic links, except for specific files and
directories (as configuration files) that are created physically in
document root of virtual server. For example:



- Shared directory with source files: /usr/share/myapp

- Document root of virtual server:
/var/server1/www/myapp

- Creating symbolic links to source files: ln –s
/usr/share/myapp/* /var/server1/www/myapp



The problem comes when a PHP file tries to access to one of these specific
files (for example, /var/server1/www/myapp/config.php) because it takes the
path relative to physical file (/usr/share/myapp/config.php), and not the
path relative to symbolic links (/var/server1/www/myapp/config.php).



Is there any way in Cherokee (by rules or something) of doing PHP to take
path of symbolic links instead of physical links?


alvaro at alobbs

Oct 23, 2009, 5:32 AM

Post #2 of 2 (84 views)
Permalink
Re: Symbolic links as hard links [In reply to]

On 23/10/2009, at 07:02, Raúl Jareño Morago wrote:

> - Shared directory with source files: /usr/share/
> myapp
> - Document root of virtual server: /var/server1/
> www/myapp
> - Creating symbolic links to source files: ln –s /usr/
> share/myapp/* /var/server1/www/myapp
>
> The problem comes when a PHP file tries to access to one of these
> specific files (for example, /var/server1/www/myapp/config.php)
> because it takes the path relative to physical file (/usr/share/
> myapp/config.php), and not the path relative to symbolic links (/var/
> server1/www/myapp/config.php).
>
> Is there any way in Cherokee (by rules or something) of doing PHP to
> take path of symbolic links instead of physical links?

Well, that's an issue you should fix in the PHP code; there's no much
Cherokee can do at that regard.

Just as a quick idea, check the value of PATH_TRANSLATED, and
SCRIPT_FILENAME. They may be what you're looking for.
Good luck!

--
Octality
http://www.octality.com/

_______________________________________________
Cherokee mailing list
Cherokee[at]lists.octality.com
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.