Welcome Guest, Not a member yet? Register   Sign In
directory_map() not working outside of application
#1

[eluser]iamdadude[/eluser]
Is there a reason as to why
Code:
$map = directory_map('./', TRUE);
works perfectly and,
Code:
$map = directory_map('../', TRUE);
doesn't work at all? I tried creating a directory with the basic mkdir(); PHP function (http://php.net/mkdir) and it didn't work either. Can anyone set me in the right direction as to what I'm doing wrong and how I can fix it?

Thanks!
#2

[eluser]Clooner[/eluser]
[quote author="iamdadude" date="1274350649"]Is there a reason as to why
Code:
$map = directory_map('./', TRUE);
works perfectly and,
Code:
$map = directory_map('../', TRUE);
doesn't work at all? I tried creating a directory with the basic mkdir(); PHP function (http://php.net/mkdir) and it didn't work either. Can anyone set me in the right direction as to what I'm doing wrong and how I can fix it?

Thanks![/quote]

How are your directory permissions set?
#3

[eluser]iamdadude[/eluser]
All of them have read access enabled
#4

[eluser]Clooner[/eluser]
If you only have readaccess then for sure mndir won't work.

For the directory mapper try
Code:
$map = directory_map(real_path('../'), TRUE);

For the permissions make sure you have them at 0444 or higher.
#5

[eluser]iamdadude[/eluser]
They're at 0755 and what you just posted still doesn't work. This is upsetting.
#6

[eluser]Clooner[/eluser]
try
Code:
$canopen = opendir(realpath('../'));
die($canopen);
what is the result?
#7

[eluser]iamdadude[/eluser]
It's blank. I made sure that there's nothing else that could be throwing off a PHP error, and it still showed blank.

Here's what I have in the controller -
Code:
function create_path() {
            
            $canopen = opendir(realpath('../'));
            die($canopen);
                        
        }
#8

[eluser]Clooner[/eluser]
[quote author="iamdadude" date="1274383116"]It's blank. I made sure that there's nothing else that could be throwing off a PHP error, and it still showed blank.

Here's what I have in the controller -
Code:
function create_path() {
            
            $canopen = opendir(realpath('../'));
            die($canopen);
                        
        }
[/quote]
If it doesn't return anything or false it means it can't open the directory.




Theme © iAndrew 2016 - Forum software by © MyBB