Link command problem


 
Thread Tools Search this Thread
Operating Systems Linux Link command problem
# 1  
Old 01-28-2010
Link command problem

Hello,

I have one issue with linking folders.

I have two domains (domain1 and domain2) on one server (centOS). In domain1, I have one folder containing many images which I want to share for domain2. So i have created link for image directory using below command.

Code:
ln -s /var/www/vhosts/domain1/httpdocs/public/images /var/www/vhosts/domain2/httpdocs/public/images

Above command has been created link folder in domain2 which linked to domain1 image folder. But now actual issue when I want to see images on domain2's web page, it is giving me an error. Below is the error which I'm receiving on website.

Code:
<b>Warning</b>:  file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/var/www/vhosts/domain2/httpdocs/public/images/1255698597_1307305_small.jpg) is not within the allowed path(s)

I guess that image is in domain1 so fopen is not performing due to Open_basedir Restriction.

Can anyone tell me how can I resolve this issue and how can i get domain1 images in domain2?
PS: I do not want to remove fopen command for file checking.

Would appreciate any kind of help.

Regards,
# 2  
Old 01-28-2010
Create a common directory for images used by both domains, eg /var/www/common/images. Add that path to the open_basedir directive in your php.ini, create a symlink from the domains to this directory & reload the web server.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

2. Shell Programming and Scripting

Soft link/file name problem

I want to find graphic files on an external disk then create soft links to those files in a folder on my machine. I have a problem with file names: if there are two graphic files in different directories but with the same file name, a link is created only for the first file i.e the 2nd file is... (4 Replies)
Discussion started by: stumpyuk
4 Replies

3. BSD

sym link problem

Hi, I am using Mac X 10.5. It's supporting BSD. I am getting strange problem. • Launch the terminal. • Create a directory. Use cd <directory> • Now create another directory test with command “mkdir test”. • Create a soft link with command “ln -s text.txt test” • Go to the test directory... (1 Reply)
Discussion started by: Saurabh78
1 Replies

4. OS X (Apple)

Sym Link problem

Hi, I am using Mac X 10.5. It's supporting BSD. I am getting strange problem. • Launch the terminal. • Create a directory. Use cd <directory> • Now create another directory test with command “mkdir test”. • Create a soft link with command “ln -s text.txt test” • Go to the test directory... (1 Reply)
Discussion started by: Saurabh78
1 Replies

5. Shell Programming and Scripting

problem with link creation!!!!

I have a home directory namely /pto/ppa/ridbmw/etl/ Now i have various directorys below the home directory. For eg from the home directory if i say cd /roddata it changes to that directory. I think its kind of link (I don't know if it's hard or soft). Now i need to create a new directory and... (4 Replies)
Discussion started by: dsravan
4 Replies

6. UNIX for Advanced & Expert Users

Ftp Link problem

I am using ftp services at my unix box and accessing it from windows. when i am giving the url in the browser, ftp://neeraj:neeraj@10.1.3.116/cat01/Ne.txt it is giving me ISA Server: extended error message : 200 Type set to I. 200 PORT command successful. 550 /cat01/Ne.txt: No such... (0 Replies)
Discussion started by: NeerajYadav
0 Replies

7. Linux

link error problem

Dear linuxers, I'm a novice in C++ programming. I wrote a ReadFile class in file ReadFile.cpp. After that, I wrote a test.cpp, which contains a main function, to test whether my class work well. I follow the following steps to compile the ReadFile.cpp file. g++296 -c ReadFile.cpp -o... (4 Replies)
Discussion started by: niukun
4 Replies

8. Programming

gcc Link problem

I have some crypting functions in object-file - for example,func.o Main file,from where crypting functions called, named as main.cpp . "gcc main.cpp -o main func.o" print "undefined reference to ... " But if I rename main.cpp to main.c and execute "gcc main.c -o main func.o" - ok. If anybody,... (3 Replies)
Discussion started by: Gigachel
3 Replies
Login or Register to Ask a Question