RE: [PHP] mkdir after mkdir

2004-06-07 Thread Uttam
guess it has something to do with default directory rights for newly created
directories??

the directory 'x' gives your script permission to create directory under it.
so you are able to create directory 'y' inside 'x'.  but the newly created
directory 'y' does not gives your script permission to create subdirectory.

Regards,
-Original Message-
From: Gerben [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 06, 2004 23:39
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mkdir after mkdir


Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).

This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.

Thanks anyway

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Gerben wrote:
  Hello,
 
  I have a problem with the mkdir function.
  I'm trying to make a seperate folder every photoalbum. inside I want to
  create another folder ('.../thumbnails/') for, you can guess, the
  thumbnails.
 
  At first it didn't work at all:
 
 
 Warning: mkdir() failed (Permission denied) in
 
  /home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
 
  When I changed the rights of the folder I wanted to create the new
folder in
  to chmod 0777, the first MKDIR did work, but the second did not.
 
 
 SAFE MODE Restriction in effect. The script whose uid is 1042 is not
 
  allowed to access
  /home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
  by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
  on line 43
 
  this is very strange because the folders are both made in the same
script.
  Another strange thing is that I user mkdir($dir, 0777), but when I look
at
  the created folder it is 0755 and I can not change it.
 
  That's pritty much my problem. Your help would be very much appreciated.
 

 The first directory your script creates is owned by the uid apache runs
 under (48 in your case). Safe mode allows access only to files and
 directories owned by the uid of the executing script (1042 in your case).

 The workaround is to use ftp functions to create the directories. Simply
   use your ftp username and password to login to localhost and create
 the directories.

 HTH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mkdir after mkdir

2004-06-06 Thread Gerben
Hello,

I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.

At first it didn't work at all:

Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42

When I changed the rights of the folder I wanted to create the new folder in
to chmod 0777, the first MKDIR did work, but the second did not.

SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0 owned
by uid 48 in /home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43

this is very strange because the folders are both made in the same script.
Another strange thing is that I user mkdir($dir, 0777), but when I look at
the created folder it is 0755 and I can not change it.

That's pritty much my problem. Your help would be very much appreciated.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Daniel Clark
I think PHP and mkdir() is using the web servers rights.   So the web server would 
need rights to create directories.

Hello,

I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.

At first it didn't work at all:

Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42

When I changed the rights of the folder I wanted to create the new folder in
to chmod 0777, the first MKDIR did work, but the second did not.

SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0 owned
by uid 48 in /home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43

this is very strange because the folders are both made in the same script.
Another strange thing is that I user mkdir($dir, 0777), but when I look at
the created folder it is 0755 and I can not change it.

That's pritty much my problem. Your help would be very much appreciated.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Marek Kilimajer
Gerben wrote:
Hello,
I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.
At first it didn't work at all:

Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
When I changed the rights of the folder I wanted to create the new folder in
to chmod 0777, the first MKDIR did work, but the second did not.

SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0 owned
by uid 48 in /home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43
this is very strange because the folders are both made in the same script.
Another strange thing is that I user mkdir($dir, 0777), but when I look at
the created folder it is 0755 and I can not change it.
That's pritty much my problem. Your help would be very much appreciated.
The first directory your script creates is owned by the uid apache runs 
under (48 in your case). Safe mode allows access only to files and 
directories owned by the uid of the executing script (1042 in your case).

The workaround is to use ftp functions to create the directories. Simply 
 use your ftp username and password to login to localhost and create 
the directories.

HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mkdir after mkdir

2004-06-06 Thread Gerben
I have those rights since the first dir is created. the problem is that the
2nd is not created

Daniel Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I think PHP and mkdir() is using the web servers rights.   So the web
server would need rights to create directories.

 Hello,
 
 I have a problem with the mkdir function.
 I'm trying to make a seperate folder every photoalbum. inside I want to
 create another folder ('.../thumbnails/') for, you can guess, the
 thumbnails.
 
 At first it didn't work at all:
 
 Warning: mkdir() failed (Permission denied) in
 /home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
 
 When I changed the rights of the folder I wanted to create the new
