LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to use Symbolic file and use in php (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-symbolic-file-and-use-in-php-915328/)

conflicker 11-24-2011 08:12 AM

How to use Symbolic file and use in php
 
Hi everybody, I'm working for some PHP stuff right now, and I'm having a bit problem..

Is it possible to use symbolic file in PHP?..

my template is located at /public_html/templates/template_name
and there is a file named config, which is a symbolic file point to
/public_html/temp_config/template_name/config

and in my root directory, I have a sub folder named conflicker, it is also a website and the template for conflicker is point to /public_html/templates/template_name as symbolic link

it's a bit confusing, but my problem is PHP is not reading the config which is a symbolic file as a physical file..

I hope you understand my question.

Thanks,
Eric

goodhombre 11-24-2011 06:20 PM

Hi,

Please check FollowSymLinks apache option .

http://www.maxi-pedia.com/FollowSymLinks

conflicker 11-24-2011 11:40 PM

Quote:

Originally Posted by goodhombre (Post 4533159)
Hi,

Please check FollowSymLinks apache option .

http://www.maxi-pedia.com/FollowSymLinks

Thank you sir for the reply..I already change my .htaccess and its don't read my symbolic file as a physical file..

Is there any special function for PHP that use to read a symbolic link as a physical file..?

conflicker 11-25-2011 04:23 AM

Ohh..sorry..the symbolic link is really work..it reads the symbolic file as physical file..
but I still had a problem about the MAGIC that i need to go through..

Here is my directories structure:

/* Note: config is a file */

public_html/conflicker
->temp_config/myTemplate/config
->templates /* <- this is a symbolic link point to templates folder on the root directory */

public_html/templates/myTemplate/

public_html/temp_config/myTemplate/config

Now here's the tricky part, if I go to public_html/conflicker/templates/myTemplate/
and create a symbolic link point to the config file 2 directories down..meaning
public_html/conflicker/temp_config/myTemplate/config.

The result is the OS read the public_html/temp_config/myTemplate/config instead of
public_html/conflicker/temp_config/myTemplate/config

Is there a way to forece the OS to read the config file
base on the path where it comes to read.

It is quite confusing, but it would be so cool if this idea will work.

Please help, Thanks
Eric

conflicker 11-27-2011 08:58 AM

Please help..


All times are GMT -5. The time now is 06:15 PM.