i have a function wich makes a check if a folder is writable. but when i try to use the php touch variable in it like this
public function isFileServerMounted()
{
$config = $this->getServiceLocator()->get('config');
$storageDir = $config['xxx']['xxx']['xxx'];
$mountCheckFile = $config['xxx']['xxx']['xxxx'];
// we are using a simple file check as indication if we are mounted
return touch($storageDir . DIRECTORY_SEPARATOR . $mountCheckFile);
}
The function always returns true, regardles if the file i am checking is there or not. i checked the paths and they are correct and i can acess the file via nano over schiell.
The touch comand always returns true, regardles if i delete or make the mount check file.
Anyone has any idea why?
I am using:
PHP 5.3.3-7+squeeze19 with Suhosin-Patch (cli) (built: Feb 17 2014 10:10:23)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
OS:
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.3 (squeeze)
Release: 6.0.3
Codename: squeeze