Hi,

I have the following code in my application and it is not working on a certain VPS server and I have no idea why.

Server: Linux - PHP Version 5.3.16

PHP Code:
<?php
define
('PROJECTS_DIR''../projects/');

// Gets project names from the projects folder.
function projects() {
    
$projects glob(PROJECTS_DIR.'*'GLOB_ONLYDIR);
    for (
$i=0$i<count($projects); $i++) {
        
$projects[$i] = basename($projects[$i]);
    }
    return 
$projects;
}

$projects projects();

if (empty(
$projects)) {
echo 
'No projects found.';
}
?>
The above code works fine on all other servers I tested but not on this one. What could be the reason? What should I check in phpinfo() or php.ini?

Thanks for any ideas.