Results 1 to 4 of 4
Hi,
I'm hosting some sites on a dedicated server. All these sites make use of the same codebase (couple of directories with php and javascript files).
Because I want to ...
- 03-23-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
[SOLVED] Share codebase via symlinks?
Hi,
I'm hosting some sites on a dedicated server. All these sites make use of the same codebase (couple of directories with php and javascript files).
Because I want to manage this codebase on only one location, I was trying to share it via symlinks. When looking at commandline, everything seemed to work fine. However, when browsing to the sites that use the codebase, problems occur. It seems as if php cannot find the files.
Can someone tell me whether this is a correct setup or what I should do to fix this?
Thanks!
- 03-23-2010 #2
Welcome to the forums!
Just a couple of questions...
Did you use relative paths or absolute paths for the symlinks? It could go wrong there.
Does the inability to find files leave traces in the logs? That might give a clue.Can't tell an OS by it's GUI
- 03-23-2010 #3Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
I created the symlink like this, so absolute:
ln -s /var/www/vhosts/[sourcedomain.com]/httpdocs/core/ /var/www/vhosts/[domain.com]/httpdocs/core
The error log shows this warning for example
PHP Warning: include(core/functions.php) [<a href='function.include'>function.include</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/[domain.com]/httpdocs/config.php on line 8
- 03-24-2010 #4Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
Problem solved.
I created a vhost.conf file with:
After apache was restarted everything worked.Code:<Directory /var/www/vhosts/domein.com/httpdocs> Options FollowSymLinks php_admin_value open_basedir /var/www/vhosts/domein.com/httpdocs:/tmp:/ </Directory>
Thanks for your help!


