PHP's glob function running PHP-FPM on FreeBSD

Hi,

I have a strange problem which only occurs on my FreeBSD servers. I have a PHP file with the following code:
PHP:
<?php
var_dump(glob("css/*"));
Run via Nginx/PHP-FPM this returns the content of the directory css. If the directory is empty it returns FALSE. If I run it via the shell it works as intended (returning an empty array).

Any idea?

Thanks.
 
Yes, I know. But I don't know how to figure it out.

When I run php test.php it returns an empty array if the directory is empty, otherwise it returns the files. When I run it via php-fpm it returns an array of files or false. If it would be a permission issue it would not return me the files.
 
Interesting, when I switch off open_basedir (as suggested) it works.

My PHP version is quite recent.
Code:
PHP 5.4.15 (cli) (built: May 15 2013 17:13:10) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.1, Copyright (c) 1999-2013, by Zend Technologies

Thanks for your help.
 
Back
Top