Page 1 of 1
[SOLVED] Finding my Roots
Posted: Tue Sep 27, 2005 8:41 am
by $var
Hello,
I have a lame question:
Path = F:\www\vhosts\domainname.com\httpdocs\access\00admin\
In my FTP, I can access \domainname.com\
But my index (and all files) are help in \httpdocs\
Which is considered the root?
$_SERVER['DOCUMENT_ROOT']."/Imi/City_Img/".$cityid."/".$aFile['name']
or
$_SERVER['DOCUMENT_ROOT']."/httpdocs/Imi/City_Img/".$cityid."/".$aFile['name']
I am looking to use mkdir, and it cannot make the path, despite permissions saying "create"
Posted: Tue Sep 27, 2005 8:50 am
by feyd
the first one.. DOCUMENT_ROOT is your web directory starting location..
Posted: Tue Sep 27, 2005 8:57 am
by $var
argh!!!!
why won't it make the directory?
*begins to cry*
Warning: mkdir(/Imi/City_Img/16): No such file or directory in F:\www\vhosts\blah.com\httpdocs\access\00admin\cities\add_city.php
Posted: Tue Sep 27, 2005 9:01 am
by feyd
it would appear you aren't using the document root in that request or one of those directories doesn't exist so it can't create a subdirectory..
Posted: Tue Sep 27, 2005 9:07 am
by $var
mkdir($_SERVER['DOCUMENT_ROOT']."/Imi/City_Img/".$cityid);
am i missing a dot in there or something?
Posted: Tue Sep 27, 2005 9:23 am
by $var
I tried to echo the path to the server root, and the page is blank...
I think that $_SERVER['DOCUMENT_ROOT'] is at fault.
My Current PHP version: 4.3.10
Has anyone else had problem with this variable?
Posted: Tue Sep 27, 2005 9:50 am
by feyd
your server may not have document root set in the environment.. check if and where it is inside phpinfo()
Posted: Tue Sep 27, 2005 9:57 am
by $var
bingo!
doc_root no value no value
i contacted before you replied, but i will point this out.
they seem as apt to be hosting web sites as me,
i hope that they can fix it up.
feyd, i wish i could buy you a beverage for your endless help.
Posted: Tue Sep 27, 2005 3:27 pm
by $var
Boo...
Stupid server company is a hack job if anything...
The dude says he doesn't know how to assign the root globally
(i think he means to the shared server solution)
It's a Microsoft server, which is the first problem,
and I don't think that they know what they are doing...
the perils or coming to an existing project.
does anyone know if this is possible, or am I going to have to assign the root manually on every page? Gah! Manual work.