Changes between Initial Version and Version 1 of Ticket #37220
- Timestamp:
- 06/29/2016 08:21:09 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #37220 – Description
initial v1 1 1 Hello, 2 i noticed working on a wordpress website that if the website is in a directory (es. /var/www/releases/3/) and the web root is pointing through a symbolic link ( so. /var/www/current/ pointing to /var/www/releases/3/) the function in the wordpress config is not retrieving the right directory:2 i noticed working on a wordpress website that if the website is in a directory (es. `/var/www/releases/3/`) and the web root is pointing through a symbolic link ( so. `/var/www/current/` pointing to `/var/www/releases/3/` ) the function in the wordpress config is not retrieving the right directory: 3 3 4 5 {{{ 4 6 if ( !defined('ABSPATH') ) 5 7 define('ABSPATH', dirname(__FILE__) . '/'); 8 }}} 6 9 7 I solved manually defining ABSPATH to the right directory, but i think it would be better to fix if maybe checking if the directory is a symlink.8 10 9 The problem is that from php5 __FILE__ is reporting the absolute path, so it may be better to use $_SERVER['PWD'] to retrieve the path: 10 <?php echo $_SERVER['PWD'] ."\n"; ?> 11 I solved manually defining `ABSPATH` to the right directory, but i think it would be better to fix if maybe checking if the directory is a symlink. 12 13 The problem is that from php5 `__FILE__` is reporting the absolute path, so it may be better to use `$_SERVER['PWD']` to retrieve the path: 14 `<?php echo $_SERVER['PWD'] ."\n"; ?>` 11 15 would be 12 /var/www/current 16 `/var/www/current` 13 17 14 18 Thanks,