# Plugins for Cacti: Follow Symlink doesn't work

**URL:** <https://forums.percona.com/t/plugins-for-cacti-follow-symlink-doesnt-work/3463>\
**Category:** Percona Monitoring Plugins\
**Created:** [May 12, 2014, 2:14am UTC](https://forums.percona.com/t/plugins-for-cacti-follow-symlink-doesnt-work/3463 "2014-05-12T02:14:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZUGerMachine](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@ZUGerMachine](https://forums.percona.com/u/ZUGerMachine)\
**Post date:** [May 12, 2014, 2:14am UTC](https://forums.percona.com/t/plugins-for-cacti-follow-symlink-doesnt-work/3463/1 "2014-05-12T02:14:43Z")

</div>

Hi there

The function of the “ss\_get\_mysql\_stats.php” for Cacti is perfect, if I speek direct with the PHP-File. When I created a Link and work with this creation , it does not seem to function:

```auto
SLES 11> php ss_get_mysql_stats.php
#Output of Usage for PHP-Script

SLES 11> ln -s ss_get_mysql_stats.php symlink.php
SLES 11> php symlink.php
#No Output

```

No Output, no Errors, nothing… Even when I turned the Debug of the “Percona Monitoring Script” on, there is no output, no file were created…

Normaly, PHP can handle Symlinks, so there seems to be a mistake in the Script, isn’t there?

Thanks, looking for your Answer

---

<div class="post-metadata">

**Author:** ![weber](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@weber](https://forums.percona.com/u/weber)\
**Post date:** [May 16, 2014, 2:09pm UTC](https://forums.percona.com/t/plugins-for-cacti-follow-symlink-doesnt-work/3463/2 "2014-05-16T14:09:59Z")

</div>

I guess the problem is the code on the beginning of the script:

if ( !array\_key\_exists(‘SCRIPT\_FILENAME’, $\_SERVER)  
|| basename( **FILE** ) == basename($\_SERVER[‘SCRIPT\_FILENAME’]) ) {
