|
Posted by frizzle on 04/17/06 22:31
Jerry Stuckle wrote:
> frizzle wrote:
> > Jerry Stuckle wrote:
> >
> >>frizzle wrote:
> >>
> >>>I asked my webhost, but they told me uploading
> >>>a folder and having it running uploads etc. is not
> >>>possible on Linux by default. Folders should be
> >>>chmod 777 or chmod 755.
> >>>
> >>>Frizzle.
> >>>
> >>
> >>Yes and no. It depends on how they have their folders configured.
> >>
> >>However, obviously they have it configured so you can't do it. But you should
> >>still be able to create the folder in PHP from a web page (so it's running as
> >>the Apache user) and upload to it. The folder should then have the Apache user
> >>as the owner.
> >>
> >>--
> >>==================
> >>Remove the "x" from my email address
> >>Jerry Stuckle
> >>JDS Computer Training Corp.
> >>jstucklex@attglobal.net
> >>==================
> >
> >
> > AFAIK the script below should be able to create dirs then
> > but i get the following error:
> >
> > Warning: mkdir(testdir): Permission denied in
> > /usr/local/psa/home/vhosts/host.com/httpdocs/test/mkdir.php on line 5
> >
> > Warning: Cannot modify header information - headers already sent by
> > (output started at
> > /usr/local/psa/home/vhosts/host.com/httpdocs/test/mkdir.php:5) in
> > /usr/local/psa/home/vhosts/host.com/httpdocs/test/mkdir.php on line 6
> >
> > Frizzle.
> >
> > +++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > <?php
> >
> > if(isset( $_POST['dir'] ))
> > {
> > mkdir( $_POST['dir'], 0755 );
> > header('Location: '.$PHP_SELF);
> > };
> >
> >
> > ?><form action="<?php echo $PHP_SELF; ?>" method="post"
> > name="mkdirtest" target="_top" id="mkdirtest">
> > <label for="dir">dir</label>
> > <input type="text" name="dir" id="dir"<?php echo isset( $_POST['dir']
> > ) ? ' value="'.$_POST['dir'].'"' : '' ?>>
> > <label for="Submit"></label>
> > <input type="submit" name="Submit" value="mkdir!" id="Submit">
> > </form><?php
> >
> > $handle = opendir('.');
> >
> > while (false !== ($file = readdir($handle))) {
> > if ($file != "." && $file != ".." ) {
> > echo $file.'<br>';
> > };
> > };
> >
> > closedir( $handle );
> >
> > ?>
> >
>
> What happens if you leave off the 0755? That may be restricted in your
> location. Just try it with the default.
>
> If it still doesn't work, looks like it's time to find another host. This one
> has too many restrictions.
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Hmm, that's really crap. 755 does nothing more, and changing hosts
isn't really an option. ... :(
Frizzle.
[Back to original message]
|