creating a directory in safemode
| From: | Daniel R. Anderson | Date: | Tue, 15 Apr 2003 19:05:08 +0000 |
| Subject: | creating a directory in safemode | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144007@lists.php.net to get a copy of this message | ||
Hi all,
I need to create a PHP script that will create some arbitrary directory
and copy in some files. When I use the command mkdir('./foo',0777); I
get the following error:
Warning: SAFE MODE Restriction in effect. The script whose uid is 534 is
not allowed to access /home/virtual/site22/fst/var/www/html/foo owned by
uid 48 in /home/virtual/site22/fst/var/www/html/web_page_interface.php
on line 28
So then I tried being clever and created a bash script that could be
executed from the within php with the command shell_exec('./script');
And I got the following error:
Warning: Cannot execute using backquotes in safe mode in
/home/virtual/site22/fst/var/www/html/web_page_interface.php on line 24
Both times my script died. Is there any way to do what I want to do and
get around Safe Mode? Or is there are least a way to create the dir as
mode 777? This isn't my server, so I can't edit the php.ini file to
turn it off.
Thanks,
Dan Anderson