...

View Full Version : PHP/Apache & fopen() HELP!



angst
09-12-2005, 04:46 PM
Hello,
I'm trying to using fopen() on my web hosts server thats running in SAFEMODE. and I'm having major issues!

simple script for testing:


<?
$oldumask = umask(0);
mkdir ('test',0777);
chown('test',intval(10003));
fopen('test/index_test.php',"x");

umask($oldumask);
?>


ok so,
mkdir works, and fopen works too, but only is i'm creating a file in the same folder as the script, if I try to creat a file/folder within the newly created folder 'test' i get this error:

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 10003 is not allowed to access /test owned by uid 33 in /mkdir.php on line 5,

si I tried using chown() to see if I can set the uid, but thats restricted too.

does anyone know of a way around this problem? or am I screwed on this one??

thanks in advance for your time!
-Ken



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum