Page 1 of 1

uid check by file_exists

Posted: Tue Jan 07, 2003 11:00 am
by leguye
Hello,

I've just installed PHP 4.3.0. The 4.0.6 was installed before. With the new version, in safe mode, the 'file_exists' function produce this warning:

Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 302 is not allowed to access /full/path/to/file.gif owned by uid 301 in /full/path/to/script.php on line 12

I did not have this problem with version 4.0.6.

Please help me!

Thank you,


Emmanuel.

Posted: Tue Jan 07, 2003 11:11 am
by volka

Posted: Tue Jan 07, 2003 11:16 am
by mydimension
this may have the answer your looking for: http://www.php.net/manual/en/features.s ... e-mode-gid
if you don't have access to the php.ini file then you might be able to use the ini_set() function.

Posted: Tue Jan 07, 2003 11:18 am
by volka
safemode-settings can't be altered by ini_set(). Would be useless otherwise ;)

Posted: Wed Jan 08, 2003 4:44 am
by leguye
I tried the safe_mode_gid (On or Off) without any effect. I repeat that in version 4.0.6 my php.ini is OK. Is the file_exists() function more restricted in 4.3.0?

Thanx,

Emmanuel.[/quote]

Posted: Thu Jan 09, 2003 6:05 am
by maxim
Is the file_exists() function more restricted in 4.3.0?
Yes it is, in safe mode there are a lot of restrictions based on your ownership of the files and so on.