folder in
 to chmod 0777, the first MKDIR did work, but the second did not.
 
 SAFE MODE Restriction in effect. The script whose uid is 1042 is not
 allowed to access
 /home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
 by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
 on line 43
 
 this is very strange because the folders are both made in the same
script.
 Another strange thing is that I user mkdir($dir, 0777), but when I look
at
 the created folder it is 0755 and I can not change it.
 
 That's pritty much my problem. Your help would be very much appreciated.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Gerben
Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).

This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.

Thanks anyway

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Gerben wrote:
  Hello,
 
  I have a problem with the mkdir function.
  I'm trying to make a seperate folder every photoalbum. inside I want to
  create another folder ('.../thumbnails/') for, you can guess, the
  thumbnails.
 
  At first it didn't work at all:
 
 
 Warning: mkdir() failed (Permission denied) in
 
  /home/virtual/site43/fst/var/www/html/beheer/albums/index.php on line 42
 
  When I changed the rights of the folder I wanted to create the new
folder in
  to chmod 0777, the first MKDIR did work, but the second did not.
 
 
 SAFE MODE Restriction in effect. The script whose uid is 1042 is not
 
  allowed to access
  /home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
  by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
  on line 43
 
  this is very strange because the folders are both made in the same
script.
  Another strange thing is that I user mkdir($dir, 0777), but when I look
at
  the created folder it is 0755 and I can not change it.
 
  That's pritty much my problem. Your help would be very much appreciated.
 

 The first directory your script creates is owned by the uid apache runs
 under (48 in your case). Safe mode allows access only to files and
 directories owned by the uid of the executing script (1042 in your case).

 The workaround is to use ftp functions to create the directories. Simply
   use your ftp username and password to login to localhost and create
 the directories.

 HTH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mkdir after mkdir

2004-06-06 Thread Kevin Murphy
I'm still kind of a newbie at this, but couldn't you accomplish this by 
doing each MKDIR separately with a series of ELSE/IF statements. The 
basic logic would be:

Check if parent DIR exists.
If not, create one and then go on
If yes:
Check if Child DIR Exists
If Not, Create one,
if yes, go on
Etc.
--
Kevin Murphy
Web Designer - Stubborn Donkey Productions
www.stubborndonkey.com
On Jun 6, 2004, at 11:08 AM, Gerben wrote:
Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).
This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.
Thanks anyway
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Gerben wrote:
Hello,
I have a problem with the mkdir function.
I'm trying to make a seperate folder every photoalbum. inside I want 
to
create another folder ('.../thumbnails/') for, you can guess, the
thumbnails.

At first it didn't work at all:

Warning: mkdir() failed (Permission denied) in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php on 
line 42

When I changed the rights of the folder I wanted to create the new
folder in
to chmod 0777, the first MKDIR did work, but the second did not.

SAFE MODE Restriction in effect. The script whose uid is 1042 is not
allowed to access
/home/virtual/site43/fst/var/www/html/uploaded/images/albums/album_0
owned
by uid 48 in
/home/virtual/site43/fst/var/www/html/beheer/albums/index.php
on line 43
this is very strange because the folders are both made in the same
script.
Another strange thing is that I user mkdir($dir, 0777), but when I 
look
at
the created folder it is 0755 and I can not change it.
That's pritty much my problem. Your help would be very much 
appreciated.

The first directory your script creates is owned by the uid apache 
runs
under (48 in your case). Safe mode allows access only to files and
directories owned by the uid of the executing script (1042 in your 
case).

The workaround is to use ftp functions to create the directories. 
Simply
  use your ftp username and password to login to localhost and create
the directories.

HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mkdir after mkdir

2004-06-06 Thread Marek Kilimajer
Gerben wrote:
Unfortunately my server has no ftp (but SSH).
It makes much sence what you said, but how can PHP (with uid=48) make a
directory with uid=1042.
both folder are (to be) made the same script, but only one is (with
uid=1042).
This is what makes it very peculiar.
I think I have skip the idea of creating 2 nested folders.
Ask your hosting company to install ftp server (and ftp support in php) 
that is at least accessible from localhost. Otherwise you will have to 
give up the idea of creating folders whatsoever as you will not be able 
to copy images to those folders. Or change your host.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php